Skip to content

docs(build-system): document explicit-input-declaration policy for external cache tools - #2762

Merged
zackees merged 1 commit into
masterfrom
docs/zccache-explicit-input-policy
Jun 5, 2026
Merged

zackees merged 1 commit into
masterfrom
docs/zccache-explicit-input-policy

Conversation

@zackees

@zackees zackees commented Jun 5, 2026 •

Copy link
Copy Markdown
Member

Summary

Codifies the design principle behind the recent zccache + meson-configure work (FastLED #2761, forge-ci/zccache#654 / #659) so future external-tool adoptions follow the same shape.

Rule: when an external tool builds its own cache key, declare inputs ourselves rather than let the tool auto-discover them.

Why this is worth a documented policy and not just inline comments: the principle generalizes. Any future content-addressable wrapper we adopt (zccache exec, soldr, an alternate compile-caching layer, a generated-source pipeline) is going to ship with some kind of auto-discovery layer and some kind of "I'll declare inputs myself" escape hatch. The historical default (let the tool walk) is convenient until the walk hits .venv/. The 5s → 0.6s win on FastLED's reconfigure path is the load-bearing example.

What lives in this section

  • The rule + the reasoning.
  • The two concrete instances: FASTLED_MESON_BUILD_FILES (the 7-entry meson.build tuple, paired with --no-walk) and _write_zccache_input_sidecar (FastLED's SourceHashes digest fed in as one more --input-file).
  • A 4-step checklist for applying the policy to future tools.
  • A counter-example — bounded include-scan resolution — so the rule isn't over-applied to non-walking tools.

Lives in the existing ## zccache section of agents/docs/build-system.md rather than external-tools.md (the latter is scoped to MCP servers and Claude plugins, a different concept).

Test plan

  • Docs-only change; no build-system behavior change.
  • CI passes (lint / formatting / markdown lint if applicable).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Enhanced build system documentation with guidance on explicit input declaration best practices.
    • Added practical examples and adoption checklist for improved build tool integration.

…ternal cache tools

Codifies the design decision behind FastLED's recent zccache work
(forge-ci/zccache#654 / #659 → FastLED #2761) so future external-tool
adoptions follow the same pattern.

The rule: when an external tool builds its own cache key, declare
inputs explicitly rather than let the tool auto-discover them.

Why: zccache's `meson configure` walk traversed `.venv/` (~100k Python
files, ~5s) on every cold-with-cache reconfigure. Switching to
`--no-walk` + an explicit 7-entry `--input-file` list of meson.build
paths, plus a sidecar carrying FastLED's `SourceHashes`, took cold-
with-cache reconfigure from ~5.6s (walked hit) to 0.62s (no-walk hit)
on master post-#2761.

Section adds:
- The rule statement with reasoning.
- The two concrete instances in `ci/meson/meson_setup_execute.py`
  (`FASTLED_MESON_BUILD_FILES`, `_write_zccache_input_sidecar`).
- A 4-step checklist for applying the policy when adopting future
  cache-aware tools: prefer no-walk modes, wire source-change
  detection via a caller-written sidecar, confirm cache-key
  namespacing distinguishes modes, probe by `--help` grep not
  version string.
- A counter-example (bounded include-scan resolution) so the rule
  isn't over-applied to non-walking tools.

Lives in the existing `## zccache` section of `agents/docs/build-system.md`
rather than `external-tools.md` (which is scoped to MCP servers /
Claude plugins, a different concept).

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@zackees
zackees merged commit 08292b5 into master Jun 5, 2026
1 check passed
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Jun 5, 2026
@coderabbitai

coderabbitai Bot commented Jun 5, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 970d48bc-5c33-4ce3-addb-038c135a3210

📥 Commits

Reviewing files that changed from the base of the PR and between 3f14434 and 4b1bc7a.

📒 Files selected for processing (1)
  • agents/docs/build-system.md

📝 Walkthrough

Walkthrough

The pull request adds a new "Decision: Explicit Input Declaration Over Tool Auto-Discovery" section to the build system documentation. It specifies rules for handling zccache integration with Meson, detailing explicit input enumeration using --no-walk with canonical meson.build file lists and sidecar hash files for source digests, plus a future adoption checklist.

Changes

Build System Documentation: Cache Input Strategy

Layer / File(s) Summary
Explicit Input Declaration Decision Documentation
agents/docs/build-system.md
Adds guidance on explicit input enumeration (via --no-walk and declared meson.build file lists) and sidecar hash mechanism for zccache/Meson integration, with concrete FastLED repo examples, future adoption checklist, and counter-examples of acceptable auto-discovery scenarios.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

A rabbit hops through build-cache lands,
With --no-walk held firmly in paws,
Explicit inputs, sidecars hand-in-hand,
No more discovery without reason or cause! 🐰✨
The build system learns restraint with grace.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/zccache-explicit-input-policy

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 and usage tips.

@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Jun 5, 2026
@zackees
zackees deleted the docs/zccache-explicit-input-policy branch August 21, 2026 19:15
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