Skip to content

refactor(graph-query): move root graph analysis into graph-query - #1141

Merged
ScriptedAlchemy merged 2 commits into
codex/tracedecay-total-redesign-plan-reopenedfrom
grok/w1-graph-query
Sep 9, 2026
Merged

ScriptedAlchemy merged 2 commits into
codex/tracedecay-total-redesign-plan-reopenedfrom
grok/w1-graph-query

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Child of #707 for #1073 (composition root).

crates/tracedecay/src/graph/** is deleted; redundancy scan and test-risk analysis now live in tracedecay-graph-query as public modules and take the already-admitted VerifiedGraphQuery handle. No new port, no mcp ↔ graph-query cycle, no compatibility re-export from the old root path.

  • redundancy_scan: redundancy_scan, RedundancyOptions, RedundancyScanV1, pair/node views, and the scan-owned SemanticRedundancy{Generation,Profile,Vector}V1 (application still projects the generation and re-exports the types).
  • test_risk: analyze_test_risk, verified_test_evidence, verified_test_symbol_parts, VerifiedTestEvidence, TestRiskReport and its summary/entry/bucket types.
  • TraceDecay is removed from these signatures so graph-query does not depend on root or application. Handlers fetch semantic via project_semantic_redundancy_generation; test-risk reads churn from graph.project_root().

Verification: tracedecay-graph-query 55 tests; mcp_suite (test-transport) 11 tests — redundancy, health summary/detailed, test_risk ×4, test_map, context search-evidence scope, search limit/budget; check + clippy -D warnings on graph-query/application/root; fmt; commitlint.

The crate-private redundancy and test-risk scans now consume the
admitted VerifiedGraphQuery handle instead of TraceDecay, so the
composition root can drop its graph module without a new port.
@changeset-bot

changeset-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 38f32d6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-09T08:48:16.869255Z 38f32d6 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 38f32d655c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +427 to +428
async fn file_churn(project_root: &Path, days: u32) -> Result<HashMap<String, usize>> {
let git = tracedecay_runtime_core::git::try_git_program().map_err(|_| {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Reuse the canonical file-churn authority

This copies tracedecay_application::git_intelligence::churn::file_churn nearly verbatim while removing its last repository caller, leaving two production implementations with separate instrumentation and error policies. When the Git command or failure handling changes, test-risk can silently diverge from the canonical helper; move the implementation to a lower-layer crate that both modules can use instead of introducing this shadow authority.

AGENTS.md reference: AGENTS.md:L113-L120

Useful? React with 👍 / 👎.

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Performance Comparison codex/tracedecay-total-redesign-plan-reopened → grok/w1-graph-query

Total Elapsed Time: 3.99s → 3.94s (-1.4%)
CPU Baseline: 80.94µs → 87.60µs (+8.2%)
Benchmark ID: index-bench-timing

timing - Execution duration of functions.

+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| Function                                 | Calls                      | Avg                            | P95                            | Total                          | % Total                      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| tracedecay-index-bench                   | 1 → 1 (+0.0%)              | 3.99s → 3.94s (-1.3%)          | 3.99s → 3.94s (-1.3%)          | 3.99s → 3.94s (-1.3%)          | 100.00% → 100.00% (+0.0%)    |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| query.artifact.append_pages              | 13 → 13 (+0.0%)            | 120.43ms → 119.52ms (-0.8%)    | 162.79ms → 162.00ms (-0.5%)    | 1.57s → 1.55s (-1.3%)          | 39.22% → 39.47% (+0.6%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| code_index.workers.install               | 83 → 83 (+0.0%)            | 13.31ms → 13.77ms (+3.5%)      | 47.09ms → 47.48ms (+0.8%)      | 1.11s → 1.14s (+2.7%)          | 27.69% → 29.04% (+4.9%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| domain.canonical.sha256                  | 110414 → 110414 (+0.0%)    | 8.41µs → 8.83µs (+5.0%)        | 10.99µs → 11.65µs (+6.0%)      | 928.39ms → 975.45ms (+5.1%)    | 23.26% → 24.78% (+6.5%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| code_index.build.and_publish             | 2 → 2 (+0.0%)              | 437.80ms → 450.75ms (+3.0%)    | 510.13ms → 522.45ms (+2.4%)    | 875.59ms → 901.51ms (+3.0%)    | 21.94% → 22.90% (+4.4%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| query.artifact.batch.sqlite              | 13 → 13 (+0.0%)            | 69.56ms → 68.64ms (-1.3%)      | 92.67ms → 90.44ms (-2.4%)      | 904.24ms → 892.35ms (-1.3%)    | 22.66% → 22.67% (+0.0%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| query.artifact.batch.postings            | 13 → 13 (+0.0%)            | 60.70ms → 59.87ms (-1.4%)      | 82.64ms → 80.61ms (-2.5%)      | 789.10ms → 778.30ms (-1.4%)    | 19.77% → 19.77% (+0.0%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| query.artifact.finalization.advance_wake | 14 → 14 (+0.0%)            | 48.55ms → 46.24ms (-4.8%)      | 280.76ms → 275.51ms (-1.9%)    | 679.75ms → 647.33ms (-4.8%)    | 17.03% → 16.45% (-3.4%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| code_index.chunk.index_file              | 276 → 276 (+0.0%)          | 2.05ms → 2.15ms (+4.9%)        | 3.06ms → 3.17ms (+3.6%)        | 566.80ms → 594.45ms (+4.9%)    | 14.20% → 15.10% (+6.3%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| code_index.extract.parser_artifact       | 276 → 276 (+0.0%)          | 2.05ms → 2.06ms (+0.5%)        | 3.10ms → 3.17ms (+2.3%)        | 565.74ms → 569.89ms (+0.7%)    | 14.17% → 14.48% (+2.2%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| query.artifact.prepare_pages             | 13 → 13 (+0.0%)            | 42.42ms → 42.53ms (+0.3%)      | 61.08ms → 61.15ms (+0.1%)      | 551.41ms → 552.93ms (+0.3%)    | 13.82% → 14.05% (+1.7%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| query.artifact.batch.parallel_prepare    | 13 → 13 (+0.0%)            | 33.82ms → 33.78ms (-0.1%)      | 48.76ms → 48.69ms (-0.1%)      | 439.60ms → 439.08ms (-0.1%)    | 11.01% → 11.15% (+1.3%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| query.artifact.batch.postings.ngram_rows | 13 → 13 (+0.0%)            | 34.05ms → 33.42ms (-1.9%)      | 47.35ms → 45.68ms (-3.5%)      | 442.62ms → 434.47ms (-1.8%)    | 11.09% → 11.04% (-0.5%)      |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| code_index.build.assemble                | 2 → 2 (+0.0%)              | 197.84ms → 198.84ms (+0.5%)    | 207.22ms → 206.96ms (-0.1%)    | 395.68ms → 397.68ms (+0.5%)    | 9.91% → 10.10% (+1.9%)       |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| code_index.chunk.build                   | 276 → 276 (+0.0%)          | 1.31ms → 1.36ms (+3.8%)        | 1.93ms → 2.00ms (+3.6%)        | 362.59ms → 374.99ms (+3.4%)    | 9.08% → 9.53% (+5.0%)        |
+------------------------------------------+----------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+

Generated with hotpath-rs

@ScriptedAlchemy
ScriptedAlchemy merged commit 001480a into codex/tracedecay-total-redesign-plan-reopened Sep 9, 2026
11 of 13 checks passed
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