Repository navigation
fix(backend): bind SONIOX_API_KEY on pusher now that its STT chain lists soniox - #14329
Merged
Merged
Conversation
…sts soniox da58f3e restored soniox to STT_SERVICE_MODELS in the pusher charts, but only the listen charts bind the key, and pusher's startup admission rejects a listed soniox with an empty key. Dev pusher has been crash-looping on it and blocking its own deploys; prod pusher would do the same on its next rollout. Bind the key exactly as listen does and guard every chart's chain against the real startup validator. Failure-Class: FC-rollout-flag-absent-from-a-cohost-of-its-code-path Co-Authored-By: Claude Fable 5.1 <[email protected]>
…bound Review follow-up: startup admission only needs a non-empty value, so the guard must check the referenced key carries the env var's own name. Failure-Class: FC-rollout-flag-absent-from-a-cohost-of-its-code-path Co-Authored-By: Claude Fable 5.1 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
da58f3e94b("restore Soniox as the streaming failover hop behind Velma", 2026-09-15) putsonioxback intoSTT_SERVICE_MODELSin the backend-listen and pusher Helm values for both environments. The listen charts bindSONIOX_API_KEY; the pusher charts never have. Pusher's startup admission (_validate_static_capabilities→validate_streaming_stt_env) rejects that combination:Observed on the dev cluster (2026-09-17, read-only): the pusher pod from the new ReplicaSet is in
CrashLoopBackOffwith 335 restarts on exactly that error, the 2026-09-13 ReplicaSet is still serving, and every "Auto Deploy Backend Pusher to GKE (Development)" run since fails its "Verify live finalization alert route before publishing" gate because the scrape targets are not both healthy. The last successful dev pusher deploy is 2026-08-31. The prod pusher values file has the identical gap; prod pusher was last rolled out on 2026-09-13, before the Soniox commit, so its next rollout would crash-loop the new pods the same way.This PR binds
SONIOX_API_KEYin both pusher values files exactly as the matching listen file does ({env}-omi-backend-secrets, keySONIOX_API_KEY,optional: true), records the binding in the dev runtime-env overlay and the composed manifest, and removes the key from the co-host gate's listen-only allowance now that both hosts bind it. The dev secret was confirmed to hold a non-emptySONIOX_API_KEY(length only, value not read); the Soniox commit's own evidence shows the prod key is live on listen from the same secret.STT_SERVICE_MODELS, the validator, and the listen bindings are unchanged.Guard
backend/tests/unit/test_streaming_stt_helm_key_bindings.py: for every listen and pusher values file, in both environments, each model listed inSTT_SERVICE_MODELSis probed against the realvalidate_streaming_stt_envwith an empty environment; whatever key the production error names must be bound in that same values file. No second provider→key table. Proven red againstorigin/main's prod pusher values file (1 failed, 5 passed) and green with this change.Review
An independent adversarial review (Codex, read-only) confirmed the pusher binding is identical to listen's, that the chart template renders
valueFromentries, that there are no duplicate env names, thatoptional: truematches listen's production trade-off (the pusher deploy workflow separately verifies live key presence), and that the guard is not vacuous. Two findings:SONIOX_API_KEY <- MODULATE_API_KEYwould have passed startup and then failed Soniox authentication on first failover. The referenced key must now carry the env var's own name, with a test.backend,backend-sync,backend-sync-backfill,backend-integration) run the same startup validator, and the source manifest binds neitherSTT_SERVICE_MODELSnorSONIOX_API_KEYfor them; they keep working because Cloud Run retains env entries the manifest does not own. Recreating one from source would hit the same crash. That is a manifest-ownership gap larger than this unblock and gets its own change.Failure-Class: FC-rollout-flag-absent-from-a-cohost-of-its-code-path
Product invariants affected
Cited because the change edits deploy configuration paths that invariant locks. It adds one secret reference to pusher; memory behaviour, finalization, and every existing binding are untouched.
Evidence
Hermetic local run, Python 3.11:
test_streaming_stt_helm_key_bindings.py,test_verify_pusher_config_references.py(includes a Helm render of the new secret),test_backend_runtime_env_validator.py,test_stt_provider_policy.py→ 158 passed;test_verify_pusher_cohost_env_diff.pypassed;compose_runtime_env.py --checkup to date.Layer measured: unit and manifest tests plus read-only inspection of the dev cluster. Not yet observed: a healthy dev pusher pod on this change — that needs the merge and the dev auto-deploy, whose prepublish gate may itself stay red until the crash-looping ReplicaSet is replaced.
🤖 Generated with Claude Code