harden(ci): enforce the shared-cache contract#228
Conversation
|
Second-layer validation: #227 proved the cache-read mint and tenant attachment, then exposed Tectonic inheriting read-only |
|
Hosted attempt 1 crossed the shared-cache boundary successfully: token mint, cache attachment, Remote check, Tectonic, Vitest, and blog-agent tests all passed. The only red was //:puppeteer_chromium_smoke because /bin/chromium belongs to the GF executor image and does not exist on the shared-cache ARC runner. Commit c452c13 provisions the package-lock-pinned Playwright Chromium before Bazel starts, passes its absolute path explicitly through the wrapper, and adds a contract assertion for that argument. Local wrapper/Bazel contract checks pass; hosted CI is rerunning on this head. |
|
Coordination update: PR #227 merged into The completed #228 run still supplied useful evidence:
I am holding this PR until #227's trusted-main cache-write run settles, then will rebase it as a narrow residual hardening change: explicit cache upload policy, contract regression coverage, credential-safe browser provisioning, writable local action paths, and substrate-honest operator docs. No duplicate substrate migration will be merged. |
a547ab6 to
48cf2cf
Compare
Context
PR #227 established the immediate shared-cache migration on
main. Its trusted-main run29326131530exposed the remaining cold-local failure: about 30 concurrent actions, six Tectonic actions competing fordefault_bundle_v33resources, and three targets timing out under ARC-pod starvation. This follow-up keeps the migration and closes that cold-start gap.The GF consumer registry records this repository as
shared-cache-backed(1,191 cache hits, 0 remote processes). Normal CI must not claim or request executor-backed behavior.Residual hardening
mainDeliberately not included
rules_tectonicor public TeX-source changesHOMEorXDGoverrideValidation
bash scripts/test-bazel-cache-backed.shbazelisk --output_user_root=/private/tmp/blog-gf-cache-ci-cached-validation test --config=ci-cached --announce_rc //:bazel_cache_backed_contract--jobs=1,NODE_OPTIONS=--max-old-space-size=1024, and--local_test_jobs=1GF_BAZEL_HOST_JVM_MAX_HEAP_MB=2560becomes the startup option--host_jvm_args=-Xmx2560mand thatshutdownaddresses the matching serverbazelisk --output_user_root=/tmp/jess-ghio-bazel-codex-228 test //:bazel_cache_backed_contract //:bazel_graph_hygienenpm run test:bazel-graph-hygienebazel test //static/cv:pdfs_synced_test --config=ci-cached --remote_cache=git diff --checkactionlintparsed the workflow and reported only existing repository warningsHosted run
29348014079completed the serial Tectonic warm, then lost communication duringRemote checkwithout a retained source diagnostic. The next head made the failure class observable: run29350939534again completed the serial warm, then Kubernetes retained runner podjesssullivan-blog-dind-94p4h-runner-g8bhjas Failed with runner exit 137 and reasonOOMKilled; the dind sidecar completed normally afterward.Run
29352692909proved the first bound was too aggressive rather than disproving the approach. Chromium provisioning, cache attachment, the serial Tectonic warm, and every non-Bazel check passed. DuringRemote check, Bazel reached 5,854 of 5,858 actions while runningworkspace_package_checks, then its own 1024 MiB heap threwjava.lang.OutOfMemoryError: Java heap space; this was not a pod eviction. Run29357986080repeated the same Java-heap failure at 1536 MiB and 5,855 of 5,858 actions while live runner RSS peaked at 3552 MiB. The current head raises the Bazel cap to 2560 MiB, keeps one serialized Node action at 1024 MiB, and stops the server between phases so retained analysis state cannot accumulate across the full job.Run
29359644809then proved that resource split on the live 2 CPU / 8 GiB ARC pod: serial Tectonic warm,Remote check,Remote test, andRemote e2eall completed successfully, with the Bazel lane finishing in 45m22s. Whole-pod memory peaked at 6640 MiB duringRemote check, remained below the pod limit during browser e2e, and dropped below 1 GiB after the final Bazel shutdown while Actions cache compression ran.Final-head run
29362660354passed every required check on7a4cfcd. The initial attachment token and all four phase-local refreshes succeeded; warm, check, test, and e2e then passed, with Playwright recording 330/330 cases on the lockfile-pinned Chromium. This is the merge proof for the credential-refresh head.Fleet capacity is not owned by this repository and is therefore not encoded as a fixed number in source. A live recheck during the current run found the
jesssullivan-blog-dindrunner template at 2 CPU / 8 GiB; the repo-level caps remain deliberately lower and portable if the fleet is resized again.PR #229's unique safeguard is folded into this branch; #229 is superseded.