Skip to content

fix(deploy): scope the transcription candidate gate to development - #9913

Merged
mdmohsin7 merged 1 commit into
mainfrom
fix/stt-gate-dev-only
Jul 17, 2026
Merged

mdmohsin7 merged 1 commit into
mainfrom
fix/stt-gate-dev-only

Conversation

@mdmohsin7

@mdmohsin7 mdmohsin7 commented Jul 17, 2026 •

Copy link
Copy Markdown
Member

Problem

With the Cloud Run binding fix (#9911) merged, the prod deploy got all the way through image build, all four Cloud Run services, GKE Helm, and the post-deploy runtime-env validation — then failed at Resolve transcription candidate URL (run 29574215693):

ERROR: Cloud Run tag 'stt-gate-29574215693-1' has no valid HTTPS URL

The known-audio probe reaches the candidate revision over a Cloud Run tag URL, which is a run.app URL. Production deliberately has no run.app URL:

dev prod
run.googleapis.com/default-url-disabled unset true
ingress all internal-and-cloud-load-balancing
status.url https://backend-…-uc.a.run.app none

So a prod tag resolves to no HTTPS endpoint. This is not a transient failure — it is structural, and it would fail every prod deploy. Two independent blockers, in fact: even if the default URL were re-enabled, ingress is internal-only while the deploy runs on ubuntu-latest-m, a GitHub-hosted runner outside the VPC.

The gate works in dev only because dev is wide open.

Why it went unnoticed

The gate landed in d4252a6 on 2026-07-13 — one day after the last successful prod deploy (d40d43be, 2026-07-12) and one day before the binding break (efca8b8, 2026-07-14). It has never executed against prod. The binding bug masked it; fixing that bug surfaced it.

Change

Scope the --tag flag and the four gate steps to development. This restores the 2026-07-12 prod behavior and matches the step's own documented intent, already in the workflow:

The manual development deployment runs this same no-traffic probe before promotion, making it the required auth and route dry run for production.

The gate keeps running on dev, where it works. The comment now records why prod is excluded, so this isn't silently re-enabled.

Promotion steps (Verify validated revisions are still current, Shift Cloud Run traffic to validated revisions) keep no if: — a skipped step does not fail success(), so traffic promotion proceeds normally.

Verification

  • Parsed the rendered workflow: all four gate steps carry the development condition; the --tag flag is development-gated; both promotion steps still carry no if:.
  • Mutation-checked the new guard — re-enabled the gate for prod and confirmed the test fails with Gate backend candidate on known audio must be development-only; a production run cannot resolve a tag URL, then restored. The guard catches the real regression rather than asserting a tautology.
  • Confirmed prod's posture directly via gcloud run services describe (default-url-disabled=true, status.url empty, ingress internal-and-LB) and dev's (ingress: all, URL present).
  • Confirmed no org policy sets run.disableDefaultURI — the annotation is set on the service, deliberately.
  • pytest tests/unit/{test_sync_two_lane,test_sync_ledger_fence_cutover,test_smoke_what_matters_now,test_resolve_cloud_run_tagged_url,test_verify_dev_backend_deployment,test_preflight_cloud_run_deploy}.py → 86 passed.

Prod is currently unchanged and safe: 100% traffic pinned to the 2026-07-12 revision, the #9911 candidate revision Ready at 0%, and the failed tag cleaned up.

Regression coverage

test_transcription_candidate_gate_is_development_only pins all four gate steps and the tag flag as development-only, and asserts promotion does not depend on the gate. Mutation-verified above.

Follow-up

This removes the pre-promotion STT gate from prod, which is worth naming explicitly: the pending main includes a change defaulting free-plan live transcription to Parakeet, and that is exactly the class of regression this gate was built to catch. Recommend a dev deploy to exercise the gate against that change before promoting prod. Giving the probe a prod-viable route (VPC-connected runner, or a probe path that does not depend on a public revision URL) is separate work.

Failure-Class: none

Review in cubic

The known-audio probe reaches the backend candidate over a Cloud Run tag
URL, which is a run.app URL. Production deliberately serves no run.app URL
(run.googleapis.com/default-url-disabled=true) and restricts ingress to
internal-and-cloud-load-balancing, so a production tag resolves to no HTTPS
endpoint. The deploy runner is GitHub-hosted and outside the VPC, so it
could not reach such a URL even if one existed. The gate therefore cannot
work in production by construction; it works in dev only because dev runs
ingress `all` with the default URL enabled.

The gate landed 2026-07-13, one day after the last successful production
deploy (d40d43b, 2026-07-12), so it never executed against production
until the Cloud Run binding fix (#9911) unblocked the deploy far enough to
reach it. Run 29574215693 then failed at "Resolve transcription candidate
URL": `Cloud Run tag 'stt-gate-29574215693-1' has no valid HTTPS URL`.

Scope the tag and the four gate steps to development. This restores the
2026-07-12 production behavior and matches the step's own documented intent:
the manual development deployment runs this probe as the auth and route dry
run for production. Promotion steps keep no `if:`, so a skipped gate does
not block traffic shifting.

Verification:
- Parsed the rendered workflow: all four gate steps carry the development
  condition, the --tag flag is development-gated, and the two promotion
  steps still carry no `if:` (a skipped step does not fail success()).
- Mutation-checked the new guard: re-enabling the gate for production makes
  test_transcription_candidate_gate_is_development_only fail with
  "must be development-only; a production run cannot resolve a tag URL".
- pytest tests/unit/{test_sync_two_lane,test_sync_ledger_fence_cutover,
  test_smoke_what_matters_now,test_resolve_cloud_run_tagged_url,
  test_verify_dev_backend_deployment,test_preflight_cloud_run_deploy}.py
  -> 86 passed.

Production remains on the 2026-07-12 revision with 100% pinned traffic; the
candidate revision from #9911 is Ready at 0% traffic.
@mdmohsin7
mdmohsin7 merged commit a7dc482 into main Jul 17, 2026
32 of 36 checks passed
@mdmohsin7
mdmohsin7 deleted the fix/stt-gate-dev-only branch July 17, 2026 11:12
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