Skip to content

Fix/issue 48 index freshness - #53

Open
WinterQuant wants to merge 2 commits into
mainfrom
fix/issue-48-index-freshness
Open

Fix/issue 48 index freshness#53
WinterQuant wants to merge 2 commits into
mainfrom
fix/issue-48-index-freshness

Conversation

@WinterQuant

Copy link
Copy Markdown
Collaborator

Summary

Test plan

  • cargo test --all passes
  • cargo clippy --all-targets passes
  • Tested manually (describe below)

Notes

vsingh32 and others added 2 commits August 3, 2026 14:12
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>
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