Repository navigation
ADR-056: reindex reports freshness against the index's target (B-070) - #99
Merged
Merged
Conversation
…0), proposed Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> [ADR-056]
…ructions quote no commit (B-070) The pre-run staleness block compared the folder's HEAD even in git mode, so a folder on any other branch got INDEX STALENESS DETECTED and full-rebuild advice. reindex() and index_status now share _freshness_target(), and reindex reports one freshness line after the run. The server instructions name the ref, not a commit read at connect, and point to index_status. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> [ADR-056 src/MCPServer.py]
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.
Builds B-070 as ADR-056.
The bug
In git mode,
reindex()checked freshness against the folder's checked-outHEAD, not the ref the index follows. Both live repos have their folder on a feature branch, so every reindex printed INDEX STALENESS DETECTED, listed hundreds of files and advisedreindex(changed_files_only=False), a full re-embed for nothing. The same output then said the index was up to date.The change
_freshness_target(): one definition of "the revision the index is current against" (ref or "HEAD"), now shared byindex_statusandreindex.index_statusoutput is unchanged.reindex(): the pre-run warning and the rebuild advice are gone. One freshness line is printed after the run (current, orSTALEagainst the ref).git diff --name-only <ref>...HEAD, and point toindex_status. They no longer open the database.Verified
HEAD; instructions quote no commit and stay under 1,000 characters.tools/list --strictexit 0, 17 tools, 16readOnlyHint(all butreindex);index_statusreturnsisError: false.origin/integration/staging-2026-10-01, V2 →origin/main).After merge, live servers pick this up on pull +
/mcpreconnect.🤖 Generated with Claude Code