Repository navigation
config(capture): observe shared speech on Cloud Run only - #21930
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ad9b467ca9
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| CAPTURE_SHARED_SPEECH_MODE: | ||
| value: 'shadow' | ||
| category: rollout | ||
| CAPTURE_SHARED_SPEECH_PERCENT: | ||
| value: '100' |
There was a problem hiding this comment.
Make the shadow rollout removable during rollback
When operators follow backend/docs/operational/capture-shared-speech.md:186-187 and roll back by dispatching the previous release_sha, these newly absent keys will remain shadow/100: all four relevant deploy-cloudrun@v3 calls omit env_vars_update_strategy, their --remove-env-vars lists omit these keys, and the action's documented default is merge, which preserves upstream variables not supplied by the old manifest. Consequently the documented dark rollback creates new revisions that continue running the fleet-wide shadow workload; make these bindings explicitly removable or make the deployment state authoritative before enabling them.
AGENTS.md reference: backend/AGENTS.md:L153-L153
Useful? React with 👍 / 👎.
…1931) Declare explicit shared-speech off values on the four production Cloud Run services before shadow qualification. Set `CAPTURE_SHARED_SPEECH_MODE=off` and `CAPTURE_SHARED_SPEECH_PERCENT=0` on backend, backend-sync, backend-sync-backfill and backend-integration. The mode already resolves to off, so incumbent behavior, IO and logs remain unchanged. GKE and every other runtime setting remain unchanged. The current deploy action defaults to merging environment variables, and the sidecar attachment preserves extra environment entries. A rollback to a feature-bearing source that merely omits the new keys would retain a later shadow value. This release gives the normal `release_sha` rollback an explicit off/0 target while retaining the recent Firestore incident controls. [Action contract](https://github.com/google-github-actions/deploy-cloudrun/blob/v3/action.yml#L83-L91). #21882 is merged; the regular 6d64800 Cloud Run train carries the reviewed feature dark. #21930 remains unmerged. Deploy this explicit-off baseline through `bin/omi-deploy-prod wait-eligible` then `cloud-run`, approving only this owner's run, and complete its >=15minute watch. Then merge the separate Cloud Run-only shadow config and prepare rollback to this off source. Stop at shadow; do not activate on for any account. No dedicated Pusher/listen deployment or workflow changes. Validation: regenerate source composition and registry, compare parsed documents after removing exactly the eight authorized literals, runtime preflight, repository preflight and exact-head CI. The feature completed five read-only agentctl codex/gpt-6-luna reviews with no final feature blockers. This PR changes literals and the runbook only, with no material code changes requiring another Luna review under the coordinator's instruction. ## CI parser repair and rollout hold Exact-head CI on the preceding merge passed the containment assertions but exceeded the unchanged1-second CPU ceiling while parsing the expanded runtime manifest (1.01seconds). Use PyYAML's C-backed SafeLoader when available, retaining the Python SafeLoader fallback. All assertions and timing budgets remain unchanged. One-off parity checks produced identical values for the full manifest, registry and four chart fixtures; the existing policy file passed64tests with the same1.0/0.1fail/warn limits. A fresh read-only agentctl codex/gpt-6-luna review of exact95f75c869f7ad2ee57deb83189755b0023ae6454 found no blocking P1/P2 issues and independently verified seven parsed inputs plus composition; outcome is recorded in the review comment. Deploy this explicit-off baseline under David's standing grant through the normal checked-in Cloud Run workflow, whose existing backfill service profile is40instances (live snapshot32). This PR does not change that workflow or enable shared-speech computation. The release includes reviewed upstream repeat-work cuts. Measure the postdeploy worker against the captured degraded baseline and retain the prior off source as rollback. Shadow remains held until the worker watch qualifies; its rollback must use this deployed explicit-off source, rather than the older omitted-key source. ## Product invariants affected - [INV-MEM-4](product/invariants/memory-promotion-authority.md): canonical promotion remains the sole Long-term authority. All intake, consolidation, promotion, scheduler and projection settings are preserved; only shared-speech off literals are added on four Cloud Run hosts. Failure-Class: none
…peech-cloud-run-shadow # Conflicts: # backend/deploy/runtime_env.yaml # backend/deploy/runtime_env/prod.overlay.yaml # backend/docs/feature-flag-registry.md
…peech-cloud-run-shadow
|
Shadow qualification is paused after the first settled15minute window; no3hour clean comparison is claimed, and the previously advertised02:47UTC readiness is void. The new backfill revision had153/6842HTTP5xx (2.24%) versus the off baseline143/11302 (1.27%); logged backfill504s increased47 versus1. The later00:15–00:30UTC window remained degraded (backfill159/3764=4.22%,86logged504s;sync87/24266=0.36%). Matcher errors stayed0 and every decision outcome wasshadow, so no new-policy writes occurred. This is a release-health correlation, not proven matcher causality: the image also includes upstream flag-off STT-cap code and other trains/traffic changed concurrently. Own CloudRun-only rollback 38987083835 is restoring the actually deployed explicit-off sourceaa87e9fe37f12a55978b8567db9d41fa28a6ce39 through the prepared normal workflow; only its own gates are approved. Actual serving proof and a mandatory>=15minute rollback watch follow. No GKE deploy/rollback oron activation. Persistent configuration reversion #21954 restores exactly the eightCloudRun values tooff/0, preserving all other settings, so a future regular train does not re-enable the unqualified shadow. No automatic retry/promotion is scheduled. Detailed aggregate evidence and remaining causal questions are retained in the local task report. |
#21954) Restore explicit `CAPTURE_SHARED_SPEECH_MODE=off` and `CAPTURE_SHARED_SPEECH_PERCENT=0` on the four production Cloud Run processing hosts after the first shadow health window failed qualification. Preserve every other runtime setting, including dev/GKE and the unrelated Jev/smart-merge settings. This prevents a later regular train from re-enabling shadow after the production rollback. The shadow configuration in #21930 deployed through own run [38981209453](https://github.com/BasedHardware/omi/actions/runs/38981209453), source6e7007e3e35d05a155d2179d53e2bb0c21098c9f. Its settled23:42–23:57UTC window had542shadow decision events,533unique pairs, zero matcher errors/unparsed rows, and no new-policy writes. Backfill overall5xx was178/6874; the retiring off revision accounted for25, but the current shadow revision still had153/6842 (2.24%) versus the prior off baseline143/11302 (1.27%). Logged backfill504s increased47 versus1. This does not establish a matcher cause: the release also included upstream STT-cap code (flagoff), and other trains/traffic changed concurrently. It does establish that this window cannot be called clean. The prepared previous-release rollback to explicit-off aa87e9f is running through own Cloud Run-only workflow [38987083835](https://github.com/BasedHardware/omi/actions/runs/38987083835), with approval restricted to that returned own run. No pusher/listen deployment or rollback is performed here. Three-hour shadow qualification was stopped after the first15minute checkpoint; no on activation is authorized. A mandatory>=15minute watch follows the rollback. The source/config rollback is conservative; causality remains unproven. This PR changes eight literals, four owned comments, and the generated registry render only. Source and compiled manifests match the prior parsed values exactly after removing those eight fields. Registry rendered as of2026-10-17 and validated. Runtime/deployment preflight and normal commit/push hooks remain required; exact-head terminal CI gates merge. The feature completed six read-only agentctl codex/gpt-6-luna review rounds with no unresolved P1/P2; this literal reversal changes no reviewed matcher/policy/storage/test code. The coordinator requires Luna reruns only for material code changes, so no additional review round is needed for this rollback. ## Product invariants affected - [INV-MEM-4](product/invariants/memory-promotion-authority.md): canonical promotion remains the sole Long-term admission authority. Every memory intake, consolidation, promotion, scheduler and projection setting is preserved. Only shared-speech evaluation is disabled on four Cloud Run hosts. Failure-Class: none Operational configuration rollback without a causal implementation fix; no failure class is claimed from the observed correlation. <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/21954?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/21954?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F21954&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. -->
Enable deterministic shared-speech shadow evaluation on the four production Cloud Run processing services: backend, backend-sync, backend-sync-backfill and backend-integration. Set
CAPTURE_SHARED_SPEECH_MODE=shadowandCAPTURE_SHARED_SPEECH_PERCENT=100at those service overrides only. The UID allowlist stays empty. Shadow preserves incumbent grouping and adds bounded evaluation with identifier/numeric decision logs.Pusher and backend-listen retain their off default and receive the implementation through their regular release train. No account is activated in on mode. Existing groups, transcripts, memories and effects retain their existing behavior. Jev and smart merge settings are unchanged.
This follows #21882 and the explicit-off rollback baseline #21931 (merged8b24990a68bd00539d36ed5f09f2e12d7e80047d), under David's coordinator-authorized Cloud Run dark → shadow qualification. The feature completed five read-only agentctl codex/gpt-6-luna review rounds, with no final feature blockers. A sixth read-only review of the explicit-off baseline and its safe YAML test-loader repair found no P1/P2 issues; that unchanged code is now in main. This PR changes literal configuration/rendered documentation only and leaves that reviewed implementation unchanged; the coordinator requires another Luna review only for material code changes. Calibration remains insufficient for activation: David TP4/13 and FP0/6; September benchmark TP1/56 and FP0/40, with zero held-out positives accepted. After deployment, watch at least15minutes against the predeploy baseline and compare at least3hours of shadow decisions to the incumbent using counts only.
Validation: regenerated the canonical runtime manifest and feature-flag registry. Removing exactly the eight authorized Cloud Run fields reproduces both prior parsed source and compiled manifests; dev/GKE/all other settings are identical. Runtime-env preflight passed315tests; PR preflight passed20checks, and the normal push gate passed. Exact-head CI at48a1bb2890ba4e2ece1197a53de270f3585f88cb completed32successful checks and25automatic out-of-scope skips, with no failure/pending/cancellation; re-check after a fresh main fetch before merging. Deploy through
bin/omi-deploy-prod wait-eligiblethencloud-run, approving only this owner's run. The actual eligible explicit-off rollback source is nowaa87e9fe37f12a55978b8567db9d41fa28a6ce39(contains #21931 plus current Firestore controls and queued-epoch repair), served100% on allfour via regulartrain 38976700010. Its exact normal-workflow rollback commands are written before any shadow dispatch; the owner did not dispatch or approve that other operator’s train. An older release that omits the keys does not reset shadow because the deploy action merges environment variables. The explicit-off watch22:56–23:11UTC completed with5minute ingestion grace, complete queries, allfour explicitoff/0/emptyallowlist, and zero matcher activity/errors. Allfour overall5xxrates were below the recent baseline (backend0.0127%vs0.0219%;sync0.0473%vs0.0511%;backfill1.2653%vs1.5431%;integration0.0159%vs0.09%). Backfill remains degraded. A separate memory-search timeout burst8/9requests occurred in the first5minutes with no later requests on that route; predeploy had0requests, so causality cannot be established and recovery is not claimed. This concern remains tracked; sampled traceback module frames did not implicate new shared-speech modules. Owner assessment qualifies bounded non-mutating Shadow with the exactOffrollback ready, while retaining those concerns in the watch. Never enableOn. Full timings, revisions and aggregate watches are recorded in the task report.Product invariants affected
Failure-Class: none
This is non-mutating rollout configuration with no new failure-class implementation.