Skip to content

fix(code-index): serve a complete seat that lands after the read misses - #3044

Merged
ScriptedAlchemy merged 2 commits into
masterfrom
fix/code-facets-readiness-flake
Oct 3, 2026
Merged

ScriptedAlchemy merged 2 commits into
masterfrom
fix/code-facets-readiness-flake

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Summary

code_facets sometimes answered Unavailable on a project whose index was ready. That made every_cursor_carrying_code_operation_mints_and_spends_a_continuation flake at application_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 the serving_generation slot to classify the miss. If the decode won that window, the probe saw a seat and parked SeatNotServable, 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 SeatNotServable only when a seat was already present before the read declined it and is still present. A seat that lands after the miss returns None, 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 test residency::a_complete_read_serves_the_seat_its_demand_lands_after_its_miss seats the decode inside that window. It fails on the test commit and passes on the fix commit.

  • Before the fix, the acceptance test passed 30 of 32 hauler runs. Both failures were the reported code_facets ... terminate Unavailable panic.
  • After the fix, it passed 40 of 40.
  • cargo fmt --check is clean.
  • cargo clippy -p tracedecay-code-index-runtime --all-targets -- -D warnings is clean.

Devin Review

@changeset-bot

changeset-bot Bot commented Oct 3, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: c1253b6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@ScriptedAlchemy
ScriptedAlchemy merged commit 65d6f7f into master Oct 3, 2026
31 checks passed
ScriptedAlchemy added a commit that referenced this pull request Oct 3, 2026
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