Skip to content

chore(listen): enable STT failover recovery for prod stable - #20696

Merged
Git-on-my-level merged 3 commits into
mainfrom
ops/stt-recovery-enable-prod
Oct 5, 2026
Merged

Git-on-my-level merged 3 commits into
mainfrom
ops/stt-recovery-enable-prod

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

What changed and why

Set STT_FAILOVER_RECOVERY_ENABLED=true for 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 false in its chart and runtime overlay. The shared base and code default stay false, 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.yml workflow (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.yml with environment=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

  • INV-MEM-4: the generated runtime manifest is in scope; canonical memory intake, promotion authority, and processing-host bindings are unchanged.

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 across test_stt_failover_recovery_flag.py (45) and test_listen_stt_rollout.py (28), including Helm canary rendering and flag-off behavior.
  • Offline helm template for prod and dev: exactly one recovery declaration per rendered listen container, prod true / dev false. Compared chart env and composed runtime state against origin/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.
  • Re-ran the committed-diff preflight with the required INV-MEM-4 citation for backend/deploy/runtime_env.yaml.

Production acceptance remains the coordinator's canary evidence above.

Tests

Added test_stable_recovery_flag_is_scoped_to_prod_listen in backend/tests/unit/test_listen_stt_rollout.py: prod listen must declare true in Helm values and both committed/freshly composed runtime manifests; dev listen must declare false. 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_off checks 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.

Review in cubic

@Git-on-my-level
Git-on-my-level marked this pull request as ready for review October 5, 2026 07:30
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-05T07:32:31.936360Z 9de1ad4 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 8 files

Confidence score: 3/5

  • backend/docs/operational/windowed-live-stt.md could 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,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>

@Git-on-my-level
Git-on-my-level merged commit f583717 into main Oct 5, 2026
56 checks passed
@Git-on-my-level
Git-on-my-level deleted the ops/stt-recovery-enable-prod branch October 5, 2026 07:36
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