Skip to content

feat(version-skew): SHA-keyed store + cross-version rename tracking (6.4, G3/A11)#57

Merged
officialCodeWork merged 1 commit into
developmentfrom
build/phase-6/step-6.4-version-skew
Jul 16, 2026
Merged

feat(version-skew): SHA-keyed store + cross-version rename tracking (6.4, G3/A11)#57
officialCodeWork merged 1 commit into
developmentfrom
build/phase-6/step-6.4-version-skew

Conversation

@officialCodeWork

Copy link
Copy Markdown
Owner

Phase 6.4 — Version skew & rename tracking (failure modes G3, A11)

An agent often resolves a ticket against a stored graph (the commit in production) while the code has moved on. If the matched definition was renamed or moved on main, the match points at a file that no longer exists under that identity. This step detects that and warns with the new name/path.

Changes

  • diffRenames(fromGraph, toGraph) (core): pairs a definition gone by identity (name+file) in the newer graph with a same-body-signature definition that is new there. Signature = structural fingerprint + normalized rendered text + props + rendered-children — all stable across a rename or file move. Confident 1:1 only: unique among both the gone and arrived sets; generic empty bodies and ambiguous many-to-many sets are skipped (no false renames).
  • SHA-keyed graph store (core storage): saveGraphToStore / loadGraphFromStore / graphStoreDir.coderadar/graphs/<sha>.json (or working outside git) + a latest pointer.
  • buildBundle gains a currentGraph option → version skew — matched \InvoiceCard` (…); renamed `BillingCard` (…) in the current graph`.
  • CLI: scan --store writes the store; bundle --against <sha|latest> loads the current graph from it for the diff.

Fixture & tests

  • Fixture pair g3-version-skew/{old,new}: InvoiceCard.tsxBillingCard.tsx, renamed and moved, identical body. The golden validates the post-rename graph directly; the two-graph diff is covered by unit tests.
  • 7 core diffRenames + 4 store round-trip + 2 parser-react (real scan) + 3 agent-sdk (buildBundle warning) tests.
  • Verified end-to-end via the CLI: a ticket bundled against the old graph with --against latest emits the rename warning with the new name+file.

Verification

  • pnpm eval → 317 pass · determinism 1.000 · all metrics 1.000
  • Full suite, pnpm typecheck, pnpm lint green. .coderadar/ gitignored.

Tracker updated. 6.1 (incremental re-scan) and 6.2 (scale) remain before Gate 6 is fully stamped.

🤖 Generated with Claude Code

…king (6.4, G3/A11)

Warn when a ticket resolved against a stored (production) graph points at a
definition that was renamed or moved in the current code.

- core diffRenames(from, to): pairs a definition gone by identity (name+file)
  with a same-body-signature definition that is new in the newer graph. Signature
  = structural fingerprint + normalized rendered text + props + rendered-children,
  stable across a rename/move. Confident 1:1 only; generic/ambiguous bodies
  skipped (no false renames).
- core SHA-keyed store: saveGraphToStore/loadGraphFromStore/graphStoreDir ->
  .coderadar/graphs/<sha>.json (or "working") + a latest pointer.
- buildBundle gains a currentGraph option -> "version skew — matched `X`;
  renamed `Y` (file) in the current graph".
- CLI: scan --store writes the store; bundle --against <sha|latest> loads the
  current graph for the diff.
- Fixture pair g3-version-skew/{old,new} (InvoiceCard.tsx -> BillingCard.tsx,
  renamed and moved). .coderadar/ gitignored.

7 core + 4 store + 2 parser-react + 3 agent-sdk tests; verified end-to-end via
the CLI. eval 317/0/0/0, determinism 1.000, all metrics 1.000; typecheck + lint
clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@officialCodeWork
officialCodeWork merged commit eda886d into development Jul 16, 2026
1 check 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.

2 participants