Repository navigation
ci: stop exporting the docker-smoke layer cache on pull requests - #506
Merged
Merged
Conversation
The Docker Smoke job wrote its buildx layer cache with `cache-to: type=gha,mode=max` on every event. On run 34225008423 (PR #492) the image build finished at 70.8s and the job was still in `exporting to GitHub Actions Cache` when the 13-minute bound fired at 827s. The smoke-test body never ran, so the PR went red on a step that asserts nothing about the code under review. GitHub Actions scopes a cache entry to the ref that created it: the default branch's entries are readable from every branch, but an entry a PR run writes is readable only by that same PR's later runs. This job runs once per head commit, so a PR-written entry is exported and then never read — pure cost on the critical path. Skip the export on `pull_request`. `cache-from` stays unconditional, so PRs keep reading main's warm cache and the ~200MB torch CPU-wheel layer is still not re-downloaded; on run 34217523633 (push to main, warm cache) the whole job took 242s with the export included. The `timeout-minutes: 13` comment cited "run 33951959734, max 369s" as its basis; today's 827s observation invalidates that as an upper bound. It is re-sourced to the warm-path steady state it actually bounds, and records explicitly that the cold `mode=max` export is removed rather than budgeted for. The two sibling Docker Build jobs already used `mode=min`; this job was the odd one out. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01StMBvNd7eVJGtpnC2zNsx1
cdeust
marked this pull request as ready for review
September 8, 2026 12:50
cdeust
pushed a commit
that referenced
this pull request
Sep 8, 2026
Brings in #506 (docker-smoke cache export skipped on pull_request), the fix for the Docker Smoke timeout that was the only red check on this branch's last run. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01StMBvNd7eVJGtpnC2zNsx1
pull Bot
pushed a commit
to asleekgeek/Cortex
that referenced
this pull request
Sep 8, 2026
Thirteen merged PRs (cdeust#475-cdeust#487, cdeust#506) and a full SCI-grounded energy harness under benchmarks/energy/ had no mention anywhere in the README. A reader had no way to know the programme existed, which also meant no way to hold it to its own evidence rule. The section states what the harness measures and, at equal length, what it does not: its own README opens by saying the fixtures do not measure device energy and do not establish an energy improvement, the carbon factors are mandatory operator inputs with no defaults, and the boundary is the sensor's CPU+GPU+ANE estimate excluding memory, storage, screen and power-supply losses. No energy figure is published, and the section says why: no energy results are committed to this repository, because a number measured on one operator's machine, region and duty cycle is not a property of the software. The demand-reduction paragraph is explicitly labelled a design rationale rather than a measurement, since no end-to-end token-savings or CO2 figure has been measured. The one quantitative claim is the already-committed hook boot constant (~0.05s vs ~0.6s registry import, measured 2026-07-28), cited to its call sites in mcp_server/hooks/auto_recall.py. check_doc_claims.py exits 0. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01StMBvNd7eVJGtpnC2zNsx1
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.
Problem
Docker Smoke (bare-container DB-less contract)went red on PR #492 — cancelled at its 13-minute bound before the smoke-test body ran. Same signature as the first attempt on #503.Reading the job log (run
34225008423, job102057139452) rather than guessing: the image built successfully (#20 exporting to docker image format … DONE 70.8s, image loaded). What then consumed the remaining ~12 minutes was the buildx cache export:So the PR was marked red by a step that asserts nothing about the code under review.
Measurement
Same job, same workflow, two contexts:
34217523633job10203279957134225008423job102057139452mode=maxexportThe existing
# source:ontimeout-minutes: 13cited "run 33951959734 (2026-09-05), max 369s". Today's 827 s observation invalidates 369 s as an upper bound.Root cause
cache-to: type=gha,mode=maxran on every event. GitHub Actions scopes a cache entry to the ref that created it:`` the default branch's entries are readable from every branch, but an entry a PR run writes is readable only by that same PR's later runs. This job runs once per head commit — so the PR-written entry is exported and then never read. Pure cost on the critical path.mode=maxalso exports every intermediate build stage, including the ~421 MB layer visible in the log above.Fix
Skip the export on
pull_requestonly:cache-fromstays unconditional — PRs keep reading main's warm cache, so the torch CPU-wheel layer is still not re-downloaded. The stated intent of the existing comment block is preserved.mode=max, at the measured 242 s steady state.Docker Buildjobs already usemode=min; this job was the odd one out.The condition is deliberately written
!= 'pull_request' && <value> || ''rather than== 'pull_request' && '' || <value>: GitHub expressions return the operand rather than a boolean and the empty string is falsy, so the latter form falls through to<value>on every event and disables nothing. That pitfall is called out in a comment beside the line.timeout-minutes: 13is kept and re-sourced to the warm-path steady state it actually bounds, recording explicitly that the cold export is removed rather than budgeted for.What is NOT changed
The
BLOCKINGcontract this job asserts is untouched — it still builds the bare repo and runstools/listwith zero env vars and zero external services. Nocontinue-on-error, no skip, no test disabled.Verification
actionlintv1.7.12 (the version pinned inci.yml, checksum-verified release binary) — clean onci.ymlpython scripts/check_ci_gate_complete.py— OK (no job names change)python scripts/check_craftsmanship.py --base origin/main— OKpython scripts/check_doc_claims.py,check_version_surfaces.py— OKruff check .,ruff format --check .— cleanThe real proof is this PR's own
Docker Smokerun: it exercises thepull_requestbranch of the new condition.🤖 Generated with Claude Code
https://claude.ai/code/session_01StMBvNd7eVJGtpnC2zNsx1
Generated by Claude Code