Repository navigation
perf(ci): cache the probe's proof, not its images, so a docs-only diff pulls nothing - #625
Merged
Merged
Conversation
…f pulls nothing What --probe establishes is "binary B execs inside image reference R". Every R here is digest-pinned, so that is a claim about immutable bytes: it cannot change while the digest does not. Re-establishing it on every pull request is what made this step pull roughly 8 GB from ghcr.io for diffs that were Markdown only. ghcr.io throttled those pulls anonymously on 2026-09-21, and again on 2026-09-22 with a working docker login, where the retry spent its whole 5/20/60 budget and the fourth attempt still failed. #607 fixed the anonymous half; measurement after it shows authentication alone does not clear the limit. In that run immich-server exhausted the budget and failed while postgres exhausted the same budget in the same minute and recovered, and the registry's own retry-after was 264 microseconds — so there is no honest number a longer pause could be derived from, which is why option 3 stays rejected (#602). So cache the proof rather than the image. The six ghcr.io images alone are over 6 GB and would take most of this repository's 10 GB cache budget and still have to be restored every run; the proofs are a few KB of digests. Nothing about the check weakens, and this is deliberately not the path filter #602 rules out twice: * --probe stays unconditional and still fails rather than skips with no daemon. Every target is still accounted for; one whose proof is not held is pulled and exec'd exactly as before. * ONLY digest-pinned references are cacheable, on the way in and on the way out. A tag can be moved under you between two runs; a digest cannot. * The cache carries a hash of this file, so editing the prober voids every proof it made rather than leaving stale verdicts in place. * restore-keys makes a pin bump cheap rather than total: the exact key misses, the prefix key restores the previous proofs, and only the digest that actually moved is pulled. The summary reports carried proofs separately from binaries exec'd, never folded into one number — they are different claims, and one count covering both is the "(24 fixtures)" problem #614 was about. Ten fixtures cover the reuse rules, because the failure mode is silent and one-directional: a cache trusted too readily prints the green line having probed nothing, which is the state --probe exists to eliminate (#79). They pin that a tag is never cached, that a proof from a different prober is discarded, and that a corrupt, malformed or missing cache is no proofs rather than an exception. Measured on all five stacks: cold 25 proofs in the usual time, warm 1 s with zero pulls and zero probes. `make validate` passes no cache path and is unchanged — a workstation's daemon already holds the images. Refs #602 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
What changed
check_compose_health.pygains--proof-cache <path>. CI restores it withactions/cacheand passes it to the probe step.make validatepasses no cache path and is unchanged.Why
What
--probeestablishes is "binary B execs inside image reference R". EveryRhere is digest-pinned, so that is a claim about immutable bytes — it cannot change while the digest does not. Re-establishing it on every pull request is what made this step pull roughly 8 GB from ghcr.io for diffs that were Markdown only.#607 fixed the anonymous half of #602. Measurement since shows that was not enough. On 2026-09-22, run 35776982436 with
ghcr.io: authenticated as Gerrrt:postgres:17-vectorchordexhausted the same budget in the same minute and recovered, whileimmich-serverdid not — the retry is a coin toss at this volume. And the registry's ownretry-afteris 264 microseconds, so there is no honest number a longer pause could be derived from. Option 3 stays rejected, now on measurement rather than on principle.Caching the images was the wrong shape. The six ghcr.io images alone are over 6 GB (
paperless-ngx2.5 GB,immich-server2.18 GB,immich-machine-learning1.29 GB, …). That is most of this repository's 10 GB cache budget, and it would still have to be restored on every run. The proofs are a few KB of digests.This is not the path filter #602 rules out twice
--probeunconditionalcheck_compose_health.py; a mismatch discards every entryrestore-keysrestores the previous proofs, so only the digest that moved is pulledThe summary reports carried proofs separately from binaries exec'd, never folded into one number — different claims, and one count covering both is the
(24 fixtures)problem of #614.Blast radius
.probe-proofs/is gitignored; it holds digests and binary names, nothing sensitive.Verification
Measured on all five stacks:
A moved digest re-probes exactly that image and nothing else:
Also:
--proof-cachewithout--probeis refused; editing the prober prints "proof cache was written by a different prober — proving again" and reproves all 7;make validategreen;lint.shandcheck_image_pins.pyclean.Ten new fixtures cover the reuse rules — 21 in this suite, 122 across the repo. They exist because the failure mode is silent and one-directional: a cache trusted too readily prints the green line having probed nothing, which is the state
--probeexists to eliminate (#79). They pin that a tag is never cached, that a proof from a different prober is discarded, and that a corrupt, malformed or missing cache is no proofs rather than an exception.What this does not settle
Whether it actually holds is a CI observation, not a PR claim — the same standard #607 was held to, and #607 did not survive it.
Refs #602, so the issue stays open until several pull requests have run clean. The first real evidence is this PR's own second run, when the cache is warm.actions/cache@v4is a new dependency; Dependabot'sgithub-actionsecosystem already covers it. #607 avoided an action where a plain command would do — here there is no plain equivalent.Refs #602
🤖 Generated with Claude Code