fix(cli): require full rebuild for stale extraction indexes#1256
Open
Adam0120 wants to merge 1 commit into
Open
fix(cli): require full rebuild for stale extraction indexes#1256Adam0120 wants to merge 1 commit into
Adam0120 wants to merge 1 commit into
Conversation
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
codegraph indexrebuild when an index predates the current extraction versioncodegraph syncfor extraction-version staleness-fsafety override in the post-upgrade advisorystatusoutputReproduction and root cause
A full index stamps
indexed_with_extraction_version, whilesyncdeliberately does not advance that stamp because it only revisits changed files. When extraction behavior improves, unchanged files built by an older engine can therefore remain incomplete aftersync.Both
codegraph statusand the post-upgrade advisory previously offeredcodegraph syncas a recovery command, which could leave the index stale while implying the extraction improvements had been applied.Behavior boundary
This only changes public guidance. It does not automatically rebuild indexes during upgrade and does not change sync or indexing behavior.
codegraph indexalready recreates the database and performs the required full rebuild. Its-fflag only bypasses unsafe-root protection, so the general advisory should not recommend it.Verification
npm run buildnpx vitest run __tests__/upgrade.test.ts --reporter=dot --pool=threads --fileParallelism=false(50 passed)status requires a full rebuild when the extraction version is stalereindexAdvisory requires a full rebuild for extraction improvementsgit diff --checkOn this Windows environment, the complete
status-json.test.tsfile has a pre-existing process-exit hang that reproduced before the change; the new CLI regression test passes independently after build.