Skip to content

Share prepared analysis ownership for queries - #633

Merged
jonathanong merged 6 commits into
mainfrom
agent-prepared-ownership
Aug 10, 2026
Merged

Share prepared analysis ownership for queries#633
jonathanong merged 6 commits into
mainfrom
agent-prepared-ownership

Conversation

@jonathanong

@jonathanong jonathanong commented Aug 9, 2026

Copy link
Copy Markdown
Owner

What changed

Routes data-pw, registry-extension, and fetches through one request-owned AnalysisSession.

Why

These public paths previously created independent inventories, source reads, or parse passes. The request boundary now owns visible files, SourceStore, parsing, and the query-owned registry report projection.

Impact

  • data-pw consumes the session's visible inventory and sources
  • fetch matching and traversal share one session-backed source/parse path
  • registry-extension memoizes success and parse failure per normalized root/file key
  • independent registry paths use a DashMap; only same-key builds coordinate through OnceLock

Validation

  • registry repeat-success and repeat-failure regressions: 2 passed
  • prepared fetch-session regression: 1 passed
  • compatibility-wrapper static-fixture regression: 1 passed
  • cargo clippy -p no-mistakes --all-targets --all-features -- -D warnings
  • cargo fmt --check
  • git diff --check
  • GitHub Test CI run 31410110320: all tests, Rust coverage, Codecov, benchmarks, lint/package, AST analysis, and JavaScript checks passed

Shepherd Journal

  • A resolved automated suggestion proposed wrapping the registry regression in an external request parse-cache scope. That would hide the production ownership gap: public request-scoped AnalysisSession must itself memoize repeated query work. The per-key request-owned report projection fixes the behavior while preserving the unconditional regression.

@coderabbitai

This comment has been minimized.

@sourcery-ai

This comment has been minimized.

@codecov

This comment has been minimized.

@jonathanong
jonathanong force-pushed the agent-prepared-ownership branch from 2368850 to 47ea7de Compare August 9, 2026 23:50
@jonathanong
jonathanong marked this pull request as ready for review August 10, 2026 15:47
sourcery-ai[bot]

This comment was marked as resolved.

coderabbitai[bot]
coderabbitai Bot previously requested changes Aug 10, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/no-mistakes/src/fetches/tests/run_with_base_root_tests.rs`:
- Around line 59-84: Strengthen
prepared_fetch_run_reuses_the_session_for_target_matching_and_traversal by
asserting the session work snapshot contains the fixture’s expected two
normalized source-read and parse-attempt entries before checking each count is
1. Also assert that the report includes the expected /api/users fetch result,
ensuring the test detects bypassed session reads, parsing, or traversal
regressions.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5760397c-a877-42de-bf9c-fd4a96d260e3

📥 Commits

Reviewing files that changed from the base of the PR and between 287453d and a51b22c.

📒 Files selected for processing (14)
  • crates/no-mistakes/src/codebase/ts_source/tests/gitignore.rs
  • crates/no-mistakes/src/data_pw_query.rs
  • crates/no-mistakes/src/data_pw_query/scan.rs
  • crates/no-mistakes/src/data_pw_query/tests.rs
  • crates/no-mistakes/src/fetch/file_analysis.rs
  • crates/no-mistakes/src/fetch/file_facts.rs
  • crates/no-mistakes/src/fetch/import_routes.rs
  • crates/no-mistakes/src/fetch/mod.rs
  • crates/no-mistakes/src/fetch/route_analysis.rs
  • crates/no-mistakes/src/fetches/pipeline/route_analysis.rs
  • crates/no-mistakes/src/fetches/pipeline/run.rs
  • crates/no-mistakes/src/fetches/tests/run_with_base_root_tests.rs
  • crates/no-mistakes/src/registry_extension_query.rs
  • crates/no-mistakes/src/registry_extension_query/tests.rs

Comment thread crates/no-mistakes/src/fetches/tests/run_with_base_root_tests.rs
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@jonathanong
jonathanong dismissed coderabbitai[bot]’s stale review August 10, 2026 16:09

Memoized registry-extension reports in the request session and strengthened the fetch session regression assertions.

@jongleberry-bot
jongleberry-bot marked this pull request as draft August 10, 2026 16:15
@jonathanong
jonathanong marked this pull request as ready for review August 10, 2026 16:58
sourcery-ai[bot]

This comment was marked as resolved.

@codspeed-hq

This comment has been minimized.

@jonathanong
jonathanong merged commit 45b2b4a into main Aug 10, 2026
23 checks passed
@jonathanong
jonathanong deleted the agent-prepared-ownership branch August 10, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant