feat(core): graph storage, schema versioning, scan provenance#4
Merged
officialCodeWork merged 1 commit intoJul 13, 2026
Merged
Conversation
Step 0.3 (TRACKER). G2/G3/D1 foundations: - saveGraph/loadGraph: version-checked persistence — refuses graphs newer than the library (an old reader must never misinterpret a new graph). - collectGraphMeta: commit SHA + dirty flag recorded at scan time; coderadar scan prints provenance. - schemas/lineage-graph.schema.json generated from the TS types (ts-json-schema-generator), committed, drift-gated by a test that regenerates and diffs. Located at repo root since dist/ is gitignored (TRACKER updated to match). - CLI query commands load through the validating loader: a v99 graph now fails loudly with an upgrade message instead of being silently misread. 24 unit tests green; eval gate OK (25 pass / 0 fail / 2 xfail). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TRACKER Step 0.3 — the graph becomes a durable, versioned artifact. This is the foundation for pre-built graphs served to the pipeline (G2), SHA-keyed graph stores (G3), and staleness warnings (D1).
What's in it
saveGraph/loadGraphin core — persistence with schema-version checking. A graph written by a newer CodeRadar refuses to load in an older library with an explicit "upgrade @coderadar/core" error, instead of being silently misread. Older versions load (migration hooks live here when v3 exists).collectGraphMeta— commit SHA + dirty-tree flag captured at scan time and embedded in the graph.coderadar scannow prints it:schemas/lineage-graph.schema.json— the whole graph schema generated from the TS types via ts-json-schema-generator, committed, and drift-gated: a core test regenerates and diffs, so the committed schema can never lag the types. Regenerate withpnpm schemas. (Placed at repo root rather than TRACKER's originaldist/since dist is gitignored — TRACKER updated.)find/traceload graphs through the validating loader.Acceptance criteria (from TRACKER 0.3)
coderadar scanoutput includes SHA (+ dirty flag)Test plan
pnpm evalgate OK — 25 pass / 0 fail / 2 xfail / 0 unexpected-passDocumentation
TRACKER.md— 0.3 done, Status → 0.4, schema location corrected🤖 Generated with Claude Code