Skip to content

docs(deploy): the Cloudflare token is two tokens, and the first staging deploys settled most of what the page listed as unverified - #189

Merged
aRustyDev merged 2 commits into
mainfrom
docs/deploy-token-names
Nov 15, 2026
Merged

aRustyDev merged 2 commits into
mainfrom
docs/deploy-token-names

Conversation

@aRustyDev

Copy link
Copy Markdown
Owner

What

docs/src/architecture/deploy.md was written before any environment had been deployed. This brings it in line with what the live staging runs of 2026-11-15 showed. Docs only. Refs: #49 (it does not close it: see "Still open" below).

The runs

Run What it showed
43676097831, first attempt a manual staging deploy of d16dbd6 deferred correctly, then deploy-do failed at assets-upload-session: the token held only Workers read permissions (the same call gave 403 before the owner added the write permission, and 200 after)
43676097831, second attempt created the Worker (version 9b0550ae), no smoke (first deploy)
43758233044 from a throwaway rc/manual-* branch at a767aadf: deferred to the manual gate (the previous bundle came from a run on main), approved, deployed, smoke and its control passed
43763466550 a deliberately wrong THRUST_HYPERDRIVE_ID: failed at the version upload with Cloudflare's code 10157, the previous version untouched
43763954773 the right id, same dispatch: deployed, smoke passed

What changes in the page

  • The Cloudflare token. The page said "Workers Scripts > Edit, and most likely Queues [unverified]" and "no zone permission", and the rotation entry said one token in all four environments. It is two tokens: staging and production hold Workers Editor (the picker's Workers role at its Editor level) + Queues Write, which updates the Worker and attaches the queue consumer but cannot create a Worker; the two -do-lifecycle copies hold Workers Admin + Queues Write. Neither has a zone permission, yet both pass Cloudflare's permission check for a Custom Domain write (the Custom Domain API is filed under Workers Scripts), so the domain is protected by review, not by the token. The picker cannot scope a Workers permission to one Worker. The infrastructure repository's runbook has the full table and how each token was measured (ApiraTech/infrastructure#1023).
  • The opening paragraph said no environment had been deployed. It now says what staging has done, including the first attempt's failure and its cause.
  • The previous release's bundle. Only a bundle from a run on an rc/* branch or a v* tag counts, so the first deploy after a version deployed from main always takes the manual gate (run 43758233044 did).
  • How a run ends: a wrong Hyperdrive id is a row in the table (code 10157, the previous version keeps serving).
  • "What the first staging deploy settles" becomes what was settled (the parser's shapes, the consumer with its dead-letter queue, the attestation flow, the protection-rule read, the route to the database and Access from a GitHub-hosted runner, verify-ca against a real Origin CA certificate, the wrong-id failure and its control) and what has not been shown.
  • The setup paragraph says the two copies of an environment hold the same values except CLOUDFLARE_API_TOKEN.

Still open (unchanged by this PR)

Verification

  • No other document states the token's scope (searched docs/ and the workflows).
  • The deps job's guard scripts, each run on its own: check-deps, check-topology (+ self-test), check-plane-500 (+ self-test), check-acceptance-list (+ self-test), check-placement, check-contract-counts --self-test, render-wrangler --self-test and lint-workflow on deploy.yml and the deploy action: all exit 0.
  • CI has no docs-specific check.

🤖 Generated with Claude Code

…ng deploys settled most of what the page listed as unverified

deploy.md was written before any environment had been deployed. The live runs of 2026-11-15 (43676097831 second attempt, 43758233044,
43763466550, 43763954773) settled or contradicted several statements:

- the Cloudflare token: it is a different token in the two copies of an environment. `staging` and `production` hold Workers Editor
  (the picker's Workers role at its Editor level) + Queues Write, which updates the Worker and attaches the queue consumer but cannot
  create one; the two `-do-lifecycle` copies hold Workers Admin + Queues Write. Neither has a zone permission, yet both pass Cloudflare's
  permission check for a Custom Domain write, so the domain is protected by review, not by the token; the picker cannot scope a Workers
  permission to one Worker. The old text said "Workers Scripts > Edit, and most likely Queues", "no zone permission", unverified;
- the rotation entry no longer says one token in all four environments;
- the opening paragraph said no environment had been deployed: it now says what staging has done, including the first attempt's failure
  and its cause (a token with only Workers read permissions);
- a bundle made by a run on `main` no longer counts as the previous release, so the first deploy after a version deployed from `main`
  always takes the manual gate;
- a wrong THRUST_HYPERDRIVE_ID fails the deploy with Cloudflare's code 10157 and leaves the previous version serving (a row in the table
  of how a run ends);
- "What the first staging deploy settles" is split into what was settled and what has not been shown (web-file retention over two
  real releases, and the rollback drill).

Docs only. The rollback-drill sentence ("No drill has been run yet") is still true and is unchanged.

Refs: #49
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@aRustyDev
aRustyDev merged commit 427bcb6 into main Nov 15, 2026
14 checks passed
@aRustyDev
aRustyDev deleted the docs/deploy-token-names branch November 15, 2026 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant