Repository navigation
config(listen): fold live media-noise and short-clip-floor values into the listen chart - #25651
Merged
Merged
Conversation
…o the listen chart Preservation-only: MEDIA_NOISE_MODE=shadow, MEDIA_NOISE_MODE_SERVE_PERCENT=0 and NOTES_SHORT_CLIP_FLOOR=true are what backend-listen serves today; pinning them in the chart clears three train drift rows without changing the pod. Failure-Class: none Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member
Author
|
Panel review-20261118t040928-42db F1 (privateEnv still overrides the media-noise chart values): rejected as intended. This PR only makes the chart match what serves, so the drift gate stops flagging those keys and a full chart re-render keeps the same values. The private overlay stays the source for the media-noise values until they're retired by 11-22 under David's 11-17 ruling. Editing the protected secret needs David's approval and is out of scope here. |
Git-on-my-level
added a commit
that referenced
this pull request
Nov 20, 2026
…e Helm privateEnv overlay (#25660) ## Summary Private backend-listen env values (the STT cap fallback cohort and the media/noise digest serve list, both uid-bearing) were rendered as literals by every listen Helm roll from the GitHub prod secret `LISTEN_PRIVATE_VALUES_YAML` through the chart's `privateEnv` overlay. No deploy render, drift checker or train gate could see what a listen roll writes, so every listen train hit an unwaivable `LISTEN_PRIVATE_VALUES_YAML incomplete` row (owner brief: omi-workspace `data/run-2026-11-17-v3-resume/brief-listen-private-values.md`). This moves the values out of the render: - **Secret Manager → External Secrets → per-name secretKeyRef.** One Secret Manager JSON document `LISTEN_PRIVATE_ENV`; a dedicated prod ExternalSecret in the backend-secrets chart (`dataFrom.extract`, `refreshInterval: 0s`) syncs it into `prod-omi-backend-listen-private-env`, a Secret only listen references (the shared backend secret is loaded whole via envFrom elsewhere, so it is not used). The listen chart's new `privateSecretEnv` declares the **names**; the template renders one `secretKeyRef` (`optional: false`) per name, drops public entries of the same name, and refuses a non-empty `privateEnv` while it is set. Per-name refs rather than `envFrom` because a chart `env` entry silently beats an `envFrom` key of the same name, and so the names stay declared in Git. - **Three private names.** `STT_CAP_DISPATCH_COHORT` and `MEDIA_NOISE_MODE_SERVE_UID_SHA256S` (uid-bearing), plus `STT_CAP_DISPATCH_ENFORCEMENT`, which stays private by ruling (lead2 4e5e71/45689e, b2cf73: keep it in the private set; no public fold-back). The listen chart no longer carries a public enforcement or cohort literal that could be mistaken for the live value; the historical chart `false` was never the live value. MEDIA_NOISE mode/percent and lanes were already public (#25651). - **Workflow (existing file only).** The deploy path no longer reads the GitHub secret. New prod-only `mode: private-env-migrate` (rolls nothing) reads the secret inside the protected job, checks its name set and that folded public names equal the chart, writes one `LISTEN_PRIVATE_ENV` version via WIF, applies the backend-secrets chart, force-syncs, and reports per name only `same`/`changed`. A new pre-roll step **"Prove private listen env is unchanged"** runs after the secret sync and before the listen Helm upgrade: every declared name must be present and non-empty in the synced Secret, and where any serving template (Deployment or ReplicaSet with pods) still carries a literal, the values must be identical — otherwise nothing is deployed. Helper: `.github/scripts/listen_private_env.py` (never prints a value or hash). - Runtime manifest, validators, both drift checkers, feature-flag registry and docs follow; new runbook `backend/docs/runbooks/listen-private-env.md` (changing a value = new SM version → force-sync → rollout restart; never a code deploy). `backend/deploy/runtime_env/README.md` replaces the live-edit shortcut with the sanctioned path. - `verify_pusher_cohost_env_diff.py`: listen's enforcement and cohort are now references, not env literals, so they are pusher-only names in the comparison (pusher keeps its public observe-only values). `.github/ci-budget.yaml` records the new dispatch option (no new trigger, no PR runs). The meta-repo train gate change that recognises this "private-free" source (no overlay request id; references only; ExternalSecret-Ready row) ships separately in omi-workspace. ## Rollout / cutover (not done by this PR) 1. IAM (done 2026-11-18 ~05:55Z with David's human login, authorized by David for this change only): created the empty secret `LISTEN_PRIVATE_ENV` in `based-hardware` (automatic replication, no version), and granted `omi-ci-deployer-prod` `roles/secretmanager.secretVersionAdder` on that one secret. ESO already has project-level accessor. 2. After merge: dispatch `mode=private-env-migrate` (prod; no listen roll) — expect every name `effect=same`. 3. Next off-peak listen train (coordinated): the gate shows the two literal→reference rows as `reviewed`; the in-job guard proves byte equality before Helm. 4. Rollback of the cutover roll: `mode=rollback` (Helm restores the previous revision whose stored values carry the literals). Rollback of this PR before step 3: revert; the deploy path would then need the overlay again (the GitHub secret is untouched). 5. Later cleanup: delete the GitHub secret and the `evidence`/`private-env-migrate` modes after a clean soak. Until step 2 completes, a listen roll from main fails closed at the guard (ExternalSecret not Ready) before any listen mutation. Cloud Run deploys also apply the backend-secrets chart and will create the (not yet synced) ExternalSecret; that is inert. ## Product invariants affected - INV-DATA-1 — the listen deploy workflow changes, but no routing, endpoint, Firebase/Firestore project or protected authority does. Only the source of two existing listen env values moves, from a rendered literal to a Secret Manager reference in the same prod project, and the values themselves are unchanged. - INV-MEM-4 — `runtime_env.yaml` is regenerated for the listen env sources only (three secret references). No memory intake, consolidation or promotion setting changes. Also held by this change: - Private listen values never appear in a rendered manifest, a workflow log, or Git; only names and `same`/`changed`. - A listen roll cannot change a private value; a private value change cannot ride a code deploy. ## Tests - New: `backend/tests/unit/test_listen_private_env.py` (migrate/guard/sync with fake kubectl/gcloud; no value leaks; every serving ReplicaSet checked), backend-secrets ExternalSecret render test, listen chart render tests (references only, privateEnv refused, credential names refused). - Updated: `test_listen_helm_env_overrides.py` (workflow: secret only in evidence/migrate steps; guard ordering; migrate never rolls), `test_check_cloud_run_env_drift.py`, `test_stt_cap_cohort_lanes.py`, `test_listen_workload_identity_chart.py`, `test_backend_secrets_chart.py`. - `helm template` prod/dev, `actionlint`, `check_deployment_secret_boundary.py`, `check_feature_flag_registry.py`, `check_runtime_env_compose.sh` pass locally. Failure-Class: none 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/25660?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="View guided diff" src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a> <a href="https://www.cubic.dev/action/auto-fix/pr/BasedHardware/omi/25660?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F25660&source=description" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img alt="Turn on auto-fix" src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
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.
Why
The listen roll that puts conversations v3 on live captures is refused by the train's drift gate. Three backend-listen keys are live but absent from the chart:
MEDIA_NOISE_MODE=shadowandMEDIA_NOISE_MODE_SERVE_PERCENT=0, carried by theLISTEN_PRIVATE_VALUES_YAMLprivateEnv overlay since 2026-11-04;NOTES_SHORT_CLIP_FLOOR=true, set bykubectl set envafter lead2 f9bdc4 (2026-11-11) rolled back the false experiment.The forensics are in the omi-workspace run record
data/run-2026-11-17-v3-resume/drift-forensics-{A,B}.md.What
This change is preservation-only: each value equals what serves now, so the rendered pod is unchanged.
prod_omi_backend_listen_values.yamlnow pinsMEDIA_NOISE_MODE: shadow,MEDIA_NOISE_MODE_SERVE_PERCENT: "0"andNOTES_SHORT_CLIP_FLOOR: "true".prod.overlay.yamlmirrors the same three values forgke.backend-listen, andruntime_env.yamlis regenerated.Not changed:
STT_CAP_DISPATCH_ENFORCEMENTand_COHORTare owned by the private overlay by design;test_stt_cap_cohort_lanespins the manifest at false and an empty cohort.BATCH_PIPELINE_SILENCE_READ_SKIP_ENABLEDis Git-ahead: the serving listen image predates the flag, so renderingfalsechanges nothing.Safe inverse: delete the added entries. Live stays the same, and the code defaults are the same values.
Verification
compose_runtime_env.pywas regenerated, andcheck_runtime_env_compose.shreports it up to date.configinconfig/deployment-setting-classification.json, andcheck_deployment_secret_boundary.pypasses.verify_pusher_cohost_env_diff.pyfor prod, because pusher leaves them unset at the same code defaults. The co-host gate and its 84 tests pass.scripts/pr-preflightpassed all 46 checks.Product invariants affected
runtime_env.yamlis a locked path; only three listen env values that already serve are pinned, no memory promotion behavior)Failure-Class: none
UI-Evidence: none -- deploy config only
🤖 Generated with Claude Code