Skip to content

ci(deploy): stop deploy-web.yml claiming things it does not do - #779

Merged
thinkclay merged 1 commit into
mainfrom
fix/772-773-honest-deploy
Sep 17, 2026
Merged

thinkclay merged 1 commit into
mainfrom
fix/772-773-honest-deploy

Conversation

@thinkclay

Copy link
Copy Markdown
Contributor

Four claims in one file, none of them true. Track C of #778.

1. The approval gate (#772). The job carried

# Environment gate — production requires manual approval

Required reviewers on an environment are a paid feature for private repos and
this org is on Free. All three environments report protection_rules=0, and no
secret is environment-scoped either — 39 repo secrets, 0 environment secrets —
so environment: bought the Deployments record and nothing else. It is the kind
of comment read just before deciding a push is safe.

2. The prod trigger (#772). prod was a push: trigger while sitting 479
commits behind main, last touched 2026-04-21, having never triggered this
workflow once. Production has always shipped from
scripts/deploy-web-eas.sh prod, which asks you to type deploy prod and
invalidates CloudFront. The trigger was a loaded gun behind a false assurance,
so it is gone, along with the --prod branch in the deploy step.

3. The edge-function step (#773). It had never deployed a function, to any
environment, once. It selected its project from DEV_SUPABASE_BRANCH_ID /
PREVIEW_SUPABASE_BRANCH_ID, neither of which exists, so its own guard fired
every run —

⏭️ Supabase secrets not configured — skipping edge functions

— under a continue-on-error: true that would have hidden a real failure too.
The visible cost: web deploys advanced while the API sat at whatever the last
manual run left, which on preview meant a new frontend against a three-day-old
API with nothing saying so. Removed, per #778's recommendation, rather than
reimplemented worse than scripts/deploy-functions.sh — which does twelve
functions to CI's three, bakes GIT_COMMIT so /v1/health reports it, and runs
smoke-remote.sh after, failing on skew.

4. The dispatch input. workflow_dispatch offered a production choice
that nothing read — every target came from github.ref, so dispatching
"production" from main deployed dev and said nothing. Found while fixing the
other three. The input now decides, production is no longer offered, and the
target is computed once into DEPLOY_TARGET instead of re-deriving
github.ref == ... across fifteen expressions.

The auth-URL step had the same dead-secret bug as the function step and has also
never run. It now takes the project ref from the same mapping
scripts/deploy-functions.sh publishes in plain text — these are not secrets —
and fails loudly if SUPABASE_ACCESS_TOKEN is missing rather than skipping
quietly, because skipping quietly is how this went unnoticed for months.

docs/agents/SSR-DEPLOY.md gains a table of which route deploys what, and the
two commands for checking what is actually live.

actionlint: clean on this file.

Closes #772
Closes #773


🤖 Generated with Claude Code

Four claims in one file, none of them true. Track C of #778.

**1. The approval gate (#772).** The job carried

    # Environment gate — production requires manual approval

Required reviewers on an environment are a paid feature for private repos and
this org is on Free. All three environments report `protection_rules=0`, and no
secret is environment-scoped either — 39 repo secrets, 0 environment secrets —
so `environment:` bought the Deployments record and nothing else. It is the kind
of comment read just before deciding a push is safe.

**2. The `prod` trigger (#772).** `prod` was a `push:` trigger while sitting 479
commits behind `main`, last touched 2026-04-21, having never triggered this
workflow once. Production has always shipped from
`scripts/deploy-web-eas.sh prod`, which asks you to type `deploy prod` and
invalidates CloudFront. The trigger was a loaded gun behind a false assurance,
so it is gone, along with the `--prod` branch in the deploy step.

**3. The edge-function step (#773).** It had never deployed a function, to any
environment, once. It selected its project from `DEV_SUPABASE_BRANCH_ID` /
`PREVIEW_SUPABASE_BRANCH_ID`, neither of which exists, so its own guard fired
every run —

    ⏭️ Supabase secrets not configured — skipping edge functions

— under a `continue-on-error: true` that would have hidden a real failure too.
The visible cost: web deploys advanced while the API sat at whatever the last
manual run left, which on preview meant a new frontend against a three-day-old
API with nothing saying so. Removed, per #778's recommendation, rather than
reimplemented worse than `scripts/deploy-functions.sh` — which does twelve
functions to CI's three, bakes `GIT_COMMIT` so `/v1/health` reports it, and runs
`smoke-remote.sh` after, failing on skew.

**4. The dispatch input.** `workflow_dispatch` offered a `production` choice
that nothing read — every target came from `github.ref`, so dispatching
"production" from `main` deployed dev and said nothing. Found while fixing the
other three. The input now decides, `production` is no longer offered, and the
target is computed once into `DEPLOY_TARGET` instead of re-deriving
`github.ref == ...` across fifteen expressions.

The auth-URL step had the same dead-secret bug as the function step and has also
never run. It now takes the project ref from the same mapping
`scripts/deploy-functions.sh` publishes in plain text — these are not secrets —
and **fails loudly** if `SUPABASE_ACCESS_TOKEN` is missing rather than skipping
quietly, because skipping quietly is how this went unnoticed for months.

`docs/agents/SSR-DEPLOY.md` gains a table of which route deploys what, and the
two commands for checking what is actually live.

actionlint: clean on this file.

Closes #772
Closes #773

Co-Authored-By: Claude Opus 5 <[email protected]>
@thinkclay
thinkclay merged commit c949eb3 into main Sep 17, 2026
10 checks passed
@thinkclay
thinkclay deleted the fix/772-773-honest-deploy branch September 17, 2026 00:34

This branch was previously deployed

1 inactive deployment
dev — 9704a38b Deployed Sep 17, 2026 by thinkclay via build-and-deploy #1068
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant