Repository navigation
ci(build): the wasm job: the deploy bundle's two Workers in release at pull-request time, under the bundle's cache key (Build phase, stage 2) - #356
Merged
Conversation
…t pull-request time, under the bundle's cache key (Build phase, stage 2)
build.yml gets its second job. wasm builds the Worker as it ships (worker-build --release . --no-default-features, in crates/worker) and the edge Worker (worker-build --release ., in crates/edge) for wasm32-unknown-unknown, with the commands and directories build-bundle builds them with (the wiring test holds each pair equal), checks that each wrote worker/shim.mjs, index.js and a non-empty index_bg.wasm, and uploads both for three days. Nothing but build-bundle built the edge Worker in release before a release candidate; the Worker as it ships is built by the ten worker-cf cells too (wrangler.toml's command is the bundle's), and the job builds it again on purpose, for the cache and the artifact.
The cache key is build-bundle's, deploy-release, and main saves it. The bundle runs on an rc/* branch or a tag, whose caches nothing else reads, and it never saved one, so every bundle compiled worker-build from source (106 s of its 297). In a warm Worker cell the same install line takes 0.4 s ("already installed"), and worker-build has no prebuilt binary to fetch instead: workers-rs's releases have no assets and its manifest no binstall metadata. The job is planned when thrust-worker or thrust-edge is affected (the edge crate alone is tested in a graph where the Worker does not depend on it).
Tests and controls: test_plan_ci.py 7058 checks; test_workflow_wiring.py 208 (the bundle's commands equal line by line, the cache key's two users, the files checked, the upload, no secret); mutate_gate.py 341 of 341 killed (it was 313), the 12 that change nothing survive; the check's own text, taken from build.yml, fails for each of the six files missing or empty and passes for all six (16 cases); ci-commands.py against main: one job appears, the verdict's jobs line changes, none is gone. The action build-web that the phase document said would be made is not: the owner deferred it on 2026-11-17 (the record of #258), and the document is corrected.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… the Build plan on build-web cicd.md gets the wasm job in the build.yml row, the planner rule, the examples re-run through the planner (a Worker change now plans wasm) and the counts that moved (208 wiring checks, 341 mutants). running.md gets the row of wasm and a runbook for it (a compiler error, worker-build writing no file, a slow run that is a cache not restored). The workflows index names the job. phases/0004-build.md said that Build would create an action build-web for the web app's build without asking, as an exact duplicate in web.yml, build-bundle and contract-pass-tools. It is not: the owner decided on 2026-11-17 (the record of #258, phase 0002) that the copies are the same commands but not an exact copy, and deferred the action to the Web and E2E phases. The document now says so and that Build does not touch it. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
aRustyDev
temporarily deployed
to
preview-control-plane
November 23, 2026 03:20 — with
GitHub Actions
Inactive
…he survey, the control, and what is not yet measured Stage 2's section in phases/0004-build.md. The cold job is 238 s (run 45105438353): checkout 5.8, setup 13.8, cargo install worker-build 110.7 (47% of the job), wrangler 7.4, the Worker 74.1, the edge Worker 16.9, the check and the upload 2.6; the Worker's wasm is 5.2 MB, the edge's 0.68 MB. The numbers are the deploy bundle's own (106, 73, 17 and 7.5 s in run 45084816796), which is what holding the commands equal should give. worker-build has no prebuilt binary (workers-rs's releases have no assets, its manifest no binstall metadata), so compiling it is avoided only by the cache, which in a warm Worker cell makes the same install line take 0.4 s. The survey names the candidates and why none replaces it; the one hand-written piece, the check that worker-build wrote its three files for each Worker, has a control (16 of 16 cases, taken from the file's own text). What is not yet measured is said so: the warm time and whether the bundle restores the cache follow the merge, because the cache is saved on main only. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
aRustyDev
temporarily deployed
to
preview-control-plane
November 23, 2026 03:33 — with
GitHub Actions
Inactive
aRustyDev
enabled auto-merge (squash)
November 23, 2026 03:33
aRustyDev
added a commit
that referenced
this pull request
Nov 23, 2026
…): 238 s cold, 79 s warm, and the bundle restores the cache (#359) After #356 merged, main's run saved the cache deploy-release (249.3 MB) and a dispatch of build.yml on main with the plan wasm measured the warm job: 79 s against 238 s cold, the worker-build install 110.7 s to 0.85 s, the Worker 74 s to 44 s, the edge Worker 17 s to 3 s. The stage's purpose was the bundle, and a probe (#358, closed unmerged, a comment in build-bundle) made release.yml and deploy.yml run it in their dry runs: both restored the cache and found worker-build already installed. deploy.yml's build took 165 s (an rc build was 310 s and a dry run 313 s), release.yml's 176 s (the tags v0.4.0 and v0.3.0 were 328 and 341 s): about 145 to 165 s less on a path a release candidate and a tag wait for. The native migrate build is not helped (30.4 s, the cache holds wasm32 dependencies) and the web build is unchanged. What it does not show is said: a pull request's dry run stood in for a release candidate and a tag, which restore the default branch's cache by GitHub's rule, so the first real release candidate proves it; the nightly full run restores the key daily, which keeps it from the seven-day eviction. Passes 6 and 7 change nothing, with numbers: the job is on no critical path (a full run is 711 s, set by the e2e cell), and the one waste in it, the wrangler install (7.8 s, no command calls it), would cost a change to the action every Rust job shares and to the attested bundle build, for 0.15% of a full run. The status lines say stage 2 is done and stage 3, macos, is next. Co-authored-by: Claude Sonnet 5.5 <[email protected]>
This branch was previously deployed
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.
Stage 2 of the Build phase (
.agents/plans/ci-workflows/phases/0004-build.md): the jobwasminbuild.yml. It builds the two Workers the deploy bundle ships, in release forwasm32-unknown-unknown, with the bundle's own commands (the wiring test holds each command and directory equal tobuild-bundle's), checks that each wroteworker/shim.mjs,index.jsand a non-emptyindex_bg.wasm, and uploads both for three days. It publishes, signs and attests nothing and has no secret, environment orid-token.Why a job at pull-request time, and why under the bundle's cache key
build-bundlebuilds it. The Worker as it ships is already built at pull-request time by the tenworker-cfcells (theirwrangler.tomlbuild command is the bundle's), and with its default features by the sixworker-memorycells; this job builds it again on purpose, for the cache and the artifact. I first wrote that the cells build only the default features: that was wrong, I read the configs, and the comment and the runbook say what is true.worker-buildfrom source and 73 + 17 s build the Workers. Its cache key,deploy-release, has never been saved, because the bundle runs on anrc/*branch or a tag, whose caches nothing else reads, and it saves none. This job runs on pull requests and onmain, and saves the same key onmain. In a warm Worker cell the same install line takes 0.4 s ("Ignored packageworker-build v0.9.0is already installed"). There is nothing else to fetch:workers-rs's releases have no assets andworker-build's manifest has nobinstallmetadata.mainto have saved it. The record after the merge will measure it with a dry run of the bundle.Also in it
build-web, for the web app's build, "created without asking" as an exact duplicate. It is not: the owner decided on 2026-11-17 (the record of ci: move the supply-chain check into security.yml, and make the verdict job's steps an action (migration M2) #258, phase 0002) that the copies are not exact and deferred the action to the Web and E2E phases. The document now says so, and Build does not touch it.plan-ci.py: the jobwasm, planned whenthrust-workerorthrust-edgeis affected (the edge crate alone is tested in a graph where the Worker does not depend on it);buildnow holdslinuxandwasm.Evidence
test_plan_ci.pytest_workflow_wiring.pymutate_gate.pybuild.yml, fails for each of the six files missing, for each empty, for one Worker only and for none, and passes for all six: 16 casesci-commands.pyagainstmainPARITY:wasmappears, the verdict'sjobsline changes, none is gonedepsjob,deny,fmt, both clippy runstest-ci-scripts.sh(dash), the workflow lint, the index guard,actionlintwith its control, the bookThe measurements of the job on a runner (cold, then warm), whether the bundle restores the cache, and passes 5 to 7 come after the first runs and the merge; they go in the phase document.
🤖 Generated with Claude Code