Skip to content

test(zccache): name the miss_reason when the warm hit assertion fails (#1757) - #1758

Merged
zackees merged 1 commit into
mainfrom
fix/zccache-hit-diagnostics
Oct 27, 2026
Merged

zackees merged 1 commit into
mainfrom
fix/zccache-hit-diagnostics

Conversation

@zackees

@zackees zackees commented Oct 27, 2026

Copy link
Copy Markdown
Member

Problem

zccache_embedded_smoke::embedded_compilation_cold_miss_then_warm_hit flakes on
Windows (#1757). When it fails, the only signal is cached: false —
it does not say why the second identical compile missed, so the failure has to
be re-derived by hand from a runner that has already gone away.

Change

On failure, dump every *.jsonl journal under the service's cache root into the
assertion message:

  • logs/compile_journal.jsonl records outcome and miss_reason in
    zccache_daemon_core::daemon::compile_journal's closed vocabulary
    (destination_write_failed, source_changed, …).
  • the lifecycle log records the raw OS error alongside
    destination_write_failed.

The walk is depth-bounded (6 levels, 200 KB cap) rather than a fixed path,
because an embedded service keeps its journals under
daemon-state/embedded-*/<version>/logs/, not directly under the cache root.
When nothing is found the message says so and prints the root it searched, so an
empty dump is distinguishable from an absent journal.

Verification

Compiles against the current pinned zccache rev
(cargo check -p fbuild-build --tests, exit 0). The smoke test itself passes when
run against the zccache fix for #1757 (forge-ci/zccache#1999): both
embedded_service_starts_and_shuts_down and
embedded_compilation_cold_miss_then_warm_hit pass.

Diagnostics only — no behaviour change on the passing path.

…#1757)

The embedded cold-miss-then-warm-hit smoke test failed on Windows with only
`cached: false`, which does not say *why* the second compile missed. Dump every
`*.jsonl` journal under the cache root into the assertion message: the compile
journal records `outcome` and `miss_reason` in zccache's closed vocabulary, and
the lifecycle log records `destination_write_failed` with the raw errno.

The walk is depth-bounded because an embedded service keeps its journals under
`daemon-state/embedded-*/<version>/logs/`, not directly under the cache root.
@coderabbitai

coderabbitai Bot commented Oct 27, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@zackees
zackees added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 9739e45 Oct 27, 2026
26 checks passed
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Oct 28, 2026
@zackees
zackees deleted the fix/zccache-hit-diagnostics branch November 5, 2026 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant