Fix/issue 48 index freshness - #53
Open
WinterQuant wants to merge 2 commits into
Open
Conversation
trace_callers, trace_callees, transitive_impact, and find_all_references could silently answer from a stale graph after a branch switch, rebase, uncommitted edit, or a watcher that missed changes while its process was down — nothing in the response indicated the graph might not match the working tree. Adds a freshness module that stamps the git HEAD a project's graph was last built from (.infigraph/index_meta.json) and compares it against live git state (HEAD, working-tree dirtiness, pending watcher reindex) to prepend a stale-graph warning on the affected tools. Watcher startup now also reconciles against the stored HEAD once before entering its event loop, so a restarted watcher catches commits made while it was down instead of waiting for an unrelated future file write. Verified with unit/integration tests plus a Docker harness (docker/freshness-test/) simulating all three failure modes end-to-end against compiled binaries. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Plain-English explanation of what index freshness solves plus full implementation details (freshness module, watcher reconciliation, MCP tool wrapping, design notes, test coverage) for #48. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
WinterQuant
requested review from
johnintuit,
murari316 and
sandeep-mewara
as code owners
August 6, 2026 04:38
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
Test plan
cargo test --allpassescargo clippy --all-targetspassesNotes