docker: correct the sibling-clone cache claim, which cost an outage - #130
Conversation
The comment above the sibling `git clone` layer asserted that "each build re-clones fresh (no stale-cache problem the old pin was guarding against)". That is true per q2 COMMIT and false per DEPLOY, and the difference is a production outage. Docker busts a layer when an INPUT changes. The sibling repos are not inputs — nothing in this file can observe that lance-graph's HEAD moved — so a redeploy of the same q2 commit reuses whatever clones the last build happened to take. Measured today. Merging q2 #129 and OGAR quarto-dev#268 in the same minute started a build whose lance-graph clone carried a codebook mirror one concept short of OGAR's `class_ids::ALL`; `lance-graph-ogar`'s COUNT_FUSE panicked at const-eval (E0080) and the deploy died at COMPILE, never reaching hydration. lance-graph #953 fixed main eight minutes later — and the redeploy reproduced the identical failure, because this layer served a lance-graph that no longer had the bug anywhere but in Docker's cache. Records the trap, the diagnostic ("a sibling that is demonstrably green on main fails the build -> suspect this layer first"), and the two escapes: any q2 commit busts COPY and therefore this, or redeploy with the cache disabled. Names the durable fix without making it: either explicit SHA ARGs bumped deliberately (reproducible, staleness visible in the diff) or removing the hand-maintained mirror entirely via hotplug enumeration. Both are architectural calls; a comment is not one, and this commit does not pretend otherwise. This commit also busts the COPY layer, so the next deploy clones fresh siblings and should build against the already-green lance-graph main. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NMeiLmtDKhomJNSo2ecbJw
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_d1d1f1d7-5619-433e-b0e1-8032fc1de972) |
|
Warning Review limit reached
Next review available in: 115 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Dockerfile documentation now explains sibling dependency cache reuse across redeploys, a resulting compile failure, diagnostic steps, and cache-busting or dependency-pinning options. Docker build behavior is unchanged. ChangesDocker cache documentation
Estimated code review effort: 1 (Trivial) | ~3 minutes Merge Risk: ⚪ Minimal · up to This change only documents Docker cache behavior and does not alter build or runtime behavior; no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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. Comment |
…oves Upgrades the previous commit from documenting the trap to closing it. Four `ADD`s of each sibling's commits atom feed run before the clone. Docker re-fetches an ADD-from-URL every build and hashes the RESULT, so the clone layer now busts exactly when a sibling moves and stays cached when none did — restoring "latest of everything" to being true per DEPLOY rather than per q2 COMMIT, which is the property the old comment claimed and did not have. THE ATOM FEED, NOT github.com/ghapi, and that choice is load-bearing. Unauthenticated github.com/ghapi allows 60 requests/hour PER IP and CI builders share egress IPs, so the API form would eventually 403 — and a failed ADD FAILS THE BUILD. That swaps a stale cache for a brand-new outage cause, which is the opposite of the intent. The atom feed is served by the web frontend, is not under that quota, and its entries carry commit ids, so its content changes when and only when HEAD does. Verified rather than assumed: the feed returns 200 unauthenticated, and its first entry is bfc4f6db700b17943967a86f196cbd040f57a333 — byte-identical to lance-graph's current origin/main. (It 403s from the dev sandbox, which is that environment's egress policy, not GitHub's; the same URLs the `git clone` lines already fetch without credentials.) The failure direction is also the safe one. If the feed ever changed without HEAD moving, the cost is extra fresh clones — slower, still correct. The API form's failure mode was a red build. Still NOT the deeper fix: explicit SHA ARGs bumped deliberately, or removing the hand-maintained mirror via hotplug enumeration so the fuse's whole failure class disappears. Both are architectural calls and stay the operator's. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NMeiLmtDKhomJNSo2ecbJw
⚠ The review above predates the commit that changes build behaviourCodeRabbit reviewed
ADD https://github.com/AdaWorldAPI/lance-graph/commits/main.atom /tmp/rev/lance-graph.atom
ADD https://github.com/AdaWorldAPI/ndarray/commits/main.atom /tmp/rev/ndarray.atom
ADD https://github.com/AdaWorldAPI/OGAR/commits/main.atom /tmp/rev/OGAR.atom
ADD https://github.com/AdaWorldAPI/openstreetmap-website-rs/commits/main.atom /tmp/rev/osm-website.atomSo please don't merge this on the strength of "documentation only" — that describes the first commit, not the PR. What the added lines doDocker re-fetches an The two things worth reviewing
Verified rather than assumed: the feed returns Still deliberately not doneSHA-pinned siblings, or removing the hand-maintained codebook mirror entirely via hotplug enumeration — which would delete this failure class rather than detect it faster. Both are architectural calls and stay the operator's; this PR is the narrow fix. Generated by Claude Code |
Merging this also unblocks the deploy — see the last section. Not draft for that reason.
The false claim
The comment above the sibling
git clonelayer said:That is true per q2 commit and false per deploy. Docker busts a layer when an input changes, and the sibling repos are not inputs — nothing in the Dockerfile can observe that
lance-graph's HEAD moved. A redeploy of the same q2 commit therefore reuses whatever clones the previous build happened to take.What it cost, today
osm_street_nodetoclass_ids::ALL.lance-graphclone carried a codebook mirror one concept short, solance-graph-ogar'sCOUNT_FUSEpanicked at const-eval:main.lance-graphthat no longer had the bug anywhere except in Docker's cache.Roughly two hours of the outage was spent diagnosing hydration and volume capacity for a build that had never produced a binary.
What this changes
Comment only — no build behaviour. It records the trap, the diagnostic (a sibling that is demonstrably green on
mainfails the build → suspect this layer first), and the two escapes: push any q2 commit, or redeploy with the cache disabled.It also names the durable fix without making it: either the siblings become explicit SHA ARGs bumped deliberately (reproducible, staleness visible in the diff), or the cross-repo invariant stops being a hand-maintained mirror at all — the hotplug-enumeration direction, which deletes this failure class rather than detecting it faster. Both are architectural calls; a comment is not one, and this PR does not pretend otherwise.
Why merging it unblocks the deploy
The commit modifies a file under
COPY . /build/q2, so it busts that layer and every layer after it — including the sibling clone. The next deploy clones fresh against the already-greenlance-graphmain.If the build still fails after this, the cache is exonerated and the next candidate is the volume-capacity risk recorded in
claude-notes/plans/2026-08-13-brandenburg-bake.md(4.13 GB of artifacts, no free-space preflight inosm_slab_hydrate) — and the deploy logs will name it directly.Generated by Claude Code
Summary by CodeRabbit