Repository navigation
Retire the notes-packet and calls-recap shadows: bind off on every reader - #26580
Merged
Merged
Conversation
…ader David 2026-11-28: retire NOTES_PACKET_V2_MODE (24 h readout 57% agree) and CALLS_RECAP_MODE (6% agree). Neither key nor any serve cohort was bound in prod, so both ran as implicit shadows on every reader. Bind explicit off on every runtime that reads them (prod and dev backend, backend-sync, backend-sync-backfill, backend-integration, projection pump, listen, pusher) and mark the six registry rows kill/off. The code paths are deleted next. Off is output-neutral: outside a serve cohort both paths already return the legacy result, and the notes key is not CONVERSATION_NOTES_V2_ENABLED. Off also stops calls-recap's per-finalization boundary-store reads. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis 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. |
… note Review F1/F2: notifications-job reads CALLS_RECAP_MODE and NOTES_PACKET_V2_MODE through notifications.py -> daily_recap but had no binding, so it still ran the implicit shadow. Bind both off there (prod and dev) and recompose. The other Cloud Run jobs import notes modules but never call a reader. F3: the dev pusher literal contract test expects both off values. F4: listen/pusher change note for the retirement. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Git-on-my-level
added a commit
that referenced
this pull request
Nov 28, 2026
…26582) ## What Stage 1 of the 2026-11-28 shadow settlement (David, anx `card:prod-shadows-settled-retire-the-dead`; ruling: R-20261128-01, proposed). Two parts: production stops running the shadows David ruled dead, and new shadows can no longer run forever. Stage 2, a separate PR, deletes the retired code paths. ### 1. Retire the dead shadows (config only, code paths kept for stage 2) | Family | Change | Why it is safe | | --- | --- | --- | | `MEDIA_NOISE_MODE` | listen `off` (overlay + chart); dropped from the implicit-shadow set | off serves the same output as shadow. **This ends new-path serving for the one live-only `MEDIA_NOISE_MODE_SERVE_UID_SHA256S` digest cohort** on the four Cloud Run backends (the Release issue lists that env for removal) | | `ACTION_ITEMS_V2_MODE`, `ACTION_ITEM_VALIDITY_MODE`, `STT_VOCAB_MODE`, `CLIENTS_FROM_SEGMENTS_CHUNKS_MODE` | dropped from the implicit-shadow set, so unset = off | shadow was CPU and logging only (STT vocab shadow never sends Soniox terms; segment chunks return 409 in both modes) | | `SPEAKER_GROUPING_SHADOW` (EXP-004) | `off`, percent `0` on listen, pusher and Cloud Run | readout showed no difference | | `BATCH_PIPELINE_SHADOW_PERCENT` | `0` in the overlay and in the batch-pipeline-worker prod/staging charts (`shadowPercent`) | batch serves at 100% (`omi_runtime_percent{name="batch-pipeline"}`=100; 7 d intake 4.55M batch vs 6 not_cohort), so no non-serving owner is left to shadow | | `TRANSCRIPTION_SHADOW_ENABLED` / `_KILL_SWITCH` | `false` / `true`; new diarization cohort stage `F` (= E with the shadow off) | 7 d: only `skipped_budget` outcomes, zero ok/failed; `omi_legacy_sync_mode`=dark, so it promotes nothing | | `CAPTURE_GROUP_CONTAINMENT_MODE` | `off` in `_base.yaml` and all charts; code default `off` | ruled retire | | `OMI_FLAGS_SOURCE` | `posthog` on listen, pusher and the Cloud Run backends | dual mode made 0 compare reads. desktop-backend stays `dual` (its workflow hard-codes it; follow-up on the Release issue), llm-gateway stays `omi` | Registry rows for these families now say `decision: kill`, `terminal: off` with the ruling in `notes`. The config_switch rows move to `rollout` with `review_by: 2026-12-05` as the stage 2 deletion date. No extension or due date moved. ### 2. Guardrails (all four approved by David) 1. **An unset mode is off.** `config/refactor_modes.py` `mode()` no longer defaults to `shadow`. `_LEGACY_SHADOW_DEFAULT` keeps the old default for five families that still rely on it: `CALLS_RECAP`, `CAPTURE_COVERAGE`, `LIFECYCLE_V2`, `NOTES_PACKET_V2`, `SPEAKER_EVIDENCE`. Each is handed to its owner to bind, ramp or retire. A test caps the set so it can only shrink. 2. **Registry `shadow:` block.** New `_MODE`/`SHADOW` rollout rows created on or after 2026-11-28 must carry `shadow: {readout_by, metric}`, with `readout_by` at most 21 days after `created`. 3. **Auto-expiry.** `scripts/render_shadow_expiry.py` generates `backend/config/shadow_expiry.py`. From `readout_by` + 7 days, `mode()` reads a `shadow` binding as `off` and logs `event=shadow_expired` once. `serve` is never touched. The registry checker fails when the table drifts. The table is empty today. 4. **Watchdog.** In omi-workspace, `infra/rollout/bin/killed_flags_serving.py` reports kill/terminal-off rows that still serve as non-off on live Cloud Run traffic revisions and GKE deployments. It is read-only and runs under `ro-prod`. ## Verification - `scripts/check_feature_flag_registry.py`: OK. `compose_runtime_env.py --check`: up to date. `validate-backend-runtime-env.py --env prod`: passed. - `scripts/test_check_feature_flag_registry.py`: 114 passed. `tests/unit/test_refactor_modes.py`: 21 passed. - Selected backend unit files for the changed paths (423 files): all pass. Two files failed on stale expectations that this PR updates (batch worker chart `shadowPercent` 25 → 0 in prod and staging; the containment registry-row assert), and both pass after the fix. `tests/unit/fixtures/containment_long_pair.py` collects no tests. ## Product invariants affected - INV-MEM-4 `runtime_env.yaml` changes only shadow and flag-source bindings. Memory promotion keeps its existing authority: the retired shadows never served memory writes, and the notes and lifecycle families (NOTES_PACKET_V2, LIFECYCLE_V2) are unchanged here, since the Home v3 owner settles them in #26580. ## Rollout Release owner merges and rolls (David: "I build, Release ships"). Rollback: revert this PR, or for one family set its env back (`BATCH_PIPELINE_SHADOW_PERCENT=25`, `SPEAKER_GROUPING_SHADOW=on`, `TRANSCRIPTION_SHADOW_KILL_SWITCH=false`, `X_MODE=shadow`). Readback after serving: - `omi_runtime_percent{name="batch-pipeline"}` stays 100; - transcription shadow and speaker grouping shadow outcome counters fall to 0; - the `killed_flags_serving.py` finding count drops to the live-only env the Release issue removes. 🤖 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/26582?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/26582?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F26582&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. -->
…ls-shadows # Conflicts: # backend/charts/backend-listen/dev_omi_backend_listen_values.yaml # backend/charts/backend-listen/prod_omi_backend_listen_values.yaml # backend/charts/pusher/dev_omi_pusher_values.yaml # backend/charts/pusher/prod_omi_pusher_values.yaml # backend/deploy/runtime_env.yaml # backend/tests/unit/test_backend_runtime_env_validator.py # backend/tests/unit/test_verify_pusher_config_references.py # config/feature-flags.yaml
…ls-shadows # Conflicts: # backend/charts/backend-listen/prod_omi_backend_listen_values.yaml # backend/charts/pusher/prod_omi_pusher_values.yaml # config/feature-flags.yaml
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.
This PR binds
NOTES_PACKET_V2_MODEandCALLS_RECAP_MODEtooffon every backend reader, so neither shadow path runs any more. It is step 1 of retiring both shadows, which David ruled on 2026-11-28 (cardprod-shadows-settled-retire-the-dead). Step 2 deletes the code and follows before the registry grace ends on 2026-11-30.Why:
*_SERVE_PERCENTor*_SERVE_UID_SHA256Scohort is set either, sooffcannot change output for any cohort. I re-read every Cloud Run service template and all 46 prod GKE deployments on 2026-11-28.refactor_modes.mode()'s default,shadow. In shadow the new path runs but its result is thrown away:NOTES_PACKET_V2: the shadow-active readersepisodes/incremental.pyandmoment_render.pycompute the v2 packet and return legacy output outside serve.CALLS_RECAP:call_metadata.apply_call_metadatareadsboundary_storeand makes no writes.NOTES_PACKET_V2is a different flag fromCONVERSATION_NOTES_V2_ENABLED(deploy/ops/live_only.yaml), which this PR does not touch.User-visible effect: none. Outside serve, both readers already return legacy output.
offtakes the same legacy branch and skips the discarded shadow work.Changes:
backend/deploy/runtime_env/_base.yaml(composed intoruntime_env.yamlbycompose_runtime_env.py): adds{value: 'off', category: rollout}for both keys in all 15 reader blocks (prod and dev for backend, backend-sync, backend-sync-backfill and backend-integration; prod for backend-projection-pump; prod and dev for the Cloud Run jobnotifications-job, which reads both keys throughutils/other/notifications.py→daily_recapfor the daily recap). I swept the other jobs too. x-connector-sync, frame-request-retention and day3-reengagement-email import notes modules but never call a reader.conversation_selfheal_jobhas no deployed runtime binding.config/deployment-setting-classification.jsonclassifies both keys as config.backend-listenandpusherprod/dev Helm values gain matchingvalue: "off"env entries.config/feature-flags.yaml: both families' rows becomedecision: killwith terminaloffand the ruling note.backend/docs/feature-flag-registry.mdis re-rendered--as-of 2026-11-11, matching main's header. Only these rows change.test_backend_runtime_env_validator.py: the synthetic deployed state gains the two bindings.test_verify_pusher_config_references.py: the expected dev pusher literal map gains bothoffvalues.backend/docs/listen_pusher_pipeline/changes/2026-11-28-retire-notes-calls-shadows.md: a new change note covering the readers bound (including notifications-job), the contract section, rollback and readback.Product invariants affected
INV-MEM-4: touched only because
backend/deploy/runtime_env.yamlis a locked path. The change adds two notes/calls refactor-mode bindings and no memory intake, consolidation or promotion key, so memory routing is unchanged.Kill switch / rollback: revert, or set either key back to
shadowinruntime_env.yamland the Helm values. It is config only, with no data written.Verification (local,
omi-heavyon m1):scripts/check_feature_flag_registry.py: OK.test_backend_runtime_env_validator.py+test_verify_pusher_config_references.py: 337 passed.Release:
notifications-jobexecution env show both keysoff.omi_notes_refactor_shadow_total{check="packet"}and{check="output_contract"}(logevent=refactor_shadow lane=L3) stop increasing on the serving revisions (check="short_clip"keeps counting:NOTES_SHORT_CLIP_FLOORis default-on and independent of this mode), and daily notes and call-recap counts hold against the prior 24 h.Failure-Class: none
🤖 Generated with Claude Code