Repository navigation
fix: force reindex rebuilds the SCIP symbol indexes too - #344
Merged
Merged
Conversation
'n' in the TUI and 'codesearch index -f' promised a full rebuild but date from before the symbol indexes existed: the HTTP handler forced the symbol pass only behind the separate ?symbols=true flag (so the gate saw a fresh SCIP index and skipped it), and the TUI's force reindex never ran a symbol pass at all. Field effect: after adding Razor to the text index, find_impact kept answering from ~19h-old references because no .cs file had changed. Force now implies symbols: the handler computes force_implies_symbols(force, symbols) and the TUI's force task runs maybe_rebuild_symbols(force=true) after restart_fsw - mirroring the HTTP path, which already had the step. Explicit ?symbols=true remains the no-force way to force only the symbol pass; plain reindex stays gate-driven. Local CLI builds (index -f --local / delegation failure) still build no symbols at all - serve owns the symbol pipeline there. Pinned by force_reindex_implies_symbol_rebuild; defect-probed (old semantics fails the assert).
CHANGELOG under pending [1.5.33] (Fixed), highlights line, plan ticked. Full validation green: fmt, clippy -D warnings (stage 1), cargo test --lib --bins 894+890.
Final-review finding (proven by executing the revert in a throwaway clone): the pin test covered only the pure helper - reverting the handler line to 'let do_symbols = symbols' kept the suite green. The helper is gone; the structure now makes the revert impossible: - the FORCE branch ends in finish_force_reindex, which is always forced and takes no flag - there is no decision left to revert; - the plain-reindex branch passes the ?symbols query flag straight to maybe_rebuild_symbols (gate-driven unless ?symbols=true), unchanged; - force_implies_symbols and its helper-only test are deleted. The seam test finish_force_reindex_starts_fsw_and_keeps_guard_contract runs the real tail on a temp repo (production order: force reindex first, then the tail) and pins FSW registration + the guard contract; the forced-pass semantics stay pinned by the existing maybe_rebuild_symbols force=true test. Review-fixes: - [Important] pin test covered only the helper; reintroduced defect kept the suite green -> removed the revert target structurally (flagless force branch through the shared forced tail) + real seam test.
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.
Why
User, verbatim: "als we 'n' of -f doen en het is een repo met een scip index MOET hij die mee opnieuw bouwen — dit ontwerp dateert gewoon nog van voor scip en is niet correct mee geupdate." Field case: after Razor joined the text index,
find_impactkept answering from ~19-hour-old references — the SCIP gate said Fresh (no.cschanges) and skipped.What
index -fdelegates?force=true) and the TUIntask — end in the new shared tailfinish_force_reindex: fresh FSW, then a FORCED, gate-bypassing symbol pass. There is no decision left to revert; the TUI previously never ran a symbol pass at all.?symbols=truestays the explicit no-force symbol-only trigger; local CLI builds (index -f --local/ delegation failure) build no symbols (serve owns the symbol pipeline there — documented carve-out).Tests
finish_force_reindex_starts_fsw_and_keeps_guard_contract— runs the REAL tail on a temp repo in production order (force reindex → tail), pins FSW task registration + the guard-release contract (callers ownend_indexing).maybe_rebuild_symbolsforce=true test.Validation
fmt clean; clippy --all-targets -D warnings clean; cargo test --lib --bins 894+890 green.