Skip to content

fix(ci): re-probe zccache before disabling recovery caching - #3972

Merged
zackees merged 4 commits into
masterfrom
fix/zccache-recovery-reprobe
Nov 8, 2026
Merged

zackees merged 4 commits into
masterfrom
fix/zccache-recovery-reprobe

Conversation

@zackees

@zackees zackees commented Nov 8, 2026

Copy link
Copy Markdown
Member

A transient zccache daemon failure currently disables caching for the entire recovery build based on the pre-restart status. Probe again after stopping the daemon and clearing cooldown markers; keep caching enabled only when the fresh daemon answers successfully. Failed probes retain the uncached retry and cache-healthy=false output. Each recovery prints exactly one == zccache re-probe: ok or == zccache re-probe: unavailable (exit N) line. The workflow save guard is unchanged.

Both status probes use timeout --kill-after=2s 5s: five seconds allows a local daemon to start without adding a long stall, with a two-second forced-kill grace. Only exit zero permits caching; timeout, missing command, unsupported subcommand and unknown failures disable it.

Validation:

  • RED commit ba16ef56b: uv run --no-project python -m unittest ci.test_zccache.RecoveryTest failed all three new tests (six failing assertions/subtests), including recovered daemon still exporting disable.
  • GREEN 1c3fb036b: uv run --no-project python -m unittest ci.test_zccache passes 25 tests. New tests: test_recovery_reprobe_succeeds, test_recovery_reprobe_fails, test_recovery_reprobe_errors_fail_closed (four error subcases).
  • bash -n rust/tools/linux-validate/validate.sh, uvx ruff check ci/test_zccache.py, and git diff --check exit 0.
  • ShellCheck is not installed or referenced in the checked repository tooling. Ad hoc uvx --from shellcheck-py shellcheck reports only the same baseline SC2086 (lines 84/202) and SC2054 (line 187) findings on master; --exclude SC2086,SC2054 exits 0. No recovery-block findings.
  • Only validate.sh and the existing test_zccache.py harness change. No Rust/C/API changes; Rust testing tiers do not apply. Fixtures execute the actual shell recovery block with fake zccache and build tools.

Handoff: leave this PR unmerged as requested. After merge, daemon recovery is stochastic: search merge-group Tier 2 logs with gh run view RUN_ID -R obs-rust/obs-studio --log | rg 'launcher failures:|zccache re-probe:'; look for a launcher failure followed by re-probe: ok, then confirm the retry succeeds. Live Tier 2 performance and hosted checks are not yet verified. Roll back by reverting this PR through the normal queue.

@zackees
zackees marked this pull request as ready for review November 8, 2026 03:06
zackees and others added 2 commits November 7, 2026 19:10
validate.sh now bounds zccache status with timeout(1), which execs a
program and cannot call the shell-function stub (exit 127). The script's
contract is right; the stub was not.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@zackees
zackees enabled auto-merge November 8, 2026 03:13
@zackees
zackees added this pull request to the merge queue Nov 8, 2026
Merged via the queue into master with commit f615b34 Nov 8, 2026
39 checks passed
@zackees
zackees deleted the fix/zccache-recovery-reprobe branch November 8, 2026 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant