Skip to content

ci: deploy production only from the current main head - #61

Merged
fengmk2 merged 2 commits into
ci/no-cloudflare-secrets-for-bot-prsfrom
ci/production-deploys-main-head-only
Nov 13, 2026
Merged

fengmk2 merged 2 commits into
ci/no-cloudflare-secrets-for-bot-prsfrom
ci/production-deploys-main-head-only

Conversation

@fengmk2

@fengmk2 fengmk2 commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

The documented rollback was to re-run an earlier production run. A re-run deploys its original commit, and productionTarget.prepare then applies that commit's .github/production-repositories.jsonc to production D1. It re-enables namespaces that later commits withdrew, disables namespaces added later, and restores old pull request opt-ins. For example, re-running the 4e92504 deployment (run 39217251606) would turn pull request uploads back on for void, so unreviewed same-repository PR code could publish entries that void default-branch builds restore. Only a log line would show it.

  • Deploy targets get an optional verify hook. deployTarget calls it before setup changes anything and again just before prepare.
  • The production target's verify compares the run's commit with the current head of main, read from GitHub with git ls-remote. A run whose commit is not the head, including one where main advanced during check and smoke, stops before it changes production.
  • The workflow also fails before checkout when the commit is not the head, so a stale run fails early.
  • docs/e2e-plan.md documents rollback as a revert on main followed by a new run.

A re-run of a run made before this change uses that run's old workflow and scripts, so it is not checked. Don't re-run those runs. GitHub allows re-runs for 30 days, so the 4e92504 run stays re-runnable until about 2026-11-18.

🤖 Generated with Claude Code

@fengmk2
fengmk2 added this pull request to stack #62 November 13, 2026 05:31
@fengmk2
fengmk2 marked this pull request as ready for review November 13, 2026 06:14
fengmk2 and others added 2 commits November 13, 2026 14:40
The documented rollback was to re-run an earlier production run. A re-run
deploys its original commit, and that commit's
.github/production-repositories.jsonc then becomes the live policy: prepare
re-enables namespaces that later commits withdrew and restores old pull
request opt-ins. For example, a re-run of the 4e92504 deployment would turn
pull request uploads back on for void, and only a log line would show it.

Fail the production job before checkout when the run's commit is not the
current head of main, and document rollback as a revert on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review feedback: the workflow check ran before checkout, install, check, and
smoke. If main advanced during those steps, the run still applied the older
commit's repository list and pull request opt-ins.

Add an optional verify hook to deploy targets. deployTarget calls it before
setup changes anything and again just before prepare. The production target
compares the run's commit with the current head of main, read from GitHub
with git ls-remote. The workflow step stays as an early failure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fengmk2
fengmk2 force-pushed the ci/production-deploys-main-head-only branch from 81767e1 to a54b03c Compare November 13, 2026 06:43
@github-actions

Copy link
Copy Markdown

Remote cache staging

Commit: a54b03c6795212d3f6c45bbb36392d4c592be7d1

Cloudflare deployment is disabled. Configure the repository secrets and variables described in the e2e plan, then set REMOTE_CACHE_DEPLOY_ENABLED=true and rerun this workflow. No live deployment passed verification.

Manual checks and complete e2e plan.

@fengmk2
fengmk2 merged commit a5b5e59 into main Nov 13, 2026
6 of 7 checks passed
@fengmk2
fengmk2 deleted the ci/production-deploys-main-head-only branch November 13, 2026 06:54
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