Skip to content

Merge-queue flake batch: seven fixes landed together - #1038

Merged
ualtinok merged 44 commits into
mainfrom
land/flake-batch-1027
Oct 27, 2026
Merged

ualtinok merged 44 commits into
mainfrom
land/flake-batch-1027

Conversation

@aft-alfonso

@aft-alfonso aft-alfonso Bot commented Oct 27, 2026

Copy link
Copy Markdown

The flake fixes kept failing each other's merge-queue groups: each group contained some fixes but not the ones for the other tests that flaked in it. This PR merges all seven branches so one group carries every fix:

Each branch passed its own PR CI. The individual PRs are merged here with merge commits, so GitHub marks each as merged when this lands.

ualtinok and others added 30 commits October 27, 2026 05:37
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
(cherry picked from commit 029e2022583398fa094fe74b141e24d90cf24e47)
…snapshot

A publication resets the owner's scope-wide semantic view state, so the
readiness sample's scope-wide cache was empty between a fill's publication
and the worker's index rebuild. The engine then planned no semantic lane and
answered lexical-only under 'semantic: ready'. Look the index up through the
installed snapshot's reader binding and build it when that snapshot has none.

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
(cherry picked from commit 83664cf29b41259b6f3c84ee28fb02310e7cfd85)
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
…ation, replay time budget)

- bash_kill_scope tests: read_pid now polls until the pid file holds a
  complete newline-terminated pid; the shell creates the file before echo
  writes into it, so an existence check could read it empty.
- subc abort-inflight test: wait for the running command's start marker
  instead of a fixed 300 ms sleep before sending bash_abort_inflight.
- project replay recording-failure test: give the replay a wide test time
  budget so the 25 ms product budget cannot be reported ahead of the
  injected recording failure on a slow runner. Product budget unchanged.

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
(cherry picked from commit a9621274eb63069389996e84753f3dbb1e7cedcb)
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
(cherry picked from commit 2ea07c6a316c7ab017526a4f3591308a0234a059)
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
(cherry picked from commit eec17f30ed39f90a928e2a8b08c2e8572fc99351)
a_capped_check_completes_over_two_windows read nothing on a loaded Windows
runner because the borrowed index had not finished loading within the 1 s +
2.5 s first-search wait, so the search answered from a degraded empty index
and never ran the disk check. The test now waits for the load and keeps the
check's time limits wide; the work limit still cuts each pass at 2.

contended_search_index_degrades_with_disclosure asserted a 2 s wall-clock
bound. It now overrides the first-search wait to 120 s and bounds the call
at 30 s, so a search that waited on the writer-held index still fails while
runner slowness does not; the disclosure assertions are unchanged.

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
(cherry picked from commit 8b18634f2f754a694d876b78c613272dab8b6ead)
The failed-floor-sync replay test (main CI, macOS) saw a cut run make fewer
file calls than the uncut run. Per-op traces of the copy are deterministic
on Linux and on an idle Mac: 104 calls when the plane WAL is absent at the
start and 103 after the prepare step, whose read-only PlaneReader leaves an
empty WAL behind (SQLite creates it even for a reader and a read-only close
cannot remove it). The only difference is the first call, the WAL creation.
CI's uncut run counted 104 and its cut-104 rerun fewer, matching a run
where that leftover was absent.

The replay VFS no longer counts the creation of an empty WAL file as a cut
point. It still records the file so the power cut removes it, and every
write to it is still counted. Report now carries a per-call trace, and the
enumerate crash assertion prints the first divergence from the uncut run.
No whole-or-absent or crash assertion is relaxed. A new test checks that a
leftover reader WAL does not change the count.

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
(cherry picked from commit 683a750497ca72e3293c68eae9911cf1b1328eb4)
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
A merge-queue group failed because the runner could not reach github.com
for 134 s while fetching the tag. Retry the fetch three times, 20 s apart,
in the unit suite, the PR governed-docs check and the release workflow.

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
…the stderr fence

subc_drain_with_slow_writer_persists_terminal_line read its
phase=log_flush_done flushed=false line from module stderr, which in subc
mode is an asynchronous best-effort mirror. main returned right after
queueing that line and the terminal marker, and nothing waited for the
mirror thread, so on a busy runner both lines were lost (merge-queue run
40451058606). The previous commit adds the bounded stderr exit fence.

