Repository navigation
fix(meson): allowlist configure outputs, skip on no-op, purge on clear (closes #710) - #732
Merged
Merged
Conversation
… meson-configure on clear (closes #710) Three coordinated fixes for the FastLED stale-clang-PCH poisoning: 1. archive_dir now uses a strict allowlist (is_configure_output + is_configure_output_dir) — only build.ninja, compile_commands.json, and the meson-info/, meson-private/, meson-logs/ subtrees enter the snapshot. Everything else (target subdirs, *.obj, *.pch, *.input_hash, *.d.cache, *.dll, *.exe, .ninja_log/.ninja_deps, etc.) is skipped at the walker. Restoring an entry can no longer resurrect a built tree. 2. After meson returns, scan stdout for "Directory already configured." and skip the persist call. That was the entry path that captured a pre-existing built tree in the original repro — without something freshly produced, there is nothing legitimate to cache. 3. handle_clear now also removes cache_root/meson-configure/. Previously `zccache clear` left the (poisoned v2) snapshot directory untouched ("Artifacts removed: 0") and the same key hit again, making the poisoning self-sustaining. KEY_DOMAIN_TAG bumped v2 -> v3 so any existing v2 entries miss-out and are re-captured under the allowlist (and purged on next clear). No protocol change. Tests added inline in `meson_cache::tests` (6 new): - allowlist_keeps_meson_configure_outputs - allowlist_rejects_build_outputs_and_pch_sidecars - dir_allowlist_lets_walker_skip_target_subdirs - no_op_reconfigure_detected_in_stdout - no_op_detection_does_not_false_positive_on_normal_configure - archive_dir_only_captures_allowlisted_entries (the integration reproducer: synthesizes the exact #710 poison files and confirms the walker excludes them while still capturing the configure outputs) Closes #710. 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]>
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
Three coordinated fixes for #710 — stale clang PCH resurrected by
zccache meson configuresnapshot, silently defeating#pragma oncededup.1. Strict allowlist on
archive_diris_configure_output(rel)+is_configure_output_dir(rel)whitelist only meson-owned configure outputs:build.ninjacompile_commands.jsonmeson-info/**meson-private/**meson-logs/**Everything else is skipped at the walker —
*.obj,*.pch,*.input_hash,*.d.cache, target subdirs (tests/,examples/,subprojects/<sub>/build/), ninja state (.ninja_log,.ninja_deps). The poisoned-PCH restore path is gone.2. Skip persist on
"Directory already configured."When meson prints the no-op signal, nothing was produced this invocation — the build dir is whatever was already there. Persisting that state is what captured the built tree in the #710 repro. Now we detect the marker and short-circuit before persist with a
skip persist key=… reason=already-configuredlog line.3.
Request::Clearpurgescache_root/meson-configure/The poisoned v2 entries were self-sustaining:
zccache clearleft them in place and the same key kept hitting.handle_clearnow does a best-effortremove_dir_allon the meson-configure directory under the daemon's cache root.4. Cache key bump
v2 → v3Forces existing v2 entries (the poisoned ones the repro produced) to miss out and re-capture under the new allowlist. No protocol change.
Test plan
soldr cargo fmt --allsoldr cargo clippy -p zccache --lib --tests -- -D warnings— cleansoldr cargo test -p zccache --lib meson_cache— 6/6 pass, including:archive_dir_only_captures_allowlisted_entries— synthesizes the exacttests/test_pch.h.pch,*.input_hash,*.d.cache,examples/Blink/Blink.dllpoison files from the meson configure: snapshot captures build outputs from already-built dirs; restored stale clang PCH silently defeats #pragma once #710 repro and verifies they're skipped while configure outputs are keptno_op_reconfigure_detected_in_stdout— sample matches meson's actual no-op stdoutsoldr cargo test -p zccache --lib clear_handler— passes (no regression)soldr cargo build -p zccache --bins— cleanCloses #710.
🤖 Generated with Claude Code