Repository navigation
test(daemon): synthetic burst-link reproducer for #726 (closes #729) - #733
Merged
Merged
Conversation
Adds `crates/zccache/tests/daemon_burst_link_test.rs` so the #726 wedge class is regression-testable without depending on FastLED on a runner. Two tests: - `burst_compile_does_not_wedge_daemon` (#[ignore], integration): fires N=200 concurrent `Request::Compile` invocations against a single fresh DaemonServer. Asserts all complete, the daemon answers a follow-up Ping on a fresh connection, and the wall time stays under the 60 s budget from #729. Verified locally: N=50 → 5.8 s, N=200 → 26.0 s. Tunable via `ZCCACHE_BURST_N`. No-ops when clang is not on PATH, matching the existing `daemon_stress_test.rs` pattern, so it joins the standard integration suite. - `wedge_budget_default_survives_burst_window`: documents the invariant the burst test relies on — the default wedge recv budget (#727's 90 s → 180 s widening) must stay ≥ 150 s, otherwise the burst test will flake on slow runners. Probes the env-var contract (`ZCCACHE_WEDGE_RECV_TIMEOUT_SECS`) rather than the private constant. This test catches **daemon-side** regressions that would cause the wedge guard to fire. The guard's own CLI-side logic is still covered by the `wedge_detection_*` unit tests in `crates/zccache/src/cli/commands/wrap/ipc.rs`. Closes #729. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
zackees
added a commit
that referenced
this pull request
Jun 14, 2026
Ships four PRs that landed on top of 1.12.2: - #730 — test(wedge): deterministic `wedge_detection_returns_wedged_on_recv_timeout` - #731 — diagnostics(persist): enrich the `os error 2` WARN with src/dst/errno/exists/size/gap_ms (#728 criterion 1) - #732 — fix(meson): allowlist configure outputs, skip-persist on no-op, purge meson-configure on clear (closes #710, KEY_DOMAIN_TAG v2->v3) - #733 — test(daemon): synthetic burst-link reproducer for #726 (closes #729) Closes #710, #729 (already closed on merge); ships the #728/#731 diagnostics so the next FastLED `all-with-examples` repro can capture rich logs for criteria #2–#3. Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
2 tasks
zackees
added a commit
that referenced
this pull request
Jun 14, 2026
Adds `crates/zccache/tests/daemon_spawn_storm_test.rs` so the #691 spawn-storm class becomes regression-testable without depending on a heavy parallel rustc workload on a runner. One test: - `parallel_wrappers_must_share_one_daemon` (#[ignore], integration): fires N=16 (tunable via ZCCACHE_SPAWN_STORM_N) parallel zccache wrapper invocations against a fresh ZCCACHE_CACHE_DIR, sync'd on a std::sync::Barrier so they race the daemon-spawn decision together. Asserts exactly one daemon-spawn-*.log lands in logs/ and exactly one event:"spawn" line lands in daemon-lifecycle.log. This is the invariant the coordination fix from #691 should establish. Gated on ZCCACHE_RUN_REPRO_691=1 in addition to #[ignore], so it is a no-op under both `cargo test` (unit) and `cargo test -- --ignored` (./test --integration). Opt in with: ZCCACHE_RUN_REPRO_691=1 ./test --integration -- daemon_spawn_storm On main today the test is expected to FAIL — multiple spawn-attempt events fire in the racing window before the post-spawn dedup (#640) catches them, and on loaded runners multiple spawn events can land. Once the spawn-coordination fix lands, drop the env-var gate so the test joins the standard integration suite as a permanent regression. Modeled on cli_single_daemon_per_session.rs (#323 regression test; same helpers, same log-inspection pattern) and on the synthetic daemon_burst_link_test.rs precedent from #729 / #733. Refs #691. Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
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
Adds a self-contained burst-load regression test for the #726 wedge class so it does not depend on FastLED running on the runner. Closes #729.
Two tests in
crates/zccache/tests/daemon_burst_link_test.rs:burst_compile_does_not_wedge_daemon(`#[ignore]`, integration). Fires N=200 concurrent `Request::Compile` invocations against one fresh `DaemonServer`. Asserts all complete, the daemon answers a follow-up `Ping` on a fresh connection, and the wall time stays under the 60s budget from test: synthetic ninja burst-link reproducer for #726 daemon graceful-shutdown under high concurrent link #729. No-ops when clang is not on PATH, matching the existing `daemon_stress_test.rs` pattern, so it joins the default integration suite. Burst width is tunable via `ZCCACHE_BURST_N`.`wedge_budget_default_survives_burst_window` (always-on). Documents the invariant the burst test depends on — the default wedge recv budget (fix(wedge): widen wedge budget + dedupe shutdown log under burst link load (#726) #727's 90s → 180s widening) must stay ≥ 150s, otherwise the burst test will flake on slow runners. Probes the env-var contract `ZCCACHE_WEDGE_RECV_TIMEOUT_SECS` rather than the private constant.
Local validation
Scope clarification
This test catches daemon-side regressions that would cause the wedge guard to fire (worker starvation, lock-held I/O like #724, persist-pool saturation). The guard's own CLI-side logic is still covered by the existing `wedge_detection_*` unit tests in `crates/zccache/src/cli/commands/wrap/ipc.rs`.
Test plan
Closes #729.
🤖 Generated with Claude Code