Add a debug-only AFT_TEST_STDERR_EXIT_HOLD hook that parks the mirror
worker from the end of the durable flush until the stderr exit fence
starts, and set it in the slow-writer test. Without the fence the test now
loses both lines every run; with it they are delivered. The test also
requires the terminal marker on stderr, not only in the durable file.

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
(cherry picked from commit 2904e56ed1b42577f4a11115b12fe0ecaf9355b6)
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
…n during eviction

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
(cherry picked from commit 6957c56e18438e89f7fda619e1cdcedc4e748e77)
…viction checks under

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
(cherry picked from commit f5b340c6c2a9af9c60b8b8c856bef2e27208968a)
The barrier-based read (previous commit) made a cleanup pass with nothing to
clean write the family registry, which current_only_cleanup_does_not_retain_
writers_or_change_closed_storage forbids. Restore the barrier-free read and
let eviction wait for it instead; the regression test now asserts eviction
waits for the paused read and then evicts the view.

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
(cherry picked from commit c96f44f69e2abefbdb0922fd9ebb75da9fef03e5)
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
(cherry picked from commit 5f41d2c3eeafbd8f31255b60f4c5b3b58c934902)
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Tests that assert a single replay pass reaches every task they set up
relied on the 25 ms production scan budget, so a loaded runner could stop
the pass early and let a later pass finish the work. Those tests now set
the entry budget with a 60 s duration, which removes the race without
touching the product constants.

project_replay_failed_recording_is_reported_and_retried is fixed the same
way (the Windows fix from #1029 is not on this base commit).

The budget-bound and stop/resume tests keep their own tight limits:
project_replay_scan_stops_at_budget_reports_and_resumes,
project_replay_row_query_failure_does_not_skip_db_owned_bundles,
project_replay_continuation_retains_initial_database_exclusions and
drain_project_replay_fixture.
PROJECT_REPLAY_SCAN_TIME_BUDGET becomes pub(crate) (same value) so the
integration test can name the production entry budget.

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Two shapes of test depend on how much a single replay pass covers: those
that expect one pass to reach every task they wrote, and those that check
the scan stopped at a budget. A test must set that budget the same way in
both the library test build (unit tests) and the integration test build
(the public registry surface), where the in-test budget store is compiled
out.

The setter stays available via the test-timing-hooks feature and takes an
Option, so passing None explicitly asks for the production limits that the
integration test build already uses. Tests that expect one pass to finish
pass None; budget-bound tests keep their own tight limits.

project_replay_failed_recording_is_reported_and_retried gets the same wide
budget here because the Windows fix from #1029 is not on this base commit.

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Only the library test build reads the stored per-pass budget, so the setter
and its store stay test-only. Integration tests (a separate crate that
links the product library) and product call sites cannot reach them; they
see the production limits.

Tests in this file that expect a single replay pass to reach every task
they wrote now give the pass a 60 s duration instead of the 25 ms
production one, so a loaded machine cannot stop the pass halfway.
Budget-bound tests keep their own tight limits:
project_replay_scan_stops_at_budget_reports_and_resumes,
project_replay_row_query_failure_does_not_skip_db_owned_bundles and
project_replay_continuation_retains_initial_database_exclusions, and so
does drain_project_replay_fixture.

project_replay_failed_recording_is_reported_and_retried is fixed the same
way because the Windows fix from #1029 is not on this base commit.

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
An outside edit the watcher saw reaches rust-analyzer through
lsp_forward_or_queue_watcher_changes. When the LSP manager lock was busy at
that moment, the change waited in the forward slot for a helper thread, and
the drain reported no pending work. A scoped inspect that took the manager
lock before the helper saw no owed save and no running check, pulled
rust-analyzer's analysis of the unchanged files, and certified the file
FRESH and clean.

Inspect's diagnostics readers (the scoped sweep and the warm working-set
collection) now forward that queue themselves before reading producer
state. A test-only pause on the helper thread makes the window
deterministic.

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
…t ranking test

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
The per-pass replay budget hook only exists in the library test build, so
these contract tests cannot set it and see the production limits. Their
scans cover two small single-session fixtures, well inside the production
time budget; they are left unchanged rather than rewritten.

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
…et record count

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
(cherry picked from commit 7f1061f982ff6c32e780dd530c223cd7e635ccd2)
…rds read

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
(cherry picked from commit 72bf8dbad782be35d592005d2ec589d28d2b5387)
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
(cherry picked from commit 7469c042d254437f190744dad20a44efd94e6c7f)
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
ualtinok and others added 14 commits October 27, 2026 07:48
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
…agnostics

The fake language server always reports a test error and warning for an
open document, so the control asserts the compiler error is absent rather
than zero errors. The helper thread is held through a move closure so the
receiver is not shared across threads.

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
bash_background files are not on RANKING_FENCE_PREFIXES; the descriptor
records the derived non_ranking slice with harness kind for the train.

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
…es added it)

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
…the flake batch

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
…eck state

lsp_diagnostics decides from the same rust_check_state as inspect, so an
outside edit still queued for the watcher-forward helper left rust-analyzer
owing no cargo check and the old results read as current. It now forwards
the queue first, like inspect. The queued-change setup used by the inspect
test is shared with the new lsp_diagnostics test.

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
…fault timed out on a loaded macOS runner)

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
@ualtinok
ualtinok added this pull request to the merge queue Oct 27, 2026
@ualtinok
ualtinok added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit ee18aaf Oct 27, 2026
90 checks passed
@ualtinok
ualtinok deleted the land/flake-batch-1027 branch October 27, 2026 08:41
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