fix(code-index): serve a complete seat that lands after the read misses - #3044
Merged
Merged
Conversation
|
ScriptedAlchemy
added a commit
that referenced
this pull request
Oct 3, 2026
This was referenced Oct 4, 2026
Closed
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
code_facetssometimes answeredUnavailableon a project whose index was ready. That madeevery_cursor_carrying_code_operation_mints_and_spends_a_continuationflake atapplication_production_reachability.rs:447.Facets, timeline and source metadata resolve their generation through
latest_complete_fresh_for_scope_awaiting_seat(queries.rs:357-360). After a publication, only the text owner is seated. The first complete read misses, and that miss posts the wake that decodes and seats the complete generation. The probe then read theserving_generationslot to classify the miss. If the decode won that window, the probe saw a seat and parkedSeatNotServable, even though the seat had landed after the read and would have served it. #2823 dropped the re-check that had guarded this window.Fix
The probe now snapshots the slots before the read. It parks
SeatNotServableonly when a seat was already present before the read declined it and is still present. A seat that lands after the miss returnsNone, and the seat's change signal re-probes and serves it.Tests
The
test(...)commit adds a#[cfg(test)]gate that holds the probe right after its miss. The regression testresidency::a_complete_read_serves_the_seat_its_demand_lands_after_its_missseats the decode inside that window. It fails on the test commit and passes on the fix commit.code_facets ... terminate Unavailablepanic.cargo fmt --checkis clean.cargo clippy -p tracedecay-code-index-runtime --all-targets -- -D warningsis clean.