Skip to content

Test reset clears the shared-index built-roots ledger with the slots it describes - #12818

Closed
gunbai-bot[bot] wants to merge 1 commit into
mainfrom
session/clever-stag-200
Closed

gunbai-bot[bot] wants to merge 1 commit into
mainfrom
session/clever-stag-200

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Cause

Not an order/thread flake — deterministic. shared_primary_precedence_index_is_byte_identical_to_cold fails run alone (--exact, --test-threads=1, no predecessor) on main since #12765 added PROCESS_RESOLVE_INDEX_BUILT, the per-thread ledger that turns "same roots built twice after eviction" into SharedIndexRebuiltAfterEviction. The thread-reuse hypothesis is falsified by that isolated run.

Chain (§6b): the ledger's contract is that a rebuild of roots the thread's slot held and lost to eviction is a redundant second parse — that refusal is correct and is kept unchanged. reset_process_shared_index_for_test is the one test-only operation that empties the slots to declare a fresh history (so the cold arm re-derives from disk). It cleared the slots but not the ledger that describes them, so after the oracle's cold arm + reset, the warm arm's rebuild of the same roots read as an eviction-rebuild. The earliest unjustified boundary is the reset: slots and ledger are one state and it reset half of it.

Fix

The reset clears the ledger with the slots. The refusal is not widened: production paths never call the reset, and a_shared_index_evicted_by_other_roots_refuses_to_rebuild (A, B, A without reset) still refuses.

Evidence (BuildBuddy, full paths)

  • before: cli_run::compile_clean_via_index_verdict_equivalence::shared_primary_precedence_index_is_byte_identical_to_cold alone → FAILED (SharedIndexRebuiltAfterEviction at cli_run.rs:6668)
  • after: same → ok; cli_run::closure_edge_demand_tests::a_shared_index_evicted_by_other_roots_refuses_to_rebuild → ok

🤖 Generated with Claude Code

…h the slots (shared_primary_precedence purity oracle red)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@gunbai-bot

gunbai-bot Bot commented Sep 30, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #12821, which deletes the built-roots ledger this PR would have cleared on test reset. Verified on BuildBuddy (--exact, --test-threads=1, no predecessor): cli_run::compile_clean_via_index_verdict_equivalence::shared_primary_precedence_index_is_byte_identical_to_cold is red on main 68ad067 (SharedIndexRebuiltAfterEviction at cli_run.rs:6668) and green on #12821 head ff25cc8. Branch kept.

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.

0 participants