Repository navigation
chore(listen): enable STT failover recovery for prod stable - #20696
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
1 issue found across 8 files
Confidence score: 3/5
backend/docs/operational/windowed-live-stt.mdcould lead operators to enable recovery fleet-wide before the rollout is accepted. Document the required 25% canary hold and coordinator authorization.
You’re at about 90% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact [email protected].
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="backend/docs/operational/windowed-live-stt.md">
<violation number="1" location="backend/docs/operational/windowed-live-stt.md:68">
P1: This stable-deploy guidance omits the required 25% canary hold and coordinator authorization. State that prerequisite here so operators do not enable recovery fleet-wide before acceptance.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| flag-off controls. Missing telemetry is not proof of darkness or health; the | ||
| coordinator must verify scrape coverage and actual per-pod flag configuration. | ||
| This merge is inert — it performs no deploy and changes no running session. | ||
| The stable enablement deploys through the normal listen Helm workflow, |
There was a problem hiding this comment.
P1: This stable-deploy guidance omits the required 25% canary hold and coordinator authorization. State that prerequisite here so operators do not enable recovery fleet-wide before acceptance.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At backend/docs/operational/windowed-live-stt.md, line 68:
<comment>This stable-deploy guidance omits the required 25% canary hold and coordinator authorization. State that prerequisite here so operators do not enable recovery fleet-wide before acceptance.</comment>
<file context>
@@ -65,7 +65,13 @@ sum(increase(omi_stt_recovery_attempts_total{job="backend-listen-metrics",namesp
flag-off controls. Missing telemetry is not proof of darkness or health; the
coordinator must verify scrape coverage and actual per-pod flag configuration.
-This merge is inert — it performs no deploy and changes no running session.
+The stable enablement deploys through the normal listen Helm workflow,
+`gcp_backend_listen_helm.yml` (`environment=prod`, `mode=deploy`). Roll back by
+reverting the enablement PR and deploying listen, or use that workflow with
</file context>
What changed and why
Set
STT_FAILOVER_RECOVERY_ENABLED=truefor prod listen in the Helm values and runtime overlay, regenerate the runtime manifest and feature-flag registry, and align the listen pipeline/rollout docs. This enables the recovery stack from #20391/#20491/#20534/#20560/#20671 for new stable listen sessions after deployment.Dev listen remains
falsein its chart and runtime overlay. The shared base and code default stayfalse, so a missing environment variable means off.SONIOX_IDLE_CLOSE_SECONDS, router mode, provider order, and allocations are unchanged.Canary evidence — coordinator to complete
PLACEHOLDER: attach the 25% prod listen canary versus control evidence after it holds through the next peak: exact image/config, observation window including peak, cohort and scrape coverage, session counts, recovery/continuity and terminal-after-text rates, latency and error comparison, and the coordinator's acceptance decision. Canary success is supplied context; this PR preparation does not independently qualify production health. Keep this PR draft until the coordinator fills this evidence and authorizes the stable flip.
Deploy and rollback
Deploy prod listen Helm through the normal
gcp_backend_listen_helm.ymlworkflow (environment=prod,mode=deploy) after the coordinator merges the approved config flip. This draft does not merge or deploy anything.Rollback: revert this PR and deploy listen through the same normal workflow. For emergency rollback, use
gcp_backend_listen_helm.ymlwithenvironment=prod,mode=rollback(select the pre-flip Helm revision if needed).Follow-up
This flag also flips the canary-only terminal-after-text (TAT) metric,
omi_live_session_terminal_after_text_total, fleet-wide. After stable rollout, relax the canary-scoped selectors from #20660 for the alert's volume floor, numerator, and denominator together. Alert rules are unchanged here; the coordinator owns this follow-up to #20660.Product invariants affected
How it was verified
PATH="$PWD/backend/.venv/bin:$PATH" bash backend/scripts/pre-deploy-check.sh: passed runtime/workflow/state validation for dev and prod, plus 284 deploy contract tests.BACKEND_UNIT_TEST_FILE_LIST="$PWD/.local/stable-flip-test-files.txt" bash backend/test.sh: 73 cases passed acrosstest_stt_failover_recovery_flag.py(45) andtest_listen_stt_rollout.py(28), including Helm canary rendering and flag-off behavior.helm templatefor prod and dev: exactly one recovery declaration per rendered listen container, prodtrue/ devfalse. Compared chart env and composed runtime state againstorigin/main: only prod listen's recovery value changed; other runtime settings and code defaults were preserved.OMI_PR_BODY_FILE=.local/pr-stable-flip-round2-body.md make preflight: all 38 selected checks passed, including the committed-diff rerun.scripts/pr-preflight --lane local --metadata-only --pr-body-file .local/pr-stable-flip-body.md: all 3 metadata checks passed.backend/deploy/runtime_env.yaml.Production acceptance remains the coordinator's canary evidence above.
Tests
Added
test_stable_recovery_flag_is_scoped_to_prod_listeninbackend/tests/unit/test_listen_stt_rollout.py: prod listen must declaretruein Helm values and both committed/freshly composed runtime manifests; dev listen must declarefalse. Exhaustive runtime declaration paths require pusher, sync, desktop-backend, jobs, shared config, and every other service to leave the flag unset.test_stable_recovery_code_default_remains_offchecks unset and explicit false against the production reader. Existing default-off and canary tests are unchanged. This pins the rollout boundary identified in Luna's review of #20696; the shared composition primitive already validates general config consistency, while this test preserves the intended service scope.