ci: add protected coordinator token rotation - #1216
Conversation
|
Codex review: needs changes before merge. Reviewed August 1, 2026, 3:45 AM ET / 07:45 UTC. ClawSweeper reviewWhat this changesThe PR adds a manually dispatched GitHub Actions workflow that rotates the Cloudflare coordinator’s Merge readinessKeep this member-authored PR open for normal maintainer review. The source-level workflow is narrowly scoped and follows the repository’s existing protected-workflow pattern, but the production Priority: P2 Review scores
Verification
How this fits togetherCrabbox’s coordinator is a Cloudflare Worker control plane whose flowchart LR
A[Maintainer dispatch] --> B[Protected main workflow guard]
B --> C[Coordinator GitHub environment]
C --> D[One-time next-token secret]
D --> E[Wrangler secret update]
E --> F[Coordinator admin authentication]
Decision needed
Why: The checkout proves the workflow’s source guards and environment reference, but it cannot establish the repository’s live GitHub environment protection configuration. Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Remove the changelog addition, retain the guarded workflow and its static contract test, and merge only after maintainers confirm that the Do we have a high-confidence way to reproduce the issue? Not applicable; this PR adds an operator workflow rather than repairing a user-observable existing-behavior failure. Its static workflow assertions are present in the added script test and are included in the repository’s scripts CI job. Is this the best way to solve the issue? Yes, subject to the live environment-policy confirmation: the workflow reuses the repository’s existing protected-source guard and avoids passing the replacement token on argv. Removing the release-owned changelog entry is the narrower release-process path. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f793138a161e. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Related: #1208
What Problem This Solves
Resolves an operational problem where the coordinator admin token could not be rotated from the protected GitHub environment, leaving brokered image publication blocked when the existing token was unavailable locally.
Why This Change Was Made
Adds a manual, protected-default-branch workflow that reads a one-time next token only inside the
coordinatorenvironment and sends it to Wrangler over stdin. The workflow requires exact protected-source identity, keeps credentials out of checkout and dependency-install steps, and never places the token on argv.User Impact
Maintainers can rotate the production coordinator admin token without local Cloudflare credentials or exposing the token in workflow inputs. The staging secret can be deleted immediately after rotation.
Evidence
actionlint .github/workflows/coordinator-admin-token-rotate.ymlnode --test scripts/coordinator-admin-token-rotation-workflow.test.js scripts/workflow-action-pins.test.js— 3 passedgit diff --check