Repository navigation
feat(release): one gated Worker release, and the Pages and Strapi path removed (WP12) - #75
wojciechszyjka wants to merge 10 commits into
Conversation
…orker release (WP12)
…ard and the content selection (WP12)
…unified-site-publishing (WP12)
…ts full counts, the release job reads the build's variables (WP12 review)
…ge, no environment variables on www (WP12 review)
|
🤖
Waiver of 2. The release build and the harness builds come from the same commit, data and Validation at f88778e: |
WP12 of
docs/specs/2026-11-29-unified-astro-emdash.md(PR 56, Implementation Plan 4.1 and 4.3): the release and the cleanup.Status: complete. Main (with PR 71, the WP11 harness, and PR 74) is merged in. Merge this after PR 71, which it needs (RUNBOOK, the freeze day, step 2). Tracking plan: kept outside the repository (AGENTS.md rule 1), in the session notes (runs/wp12/PLAN.md).
The release
.github/workflows/release.ymlreplacespages.yml. Same triggers: afterwatch,syncandcollecton main, push to main, daily at 05:47 UTC, by hand. A code change and a data refresh each release a new version. No editorial trigger: a publication commits to D1 with the Worker in place.buildyarn build:workeronce, the files released clients read,wrangler deploy --dry-run, limits (10 MiB compressed, 20,000 assets of 25 MiB), the WP11 harness--no-browserjudged byyarn om release gate, upload of the kept buildreleasewww, main onlywrangler d1 migrations apply DB --remote,wrangler deploy --secrets-file(purge token), summary with the version idreal / calculator,real / e2e,stale / e2e,templates / e2e). The browser run is an owner step on the Mac (RUNBOOK, The release).workers_dev,preview_urlsor routes. The hosts move by the operator's switch.New:
lib/release/settings.ts,lib/release/gate.ts,lib/commands/release.ts(yarn om release settings|write|secrets|gate|limits), tests intest/release/.Settings that do not exist yet (named here, created by the infrastructure owner)
CLOUDFLARE_ACCOUNT_IDmcp-deploySITE_D1_DATABASE_ID,SITE_D1_DATABASE_NAMEDB)SITE_R2_BUCKETMEDIA)SITE_KV_IDSESSION)CF_ACCESS_TEAM_DOMAIN,CF_ACCESS_AUDIENCE/_emdash(team domain, AUD)OM_PURGE_ZONE_IDCLOUDFLARE_API_TOKENwwwOM_PURGE_TOKENwwwEnvironment
www: deployment branchesmainonly, the owner as required reviewer, no variables of its own (the release job stops when its variables differ from the build job's). The variables are repository variables because the build job decides without an environment. They are set only at step 6 of the freeze day, after production D1 holds the import, so the first release finds the site's migrations recorded.Removed from the production path
pages.yml(all eight jobs: deploy,www-snapshotpush,www-issue, both previews).cms.yml, thewww-contentjob ofvalidate.yml,yarn om www-content,yarn om www-pr-check,lib/www-cms/{source,snapshot,issue,pr-check}.tsand their tests.Kept, and why:
astro.config.ts,www/astro.config.ts,lib/emit/pages-merge.ts,lib/emit/pages-layout.ts,lib/commands/pages-site.ts,functions/,scripts/pages-smoke.sh: off the production path, but the WP11 harness builds the static Run and www sites as its parity reference,emdash-importreads the image derivatives ofdist-www, the Worker build reuses functions ofpages-merge.ts(redirect table, robots, sitemaps), and the route matrix baseline (WP00) is built from the Pages layout.package.json(build,build:run,build:www,astro check --root www) is WP01's.cms/,lib/www-cms/{files,model,pull,push,rest,strapi,tree}.ts,yarn om www-pullandwww-push:files.tsandmodel.tsare read by the EmDash import, andwww-pull --checkinspects Strapi for editor work the files lack on the freeze day (spec, Reconcile and import). Strapi is retired after the window (RUNBOOK, After the freeze day).RUNBOOK
"Main site content in Strapi", "Main site switch (C1 to C10)" and "push and prune" are replaced by Main site on the Worker (EmDash): the release, Setup (resources, variables, secrets), the freeze day in 11 steps (0 to 10), each with owner, command and pass check (freeze record, retire the Pages writer by merging this PR, final
webflow-exportand reconcile,emdash-import runtwice +verify+backup, load of production D1 and R2, first release, Access and owner bootstrap, switch www, switch the old hosts, editor checks and lifting the freeze), After the freeze day, Rollback (Access first, old hosts to the recorded Pages deployment, www to Webflow, purge, keep D1 and R2) and Recovery (bad edit, Worker version rollback, D1 Time Travel and R2 backup into new bindings, backups). The Pages-era sections carry a note that they describe the rollback target.The Delta is archived into
docs/specs/capabilities/unified-site-publishing.md, with "Frozen by" re-pointed to the Worker tests and the harness phases (test/www-cms/source.test.tsis gone with the Strapi source).Evidence (owner's Mac, sandboxed session, head 188393b with main 132d47f)
release.ymlrun step by step as GitHub runs it (bash -eo pipefail, no variables, no secrets) on data45cef12:Check release settingsexits 0,release=false, the summary "Not released. No release settings are set" with the 8 variables named;Build the Worker0;Check the Worker0 (release limits: 7377.62 KiB compressed, 3053 asset files);Run the harness0: the harness exits 3 and the gate reads "Harness: 16 checks ran and passed; 4 browser checks not run here are the owner's (RUNBOOK)." The release job does not start (release != 'true'); itsCheck secretsexits 1 naming what is missing.node scripts/worker-harness.ts --no-browser --data .data):worker harness: 16 of 20 checks passed, 0 failed, 4 not run. matrix: route matrix 280 of 284 (4 named, WP04), smoke 37 of 37, access 1940 of 1940, media 10 of 10; noindex: route matrix 280 of 284 (4 named); real: concurrent walk 2722 of 2722, run parity 6024 of 6024, editorial parity 164 of 168 (4 named, WP05), compare-live 168 of 168, seo 424 of 424, og cards 34 of 34, www build tests 184 of 184, og publish 13 of 13; publish: publish guard 35 of 35, outage 3 of 3, guard config 6 of 6. Not run: real / calculator, real / e2e, stale / e2e, templates / e2e (the owner's browser run, RUNBOOK, The release).yarn check: green (0 errors, Prettier clean,check-text: 827 files), withdist-workeranddist-wwwremoved (WP04 note).yarn test: 3166 passed, 10 failed in 4 files this PR does not touch (test/rentgen/golden,test/proxy/check-sh,test/receipts/presets-r2,test/receipts/harness): the sandbox refusesmktemp, the set PR 63 recorded on main.wrangler deploy --dry-runof a config written byyarn om release writewith made-up ids lists DB, MEDIA, SESSION, IMAGES, ASSETS, the Access vars andOM_PURGE_ZONE_ID, and no route.test/validate/workflow-run.test.tsruns the shell steps of both jobs with a fake yarn and a fake harness: no settings (the account id alone), all settings, another ref, a partial set, a failed check, no report, missing files, an unreadable data branch, release variables that differ from the build's, the order time travel, migrations, deploy, and the secrets file removed after the step.om-auto-review-pr): 1 blocker, 3 majors, 3 minors, 4 nits; the dispositions are in the PR comment. Fixed: the shared account id counted as a partial setup, the gate passing a check that counted nothing, the artifact retention, the release job reading other variables than the build, the two recovery paths. Waived: the harness rebuildsdist-worker/with its own environment, so the copy released getsCheck the Worker(files, server card, dry run, limits); a--distoption of the harness is a WP11 follow-up.Notes for owners of other paths
scripts/worker-harness.ts): an option to run the checks against a given build (--dist) would let the gate judge the exact copy released.package.json):build,build:runandbuild:wwwstay for the harness; nothing in CI deploys them.check-textstill listscms/srcandcms/config(harmless) and has nodist-workerinSKIP_DIRS(WP04 note).lib/emdash):emdash-importwrites only to local D1 and R2. The RUNBOOK loads production withwrangler d1 export --localandexecute --remote, then the objects of the backup folder withwrangler r2 object put. A command that does both and verifies against the remote would make step 5 shorter.mcp/wrangler.tomlstill mentionspages.ymlin a comment.