v0.37 blockers: CI recompiling on push/schedule (#363), overhead budgets measured alone (#362), multi-client cold-start e2e #364

Merged
buildagent merged 8 commits from train-037-blockers into master 2026-10-13 16:12:21 +02:00
Member

Master CI on the #360 merge (85b29151) was red on push and nightly runs, and the PR runs of the same tree were green. This fixes both causes and adds the missing multi-client e2e. v0.37.0 is still untagged; the tag goes on this PR's merge commit once its push run is green. No version bump.

#363: cargo test 10× slower on push/schedule, with host.worker_unavailable

Root cause: crates/build_version.rs, the build script of cli, daemon, mcp-server, plugin-host and plugin-supervisor, always emitted cargo:rerun-if-changed=.git/packed-refs when HEAD is a branch ref. Cargo treats a watched path that is missing as always stale.

  • actions/checkout on push and schedule does checkout -B master in a fresh clone, so HEAD is a branch ref, the ref is a loose file, and there is no packed-refs. Every cargo invocation therefore recompiled and relinked those crates and their dependents.
  • PR runs check out a detached HEAD, so they were unaffected.

What this did to the suite: the suite's in-test cargo build -p … --bin … calls (registered in inline_cargo_build_registry) each took the build-dir lock and relinked code-index-plugin-host underneath running tests.

  • Same tree, same runner: 747 s on the PR against 7302 s on push.
  • 0.2 s worker_unavailable failures in grammar_cache, plugin_update_cli, plugin_registry_e2e, xaml_package_e2e and language_owner_e2e.
  • Cargo's fingerprint log names it: stale: missing ".git/packed-refs".

Fix: each watch is chosen by what exists.

  • HEAD.
  • The loose ref, when there is one.
  • Otherwise packed-refs, plus the nearest existing directory above where the loose ref would appear. This keeps #42 (stale --version hash after a fast-forward) fixed.

Test: crates/test-support/tests/build_script_freshness.rs builds a throwaway crate with this build script, in push-shaped and packed-ref git layouts. It asserts that a second build of an unchanged tree compiles nothing, and that a new commit still triggers a rebuild.

  • Mutations run: the original file turns both tests red. Dropping the directory watch or the loose-ref watch each turns one red (#42).

#362: nightly overhead budgets

  • Measured alone, every language is in budget. Release build, 5 paired rounds, load below 2:
repo cold ratio cold margin warm ratio
cs-dapper 1.334 0.333 s 1.003
js-express 1.296 0.405 s 1.057
php-guzzle 1.206 0.488 s 1.065
python-flask 1.285 0.413 s 1.065
ruby-sinatra 1.327 0.364 s 1.043
rust-ripgrep 1.153 0.603 s 1.051
ts-zod 1.115 0.945 s 1.006

These are this PR's full-run numbers, taken with the new overhead tier.

  • Why the nightly went red: it asserted wall-clock ratios inside seven corpus legs, running beside eleven release legs, each of them compiling (made worse by #363). The package arm costs 1.4–1.9× the builtin's CPU-seconds (discovery hashing plus wasm workers), so on a saturated machine the ratio drifts toward that CPU ratio. Run 1117 read 1.31–2.10.
  • Fix:
    • package_leg.sh gets a new overhead tier: one release build of every overhead target, then sync, then the budget assertion.
    • package-ci.yml gets a package-overhead job, nightly and dispatch only. It needs both matrices, has no matrix of its own, and measures one package at a time.
    • The corpus tier is always semantic-only.
    • Each row records the load average, so a contended red says so.
    • Budget numbers and cost records are unchanged.
  • Test: ci_path_gating::the_overhead_budgets_are_measured_alone. Putting back the old workflow line turned it red (run).
  • Follow-up, not in this PR: the package path's CPU cost. Discovery re-hashes about 110 MB on every host start.

New e2e: a shared project with concurrent MCP clients during startup and first index

crates/mcp-server/tests/shared_project_cold_start_e2e.rs::eight_clients_on_a_cold_project_share_one_daemon_and_converge:

  • 8 real MCP servers start at once on a cold 300-file project, with the first index held open, and call project_overview, search_symbols and search_text until steady.
  • It asserts:
    • one daemon serves the project; every start either serves or loses the lock, counted from daemon.log, never by process pattern;
    • every answer is real or an honest in-progress state;
    • all 8 clients converge on identical counts;
    • clients exit cleanly, the daemon survives, and a 9th client attaches to it.
  • It prints a POPULATION line on every run.
  • Mutations run:
    • Lockfile::acquire ignores a held lock → red, started: 8 … lost: 0;
    • the daemon refuses search_symbols while reconciling → red, 8/8 clients fail.
  • No product defect found.
  • It runs in the test job and the daemon leg.

Verification

Each lane ran targeted tests and its own mutations. I re-ran every lane's tests and one mutation per lane myself, and each mutation went red.

One full local run on 5b1f85fe, all 32 steps green:

  • fmt; clippy for workspace, first-party-tests, windows-gnu and guest; rustdoc with --document-private-items -D warnings;
  • workspace nextest 5096/5096, daemon leg 930/930, ci-timing 34/34;
  • guest gates, the CI corpus job (11 suites), psr4_vs_builtin, tier 3;
  • precision_gate 7/7, phantom 0;
  • package_leg.sh <pkg> full for all 11 packages;
  • the overhead tier for all 7 languages.

baseline.json and cost-baseline.json are unchanged.

Closes #362, #363.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YDDBdWU4yThi8Zi51E6FCj

Master CI on the #360 merge (85b29151) was red on push and nightly runs, and the PR runs of the same tree were green. This fixes both causes and adds the missing multi-client e2e. v0.37.0 is still untagged; the tag goes on this PR's merge commit once its push run is green. No version bump. ## #363: `cargo test` 10× slower on push/schedule, with `host.worker_unavailable` **Root cause:** `crates/build_version.rs`, the build script of cli, daemon, mcp-server, plugin-host and plugin-supervisor, always emitted `cargo:rerun-if-changed=.git/packed-refs` when HEAD is a branch ref. Cargo treats a watched path that is **missing** as always stale. - `actions/checkout` on push and schedule does `checkout -B master` in a fresh clone, so HEAD is a branch ref, the ref is a loose file, and there is no `packed-refs`. Every cargo invocation therefore recompiled and relinked those crates and their dependents. - PR runs check out a detached HEAD, so they were unaffected. **What this did to the suite:** the suite's in-test `cargo build -p … --bin …` calls (registered in `inline_cargo_build_registry`) each took the build-dir lock and relinked `code-index-plugin-host` underneath running tests. - Same tree, same runner: 747 s on the PR against 7302 s on push. - 0.2 s `worker_unavailable` failures in grammar_cache, plugin_update_cli, plugin_registry_e2e, xaml_package_e2e and language_owner_e2e. - Cargo's fingerprint log names it: `stale: missing ".git/packed-refs"`. **Fix:** each watch is chosen by what exists. - HEAD. - The loose ref, when there is one. - Otherwise `packed-refs`, plus the nearest existing directory above where the loose ref would appear. This keeps #42 (stale `--version` hash after a fast-forward) fixed. **Test:** `crates/test-support/tests/build_script_freshness.rs` builds a throwaway crate with this build script, in push-shaped and packed-ref git layouts. It asserts that a second build of an unchanged tree compiles nothing, and that a new commit still triggers a rebuild. - Mutations run: the original file turns both tests red. Dropping the directory watch or the loose-ref watch each turns one red (#42). ## #362: nightly overhead budgets - **Measured alone, every language is in budget.** Release build, 5 paired rounds, load below 2: | repo | cold ratio | cold margin | warm ratio | |---|---|---|---| | cs-dapper | 1.334 | 0.333 s | 1.003 | | js-express | 1.296 | 0.405 s | 1.057 | | php-guzzle | 1.206 | 0.488 s | 1.065 | | python-flask | 1.285 | 0.413 s | 1.065 | | ruby-sinatra | 1.327 | 0.364 s | 1.043 | | rust-ripgrep | 1.153 | 0.603 s | 1.051 | | ts-zod | 1.115 | 0.945 s | 1.006 | These are this PR's full-run numbers, taken with the new `overhead` tier. - **Why the nightly went red:** it asserted wall-clock ratios inside seven corpus legs, running beside eleven release legs, each of them compiling (made worse by #363). The package arm costs 1.4–1.9× the builtin's CPU-seconds (discovery hashing plus wasm workers), so on a saturated machine the ratio drifts toward that CPU ratio. Run 1117 read 1.31–2.10. - **Fix:** - `package_leg.sh` gets a new `overhead` tier: one release build of every overhead target, then `sync`, then the budget assertion. - `package-ci.yml` gets a `package-overhead` job, nightly and dispatch only. It needs both matrices, has no matrix of its own, and measures one package at a time. - The corpus tier is always semantic-only. - Each row records the load average, so a contended red says so. - Budget numbers and cost records are unchanged. - **Test:** `ci_path_gating::the_overhead_budgets_are_measured_alone`. Putting back the old workflow line turned it red (run). - **Follow-up, not in this PR:** the package path's CPU cost. Discovery re-hashes about 110 MB on every host start. ## New e2e: a shared project with concurrent MCP clients during startup and first index `crates/mcp-server/tests/shared_project_cold_start_e2e.rs::eight_clients_on_a_cold_project_share_one_daemon_and_converge`: - 8 real MCP servers start at once on a cold 300-file project, with the first index held open, and call `project_overview`, `search_symbols` and `search_text` until steady. - It asserts: - one daemon serves the project; every start either serves or loses the lock, counted from daemon.log, never by process pattern; - every answer is real or an honest in-progress state; - all 8 clients converge on identical counts; - clients exit cleanly, the daemon survives, and a 9th client attaches to it. - It prints a POPULATION line on every run. - Mutations run: - `Lockfile::acquire` ignores a held lock → red, `started: 8 … lost: 0`; - the daemon refuses `search_symbols` while reconciling → red, 8/8 clients fail. - No product defect found. - It runs in the `test` job and the daemon leg. ## Verification Each lane ran targeted tests and its own mutations. I re-ran every lane's tests and one mutation per lane myself, and each mutation went red. One full local run on 5b1f85fe, all 32 steps green: - fmt; clippy for workspace, first-party-tests, windows-gnu and guest; rustdoc with `--document-private-items -D warnings`; - workspace nextest 5096/5096, daemon leg 930/930, ci-timing 34/34; - guest gates, the CI corpus job (11 suites), `psr4_vs_builtin`, tier 3; - `precision_gate` 7/7, phantom 0; - `package_leg.sh <pkg> full` for all 11 packages; - the `overhead` tier for all 7 languages. `baseline.json` and `cost-baseline.json` are unchanged. Closes #362, #363. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01YDDBdWU4yThi8Zi51E6FCj
Cargo treats a missing `rerun-if-changed` path as permanently stale.
`crates/build_version.rs` (the build script of cli, daemon, mcp-server,
plugin-host and plugin-supervisor) watched `<common_dir>/packed-refs`
whenever HEAD was a symbolic ref. actions/checkout on a push or schedule
run does `checkout -B master` in a fresh shallow clone: HEAD is symbolic,
the branch ref is loose, and there is no packed-refs. So every cargo
invocation re-ran the script and recompiled + relinked those five crates.

Invisible to the suite's own build, fatal to the suite: every in-test
`cargo build -p ... --bin ...` (which the tree requires to be a no-op on a
fresh tree, see inline_cargo_build_registry.rs) took the target-dir lock
and replaced code-index-plugin-host under the tests executing it.
ci.yml 1115 (push) ran the suite in 7302 s with host.worker_unavailable
failures; ci.yml 1112 (pull_request, detached HEAD, which watched only
HEAD) ran the identical tree on the same runner in 747 s, green. The
push job log compiles the build_version crates again on later cargo
steps and inside a failing test's stderr (grammar_cache: "Compiling
code-index-plugin-host"); the PR job log compiles each crate once.
Reproduced on a push-shaped clone of 85b29151: every no-change
`cargo build -p code-index-plugin-host` recompiles and gives the
executable a new inode; at this commit it compiles nothing.

Now each watch is chosen by what exists: HEAD; the loose ref when there
is one; otherwise packed-refs plus the nearest existing directory above
where a fast-forward will write the loose ref (#42 stays held: a commit
on a packed branch writes a loose file and leaves packed-refs alone).

build_script_freshness.rs builds a throwaway crate whose build script IS
build_version.rs, in each ref shape, and asks cargo whether a rebuild of
an unchanged tree compiles anything, and whether a commit re-runs it.
Three mutations run red: the pre-fix script (both tests), no directory
watch (packed test), no loose-ref watch (branch test, #42 half).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YDDBdWU4yThi8Zi51E6FCj
The nightly package-corpus legs failed the package-vs-builtin overhead
budget (run 1117: cold ratios 1.31-2.10 on six of seven languages).
Measured on this machine at load < 2, the same commit is inside both
budgets for all seven (cold 1.12-1.33, warm 1.00-1.05). The red was the
measurement: the nightly asserted two wall-clock ratios inside seven
corpus legs running beside eleven release legs, each phase compiling
first, and the package arm spends 1.4-1.9x the builtin's CPU-seconds
(discovery's SHA-256 re-verification ~0.7 CPU-s, the wasm workers), so
under CPU saturation the ratio tends to that CPU ratio — 1117's ratios
match the measured CPU ratios language by language.

* package_leg.sh: a new `overhead` tier asserts the budgets
  (COSI_OVERHEAD_SEMANTIC_ONLY=0) after ONE release build of every
  `*_language_overhead` target and a `sync`; the corpus tier's builtin
  parity is pinned to its semantic half and no longer reads the knob
  from its caller.
* package-ci.yml: the knob is gone from package-corpus; a new
  `package-overhead` job (schedule/dispatch only, `success() ||
  failure()`) needs both matrix jobs and runs the overhead tier for
  every package in turn, in one job.
* language_overhead.rs: every row records the load average before and
  after, and a red names it.
* build_version.rs: watch only paths that exist. Cargo treats a missing
  rerun-if-changed path as changed on every build; a CI checkout has no
  packed-refs, so every cargo command of every CI job recompiled from
  code-index-plugin-supervisor up (2m30 per dev cargo test, 7m35 per
  release one in run 1117), including right before each measurement.
  A ref with no loose file is covered by its nearest existing refs/ dir.

Tests: ci_path_gating::the_overhead_budgets_are_measured_alone (four
mutations run red, including the whole fix reverted) and
cli/tests/build_version_watch.rs (unconditional packed-refs watch run
red).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YDDBdWU4yThi8Zi51E6FCj
Keeps lane A's crates/build_version.rs (#363) and its cargo-level test
crates/test-support/tests/build_script_freshness.rs; lane B's parallel
fix of the same file and its unit test are dropped as duplicates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YDDBdWU4yThi8Zi51E6FCj
shared_project_cold_start_e2e starts eight real code-index-mcp servers at
once, in daemon mode, on a project with no index, and has each call
project_overview / search_symbols / search_text in a loop while the
first index is held open (CODE_INDEX_RECONCILE_DELAY_MS). It asserts:

- one daemon for the whole run: the lockfile names one pid at every
  sample, and the daemon.log ledger (starts == served + lost-lock, one
  served pid == the lockfile's) accounts for every daemon any client
  started, without a process-table pattern match;
- every call is a real answer or the documented in-progress state
  (warming_up, state reconciling/resyncing/promotion_resolving, or an
  index_state disclosure) -- never a JSON-RPC error, other tool error,
  closed stdout or a 30 s silence;
- all eight converge on the same counts, equal to the generator's;
- after the eight close stdin the daemon is the same live pid and a
  ninth client attaches to it (no new start) and reads the same index.

Mutations run: Lockfile::acquire ignoring contention -> RED on the
ledger (started 8, served 1, lost 0; the clients still converged, so
only the ledger saw it); dispatch refusing search_symbols while
reconciling -> RED, all eight clients on internal_error.

Mcp::close_and_wait ends a session by closing stdin without reaping
the daemon. harness_settle_barrier's leg-routed population 56 -> 57.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YDDBdWU4yThi8Zi51E6FCj
Merge branch 'worktree-agent-a1f2ea99f7eca813b' into train-037-blockers
Some checks failed
Package CI / package (xaml) (pull_request) Successful in 29m33s
Package CI / package (vue) (pull_request) Successful in 29m39s
CI / cargo clippy (pull_request) Successful in 24m5s
Package CI / package (svelte) (pull_request) Successful in 30m12s
CI / CI lane wall-clock headroom (pull_request) Successful in 1m10s
Package CI / package (rust) (pull_request) Successful in 31m24s
CI / guest crates (fmt, clippy, doc) (pull_request) Successful in 1m46s
CI (Windows) / fmt + clippy + build + test (windows) (pull_request) Failing after 32m14s
Package CI / package (csharp) (pull_request) Successful in 32m16s
Package CI / package (php) (pull_request) Successful in 32m21s
Package CI / package (typescript) (pull_request) Successful in 32m45s
Package CI / package (ruby) (pull_request) Successful in 33m41s
Package CI / package (python) (pull_request) Successful in 38m19s
CI / cargo check (MSRV 1.98) (pull_request) Successful in 18m33s
CI / cargo doc (intra-doc links) (pull_request) Successful in 9m45s
CI / cargo deny (pull_request) Successful in 11m45s
CI / cargo test (abi, 32-bit + wasm32) (pull_request) Successful in 12m34s
CI / cargo check (windows-gnu) (pull_request) Successful in 15m21s
Package CI / package-corpus (python) (pull_request) Successful in 48m10s
Package CI / package-corpus (rust) (pull_request) Successful in 48m15s
Package CI / package-corpus (javascript) (pull_request) Successful in 48m24s
Package CI / package-corpus (csharp) (pull_request) Successful in 48m34s
Package CI / package-corpus (php) (pull_request) Successful in 48m31s
Package CI / package-corpus (typescript) (pull_request) Successful in 46m37s
Package CI / package-corpus (ruby) (pull_request) Successful in 53m34s
Package CI / package overhead budgets (nightly, one package at a time) (pull_request) Has been skipped
CI / cargo test (pull_request) Successful in 28m52s
CI / OSS corpus (tier 1) (pull_request) Successful in 43m13s
CI / cargo test (daemon transport) (pull_request) Successful in 12m56s
CI / Plugin path cost + pool throughput (nightly) (pull_request) Has been skipped
5b1f85fe12
Native Windows CI (ci-windows run 1119) failed
the_exit_record_is_never_seen_torn with 1215 reads answering
ERROR_FILE_NOT_FOUND (2): while write_atomically's rename replaces the
record, the name is briefly absent. read_record read that as "no
record", which startup_backoff, classify and exit_announced take as
"no backoff" — a product bug on Windows, not only a flake.

A NotFound is now waited out only while a writer's temp sibling
(`<record>.<pid>.tmp`, any pid) exists beside the record; with none it
is re-asked once at once (a rename that completed between the failed
open and the look for its temp leaves a record) and a second NotFound
is the answer, so the ordinary absent record stays one directory
listing, not the 100 ms settle budget. The 5/32 handling is unchanged.

The torn-read test now classifies the failing read itself instead of a
later re-read: its old "unparsable" bucket counted any non-empty
re-read without parsing it, so the 1 "unparsable" in run 1119 was a
re-read that SUCCEEDED after the window closed, not torn bytes.

Two new tests stage the states on any OS, mutations run on Linux:
drop the replace_pending arm -> RED (Err(NotFound)); replace_pending
always true -> RED (~100 ms); ignore the name prefix -> RED (~100 ms).
The existing test's mutation (plain fs::write) still REDs:
{"empty": 301, "unparsable": 106}.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YDDBdWU4yThi8Zi51E6FCj
restart: grade the absent-record path on the decision, not on wall clock
All checks were successful
Package CI / package (svelte) (pull_request) Successful in 29m35s
CI / cargo clippy (pull_request) Successful in 24m9s
Package CI / package (xaml) (pull_request) Successful in 30m14s
Package CI / package (timeline) (pull_request) Successful in 30m34s
Package CI / package (javascript) (pull_request) Successful in 30m46s
Package CI / package (php) (pull_request) Successful in 30m49s
CI / CI lane wall-clock headroom (pull_request) Successful in 1m6s
Package CI / package (csharp) (pull_request) Successful in 31m25s
Package CI / package (typescript) (pull_request) Successful in 31m41s
CI / guest crates (fmt, clippy, doc) (pull_request) Successful in 1m44s
Package CI / package (ruby) (pull_request) Successful in 32m42s
CI / cargo check (MSRV 1.98) (pull_request) Successful in 17m55s
Package CI / package (python) (pull_request) Successful in 38m21s
CI / cargo doc (intra-doc links) (pull_request) Successful in 9m26s
CI (Windows) / fmt + clippy + build + test (windows) (pull_request) Successful in 40m38s
CI / cargo deny (pull_request) Successful in 11m35s
CI / cargo test (abi, 32-bit + wasm32) (pull_request) Successful in 12m13s
CI / cargo check (windows-gnu) (pull_request) Successful in 15m5s
Package CI / package-corpus (rust) (pull_request) Successful in 47m34s
Package CI / package-corpus (csharp) (pull_request) Successful in 47m50s
Package CI / package-corpus (python) (pull_request) Successful in 47m48s
Package CI / package-corpus (php) (pull_request) Successful in 47m52s
Package CI / package-corpus (javascript) (pull_request) Successful in 48m1s
Package CI / package-corpus (typescript) (pull_request) Successful in 45m57s
Package CI / package-corpus (ruby) (pull_request) Successful in 52m57s
Package CI / package overhead budgets (nightly, one package at a time) (pull_request) Has been skipped
CI / cargo test (pull_request) Successful in 28m23s
CI / OSS corpus (tier 1) (pull_request) Successful in 42m36s
CI / cargo test (daemon transport) (pull_request) Successful in 12m55s
CI / Plugin path cost + pool throughput (nightly) (pull_request) Has been skipped
920e703860
wall_clock_registry::every_wall_clock_bound_runs_alone refused the
50 ms bound lane D's test put in the lib suite, where it would measure
its neighbours. The test now asserts replace_pending itself: another
file's temp is not a replace in flight, this record's own temp is.
Both mutations (replace_pending always true; prefix check dropped) RUN
and RED.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YDDBdWU4yThi8Zi51E6FCj
Author
Member

Round 1 (5b1f85fe): ci.yml and package-ci were green. ci-windows run 1119 was red on restart::tests::the_exit_record_is_never_seen_torn, a pre-existing intermittent failure: this PR didn't touch crates/daemon, and the test passed on run 1111.

It was a real Windows bug, not just a test flake. While write_atomically renames the temp file over the exit record, Windows can report the record as missing (ERROR_FILE_NOT_FOUND). Commit 300a75d9 waits out errors 5 and 32 but not this one. A read that fails this way returns "no record", which means "no restart backoff".

Fix (2f21182d, 920e7038):

  • A NotFound counts as "replace in flight" only while this record's own writer temp (<record>.<pid>.tmp) exists. Then the reader retries within the existing 50 × 2 ms budget.
  • Otherwise it re-reads once and answers at once. The ordinary absent record stays cheap.
  • New Linux tests check the decision itself:
    • an_absent_record_with_a_writer_temp_is_waited_out;
    • an_absent_record_without_a_writer_temp_is_answered_at_once. This one has no wall-clock bound; wall_clock_registry refused the first version that had one.
  • Mutations run, each red: replace_pending made always true; its prefix check dropped; the check removed entirely.
  • The torn-read test now classifies the failing read itself. The old "unparsable" bucket was a successful re-read mislabelled.

Since the full run: only crates/daemon/src/restart.rs changed. I ran the restart tests (11/11), wall_clock_registry, fmt, workspace clippy, windows-gnu clippy and daemon rustdoc, all green. Only native Windows CI can prove the mechanism, and this round is it.

Round 1 (5b1f85fe): ci.yml and package-ci were green. ci-windows run 1119 was red on `restart::tests::the_exit_record_is_never_seen_torn`, a pre-existing intermittent failure: this PR didn't touch `crates/daemon`, and the test passed on run 1111. It was a real Windows bug, not just a test flake. While `write_atomically` renames the temp file over the exit record, Windows can report the record as missing (ERROR_FILE_NOT_FOUND). Commit 300a75d9 waits out errors 5 and 32 but not this one. A read that fails this way returns "no record", which means "no restart backoff". Fix (2f21182d, 920e7038): - A NotFound counts as "replace in flight" only while this record's own writer temp (`<record>.<pid>.tmp`) exists. Then the reader retries within the existing 50 × 2 ms budget. - Otherwise it re-reads once and answers at once. The ordinary absent record stays cheap. - New Linux tests check the decision itself: - `an_absent_record_with_a_writer_temp_is_waited_out`; - `an_absent_record_without_a_writer_temp_is_answered_at_once`. This one has no wall-clock bound; `wall_clock_registry` refused the first version that had one. - Mutations run, each red: `replace_pending` made always true; its prefix check dropped; the check removed entirely. - The torn-read test now classifies the failing read itself. The old "unparsable" bucket was a successful re-read mislabelled. Since the full run: only `crates/daemon/src/restart.rs` changed. I ran the restart tests (11/11), `wall_clock_registry`, fmt, workspace clippy, windows-gnu clippy and daemon rustdoc, all green. Only native Windows CI can prove the mechanism, and this round is it.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
h-dv/code-index!364
No description provided.