Repository navigation
fix(listen): private listen env via Secret Manager references, not the Helm privateEnv overlay - #25660
Merged
Conversation
Private backend-listen values (STT cap fallback cohort, media/noise digest serve list) were rendered as literals from the GitHub prod secret LISTEN_PRIVATE_VALUES_YAML through the chart's privateEnv overlay, so no deploy render or drift gate could see what a listen roll writes and every train refused listen with an unwaivable incomplete row. - backend-secrets: a dedicated prod ExternalSecret syncs one Secret Manager JSON document (LISTEN_PRIVATE_ENV) into prod-omi-backend-listen-private-env (dataFrom.extract, refreshInterval 0s: a value moves only on force-sync). - backend-listen chart: privateSecretEnv declares the private NAMES; the template renders one secretKeyRef per name and refuses a non-empty privateEnv while it is set. STT_CAP_DISPATCH_ENFORCEMENT=true (live since 10-20 via the overlay) is folded into the public chart unchanged. - workflow: the deploy path no longer reads the GitHub secret; a new prod-only mode private-env-migrate copies it into Secret Manager inside the protected job (no roll), and a pre-roll guard refuses any listen upgrade whose private values would differ from every serving template. - manifest, validators, drift checkers and registry follow; runbook added. Failure-Class: none Co-Authored-By: Claude Opus 5.5 <[email protected]>
Failure-Class: none Co-Authored-By: Claude Opus 5.5 <[email protected]>
Failure-Class: none Co-Authored-By: Claude Opus 5.5 <[email protected]>
Failure-Class: none Co-Authored-By: Claude Opus 5.5 <[email protected]>
lead2 ruling b2cf73 (applying 4e5e71/45689e): enforcement stays in the private set, no public fold-back. privateSecretEnv now declares STT_CAP_DISPATCH_ENFORCEMENT with the cohort and the media/noise digest list; the chart carries no public enforcement or cohort literal for prod listen. Failure-Class: none Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ❌ FailedThis 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. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…ate-env secret Failure-Class: none Co-Authored-By: Claude Opus 5.5 <[email protected]>
…xt logging) Failure-Class: none Co-Authored-By: Claude Opus 5.5 <[email protected]>
- guard: after cutover a Secret written after the oldest serving pod started is pending-restart, so a roll can never apply an unannounced value change (F1) - evidence mode refuses as retired once the candidate declares privateSecretEnv (F2) - chart refuses privateSecretEnv names that are chart-derived or workflow_dispatch overrides (F3) - runbook: pending-restart window and why an empty value is not a supported state (F4) Failure-Class: none Co-Authored-By: Claude Opus 5.5 <[email protected]>
Resolve the backend-listen prod overlay: keep main's UNLIMITED_V2 backfill cap lines and this branch's private-env secret references; recompose runtime_env.yaml. Failure-Class: none Co-Authored-By: Claude Opus 5.5 <[email protected]>
… workflow step inventory Failure-Class: none Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 20, 2026
Git-on-my-level
added a commit
that referenced
this pull request
Nov 21, 2026
…teEnv (#25907) ## What `test_record_seal_cluster_repair_deploy.py::test_cpu_admission_switch_is_declared_in_runtime_manifest_and_listen_chart` fails on main. It renders the backend-listen chart with `--set-string privateEnv.<key>=false` for every stage. Since #25660 the chart fails when `privateEnv` is set alongside `privateSecretEnv`, which prod now uses, so prod's `helm template` exits 1. Main's changed-file selector rarely picks this file, so it hid until PRs touching the charts selected it. It showed up on #25819. ## Change Head `f2618fc6fa05e0562ad5040d4b894803461b9838`. Test, selector and docs only. - On stages whose values set `privateSecretEnv` (prod), the test asserts the chart refuses the literal overlay with the "privateEnv is retired" message. That is the stronger guarantee now: the switch can only change through the Secret Manager document. - Dev keeps the existing override render check. - Prod also renders without the overlay and asserts the switch is `true`. The branch matches the chart guard (`privateSecretEnv.keys`). - `select_backend_unit_tests.py` selects this test for `backend/charts/backend-listen/` changes, so it can't go stale unselected again. - `listen_pusher_pipeline.mdx` no longer tells operators to roll back the seal overlap switch on prod listen with a `privateEnv` override, which prod refuses. It documents the values-file PR plus listen deploy path instead. Change note: `docs/listen_pusher_pipeline/changes/2026-11-20-seal-overlap-rollback-prod-listen.md`. These address all six panel findings (review-20261120t232252-b825). There is no chart, manifest or runtime change. ## Verification `pytest tests/unit/test_record_seal_cluster_repair_deploy.py` passes 15/15 locally with Helm, and 205 pass across the selector, workflow-contract and seal tests. The prior prod failure reproduced at main `9bf1acd`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
kriegcloud
pushed a commit
to kriegcloud/omi
that referenced
this pull request
Nov 21, 2026
…teEnv Since BasedHardware#25660 the backend-listen chart fails when privateEnv is set alongside privateSecretEnv, which prod now uses. The CPU admission switch test still passed --set-string privateEnv.<key>=false for every stage, so prod's helm render exited 1. Main's selector rarely picks this file, so it hid until PRs touching the chart selected it (seen on BasedHardware#25819). On stages with privateSecretEnv, assert the chart refuses the literal overlay, the stronger guarantee now. Dev keeps the existing override render check. Co-Authored-By: Claude Opus 5.5 <[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
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_YAMLthrough the chart'sprivateEnvoverlay. No deploy render, drift checker or train gate could see what a listen roll writes, so every listen train hit an unwaivableLISTEN_PRIVATE_VALUES_YAML incompleterow (owner brief: omi-workspacedata/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 intoprod-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 newprivateSecretEnvdeclares the names; the template renders onesecretKeyRef(optional: false) per name, drops public entries of the same name, and refuses a non-emptyprivateEnvwhile it is set. Per-name refs rather thanenvFrombecause a chartenventry silently beats anenvFromkey of the same name, and so the names stay declared in Git.Three private names.
STT_CAP_DISPATCH_COHORTandMEDIA_NOISE_MODE_SERVE_UID_SHA256S(uid-bearing), plusSTT_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 chartfalsewas never the live value. MEDIA_NOISE mode/percent and lanes were already public (config(listen): fold live media-noise and short-clip-floor values into the listen chart #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 oneLISTEN_PRIVATE_ENVversion via WIF, applies the backend-secrets chart, force-syncs, and reports per name onlysame/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.mdreplaces 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.yamlrecords 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)
LISTEN_PRIVATE_ENVinbased-hardware(automatic replication, no version), and grantedomi-ci-deployer-prodroles/secretmanager.secretVersionAdderon that one secret. ESO already has project-level accessor.mode=private-env-migrate(prod; no listen roll) — expect every nameeffect=same.reviewed; the in-job guard proves byte equality before Helm.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).evidence/private-env-migratemodes 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
runtime_env.yamlis regenerated for the listen env sources only (three secret references). No memory intake, consolidation or promotion setting changes.Also held by this change:
same/changed.Tests
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).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 templateprod/dev,actionlint,check_deployment_secret_boundary.py,check_feature_flag_registry.py,check_runtime_env_compose.shpass locally.Failure-Class: none
🤖 Generated with Claude Code