add FileDeps dataclass, .deps.json sidecar, and determinism test (PR-T1)#265
Merged
Conversation
Foundation for incremental Kuzu rebuild (Tier 2 plan). Every full rebuild now writes a .deps.json sidecar alongside the Kuzu database containing per-file dependency metadata (declared types, injects, extends, calls, annotation usage, overrides, clients, producers) for closure expansion in subsequent incremental runs. Adds FileDeps dataclass, _build_file_deps, _write_dependency_index, _read_dependency_index, DepsIndex. Wires into write_kuzu after _write_meta. 5 tests: determinism, deps-json written/validated/coverage/stale/missing. Implements PR-T1 of plans/active/PLAN-TIER2-INCREMENTAL-REBUILD.md. Co-Authored-By: Claude Opus 4.7 <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
FileDepsdataclass,_build_file_deps,_write_dependency_index,_read_dependency_index, andDepsIndextobuild_ast_graph.py.deps.jsonsidecar alongside the Kuzu database containing per-file dependency metadata for closure expansion in subsequent incremental runstests/test_incremental_equivalence.py: determinism, deps-json written/validated/coverage/stale/missingImplements
PR-T1 of
plans/active/PLAN-TIER2-INCREMENTAL-REBUILD.mdManual evidence
Design notes
.deps.jsonuses atomic write-temp-rename for safetyext_hashusessha256:prefix matching proposal §2.4 format_read_dependency_indexreturnsNoneon any corrupt/stale/missing file (broadexcept Exceptionafter version validation)_write_dependency_indexis called afterconn.close()inwrite_kuzu— the sidecar doesn't need a DB connectiontest_perf_baseline_full_rebuilddeferred (informational per plan)🤖 Generated with Claude Code