Repository navigation
Description
Proposal
Add os.environ.setdefault(\"ZCCACHE_PROBE_BYPASS\", \"1\") next to the existing ZCCACHE_STRICT_PATHS=absolute line in ci/meson/runner.py::_start_zccache_session (currently line 406).
This opts FastLED in to the CLI-side fast-path that forge-ci/zccache#633 added for meson configure-phase try-compile probes. The bench in forge-ci/zccache#636 measured the gap:
| Mode | Cold | Warm/probe | vs bare |
|---|---|---|---|
| Bare | 0.96 s | 47 ms | — |
| zccache cache (default) | 4.92 s | 102 ms | 2.2× slower |
| zccache bypass (PROBE_BYPASS=1) | 1.34 s | 60 ms | 1.3× slower |
Unique-probe workload (every probe is a fresh source path with unique content, so cache hit rate is 0% and the cache only pays per-invocation overhead with nothing to amortise). With ~200 probes per FastLED meson configure run, expected saving is on the order of 7-10s per configure.
Why this is safe to set unconditionally
- Not a disable. Per feat(probe-bypass): opt-in CLI fast-path for meson-style tiny probes (#625) forge-ci/zccache#633, the routing decision is per-invocation. Production
.cppTUs that exceed the 4 KiB heuristic or use PCH continue to take the cached path normally. Only probe-shape invocations (single source < 4 KiB, no@rsp, no PCH) bypass. - Older zccache that doesn't recognise the env var ignores it (no error, no behaviour change).
setdefaultkeeps an existing user override intact.
Blocker: LOC guard on runner.py
I attempted the obvious one-line addition in _start_zccache_session but the PreToolUse LOC guard refused:
LOC guard: ci/meson/runner.py is 1632 lines (>1500). Split it into focused
submodules before continuing. Refactor target: < 1000 lines so the file has
headroom and future edits don't re-trip this guard or the warn threshold.
The file was already 1614 lines BEFORE the proposed edit — so any edit to it is blocked. I considered putting the env var setting in a smaller file as a workaround, but every alternative I evaluated splits the zccache env config across multiple locations (test.py, build.py, ci/meson/init.py, etc.). That's worse for maintainability than a one-line addition in the right place.
Two ways forward
- Skip the LOC guard for this single one-line addition (the guard's purpose is to push toward refactoring, and a one-line env-var addition does not meaningfully increase the cap-distance).
- Refactor runner.py first (split into
runner/main.py+ per-domain modules following thezccache-cliprecedent referenced by FastLED's CLAUDE.md). That's a substantial PR on its own; this issue should not block on it.
Recommend option 1 — the LOC guard's intent is to prevent further file growth, but a 1-line env-var addition is exactly the kind of additive change that wouldn't cause the file to spiral. The runner.py refactor can land independently.
What I'd add
os.environ.setdefault(\"ZCCACHE_STRICT_PATHS\", \"absolute\")
# Per zackees/zccache#625 / #633 / #636: opt in to the probe-bypass
# fast-path for meson configure-phase probes. Not a disable — production
# TUs > 4 KiB continue to use the cache normally. ~7-10s saved per
# meson configure run. Older zccache without this env var ignores it.
os.environ.setdefault(\"ZCCACHE_PROBE_BYPASS\", \"1\")Happy to open the PR if option 1 is acceptable. If option 2 is preferred, this issue should be marked blocked on the runner.py refactor.
🤖 Filed by an AI agent (Claude) following up on the cross-repo coordination from forge-ci/zccache#625.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
ci(meson): opt in to ZCCACHE_PROBE_BYPASS=1 for configure-phase probes (