Repository navigation
ci: add a ci.toml cache policy sized against the measured live footprint - #218
Merged
Merged
Conversation
reld had no ci.toml, so nothing bounded its Actions cache growth and 'ci-lint cache audit' could not classify a single entry. Measured 2026-10-05 against the live repository: 34 entries, 5276149159B (4.91 GiB). Every [cache.family] max is sized at or above the family's live sum, not just its largest entry, because 'ci-lint cache janitor' LRU-trims an evict = "lru" family at max x cardinality and under-stating max would delete live caches. - cross-prepare and compile declare per-shape ceilings (their entries differ 135MB..635MB and 126MB..302MB), so CACHE-004's footprint is the honest sum. - evictions verified safe: 'cache janitor --dry-run' proposes zero LRU deletions across every declared family. - [cache.promote] mode = "off": setup-soldr's ancestor promotion is an unreleased opt-in pilot, so declaring it would promise nothing (CACHE-030). - [cache.pr] mode = "none": PRs write no cache in these workflows. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
zackees
added a commit
to forge-ci/ci.yml
that referenced
this pull request
Oct 5, 2026
…t blocks it (#344) **Merged:** forge-ci/reld#218 (ac71f0b), worst case 5.92 GiB against a 9.5 GB budget. 7 entries stay undeclared -- no via exists for msys2-pkgs, llvm-ld-coff, linkers-Linux or setup-soldr-targetcache-thin-v2. **Open drafts:** - forge-ci/bosn#513 -- draft because adding a ci.toml surfaces **461 pre-existing findings** (LAYOUT-001 x208, SEC-004 x148) that were invisible while there was no ci.toml. The agent also corrected my premise: bosn is NOT 221 distinct builds. It is 13 live build-cache entries under 4 toolchain digests -- setup-soldr#237 deliberately dropped the per-commit SHA so caches survive across commits -- plus 196 tiny ci-lint attestation caches. A janitor dry-run plans 9.86 -> 2.07 GB. - zackees/mimalloc-pprof#603 -- draft because a local gate exists. Declared families fit at 8.02 GiB vs 9.5 GB, but 3.58 GiB (42%) is UNDECLARABLE, see below. - FastLED/fbuild#1652 -- fits at 9.75 GB against 9.5 GB, 448 MB headroom. **Structural:** FastLED/FastLED#4703 applies `save: 'false'` on PR board jobs so they restore without writing. It does NOT apply `cache-mode: 'split'` -- verified available (it is on fbuild main and FastLED pins @main, a floating ref) but genuinely broken: setup runs before the compile step synthesises platformio.ini, and fbuild install hard-fails on apollo3_red, clone and kitchensink. Shipping it would turn board jobs red. Stops the leak at ~120 GiB; does not reach 10 GiB. **A bug in my own #334**, found independently by the reld, fbuild and mimalloc-pprof agents: `shapes` made CACHE-004 sum the shape maxima while `_lru_evictions` still used `max x cardinality(per)`. Where they diverge the janitor is stricter, so it evicted live entries precheck had approved. Fixed in #343; both paths now call `family_footprint`. **Next blocker, now the top ci.yml item:** `ALLOWED_VIA_VALUES` has no entry for shapes setup-soldr actually emits, so they can never be declared and are reported undeclared forever -- setup-soldr-targetcache-thin-v2-, setup-soldr-prepare-* without its v3 segment, setup-soldr-tarball-*, setup-soldr-cargo-registry-v2-*, cook-base-v1-*. That is 42% of mimalloc-pprof's cache and blocks reld and fbuild too. Refs #153, #334, #343 Local-Gate: v1 tree=d3697bb3c8052b2e0a9ad339e012e0772ca4c929 secs=73
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.
Adds
ci.toml(schema 3) declaring reld's Actions cache policy. reld had noci.toml, so nothing bounded its cache growth andci-lint cache auditcould not classify a single entry.Every
[cache.family]maxis sized against the family's live sum, not just its largest entry.ci-lint cache janitorLRU-trims anevict = "lru"family atmax × cardinality, so under-statingmaxwould delete live caches. Verified:cache janitor --dry-runproposes zero LRU deletions across every declared family.Before / after
[cache].budgetHeadroom 3.58 GiB under GitHub's 10 GB cap.
[cache.pr] mode = "none"— these workflows write no PR-scoped cache, so the PR term is 0.The
check_cache_004linePer family:
setup-soldr:cross-targetssetup-soldr:build-cachesetup-soldr:solo-toolchainsetup-soldr:cooksetup-soldr:cargo-registrysetup-soldr:soldr-minisetup-uvcross-prepareandcompileuse the per-shape form (forge-ci/ci.yml#334) because their entries really do differ (cross-prepare: 135 MB for win-gnu vs 635 MB for the four large targets). Note the shapes feed CACHE-004's sum, but the janitor still usesmax × cardinality, somaxis set to the largest shape andperover-counts platforms in both cases.Validation (ci-lint @
92106df3)load_ci_toml— 0 schema findingscheck_cache_004— 0 findingscheck_cache_029— 0 findingscheck_cache_030— 0 findingsci-lint cache audit(live,GITHUB_REPOSITORY=zackees/reld) — 27/34 entries classified into declared families, budget at 51.7%. No CACHE-004, no GEN-009.Notes for the reviewer
[cache.promote] mode = "off"is deliberate. setup-soldr's nearest-ancestor promotion (#566) is an unreleased opt-in pilot —auto-keydefaults to"false"and no fleet repository has a livesetup-soldr-ancestor-build-v1-*entry. Declaring"ancestor"would be a promise nothing implements, which is exactly what CACHE-030 flags.No
[local.gate]is declared. reld has nolocal-gate.tomland nolocal-gatesurface today, soci_lint.local_gate.load_gate_configreturns no config with this file present (verified). Adding gate keys would have switchedci-lint local-gateto reading gate config from here and demanding a complete gate definition.7 entries (251 MB) stay undeclared and surface as CACHE-001:
msys2-pkgs-*,llvm-ld-coff-*×3,linkers-Linux-*×2,setup-soldr-targetcache-thin-v2-*. These come from third-party actions (msys2/setup-msys2) and reld's ownci/scripts, andci_lint.cache.families.ALLOWED_VIA_VALUEShas no shape for any of them — declaring them would need a newFamilyShapeentry cited against the producing action's source, which is a zackees/ci.yml change, not a reld one. Until thenci-lint cache janitorwould delete them as undeclared; I have not run it.One poisoned entry.
setup-soldr-targetcache-thin-v2-...is 222 B, at or below the 1024 B poison-guard floor (CACHE-005). It needsci-lint cache heal --key <key>so the next writer run repopulates it — not done here.Platform list grew to 9.
solo-toolchainhad 8 live entries, which tripped CACHE-004 againstper = "platform"at 7 declared platforms. Rather than delete entries or overstate amax, the platform list now includes the musl targets reld'srelease.ymlgenuinely builds (x86_64/aarch64-unknown-linux-musl) — 9 platforms,per = "platform"→ 9 ≥ 8.macos-x64is recorded as cross-building fromwindows-2022, which is whatrelease.ymlactually does.🤖 Generated with Claude Code