Repository navigation
chore(flags): retire final-pass VAD compaction at its off serving value - #26020
Merged
Merged
Conversation
TRANSCRIPTION_FINAL_PASS_VAD_COMPACTION_ENABLED served off on every surface since its 2026-10-15 creation; the SCA-3682 pipeline docket approved the kill. Both callers are fixed to the serving path: the stored-audio shadow transcribes each window directly, and the shared pyannote final-pass seam (legacy sync, batch, shadow callers) diarizes the complete original PCM unit through utils.stt.diarization.diarize. Word, turn, overlap and embedding clocks stay on the original timeline; original audio, in-flight work and whole-unit pyannote are unchanged. The batch pipeline's own internal diarization compaction is a separate mechanism and is untouched. Deletes the default-off wrapper, its env read and the dedicated compaction tests; removes the registry row and regenerates the flag registry against current main.
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. |
Panel review fixes: record the retired env name in the registry's do-not-reuse tombstones, move the offline detector's final-partial-window test into test_vad_onnx.py, and correct the local_vad docstring now that the compaction caller is gone.
…ording Panel review follow-ups: move the bounded coverage-label mapping test into test_wal_audio_coverage.py (record_coverage_outcome is still live), and describe the shadow path as per-window transcription rather than whole-unit.
Git-on-my-level
added a commit
that referenced
this pull request
Nov 22, 2026
## Summary Retires the never-provisioned separate audio-merge worker phase: `AUDIO_ARCHIVE_SEPARATE_MERGE_ENABLED` and `AUDIO_MERGE_WORKER_URL` are kill rows in the flag registry (David's 2026-11-17 quality-ladder docket ruling, recorded on SCA-3682; delivery tracked as SCA-3691 under SCA-3684). Dark for five weeks; no merge worker exists; the handler URL already covers dispatch. ## Current head: `6ff7b8dea9d7ffc525f1e095437d5e83ac160be4` - The four reviewed commits are unchanged. `507018b2c9` (independent `VERDICT: SHIP`, panel round 4 SHIP) and its three ancestors have the same SHAs. - Three merge commits on top bring main in, to `63214b77cba`. The first resolves the conflict that #26007 (SCA-3683) left in the generated registry doc when it landed first at 09:00:51Z, and regenerates `backend/docs/feature-flag-registry.md` and `backend/deploy/runtime_env.yaml`. The second is a clean merge of three later main commits that touch none of this PR's files. The third (`6ff7b8dea9`, after #26034/#26037/#26040 moved main under the branch) resolves the retirement-stack overlap: it unions the `retired:` list in `config/feature-flags.yaml` (this PR's two entries plus the seven that #26010 and #26014 added and #26037 reserved) and re-renders the doc; everything else auto-merged, and `compose_runtime_env.py --check` confirms `backend/deploy/runtime_env.yaml` is current. - For all 17 files of this PR, the patch against main is line for line the patch reviewed at `507018b2c9` (same removed and added lines, same order), including the two regenerated files — mechanically re-verified at `6ff7b8dea9`. A fresh render and compose on the head produce no diff. - The registry source on this head equals main's with exactly two differences: both keys removed from `flags:` and both present in `retired:` with text identical to the reviewed head. Serving neutrality, verified on every committed surface before deletion: - **Dispatch**: `_audio_merge_handler_url` resolved to `AUDIO_MERGE_WORKER_URL` only when the SEPARATE_MERGE phase admitted a uid. The enable flag is `false` on every surface, so dispatch always resolved to `AUDIO_MERGE_HANDLER_URL`. After this PR it still does, unconditionally. Note the enable flag was the *only* cohort gate in prod: `AUDIO_ARCHIVE_PERCENT` (shared with COALESCE) is `100` on every prod surface and `0` on dev, so setting the flag would have admitted every owner with no ramp. Dispatch would have moved to the worker only once `AUDIO_MERGE_WORKER_URL` was also set, and it was empty on every surface. Two regression tests pin this: one sets the prod condition (percent `100`, flag `true`, worker URL set) and asserts the phase stays unadmitted and dispatch/audience stay on the handler URL; the other feeds a token whose audience is the worker URL through the real verifier and observes the 403. Both fail when the old list-audience verifier is restored (mutation-checked). - **Inbound OIDC audience**: `verify_audio_merge_cloud_tasks_oidc` accepted `[handler_url, worker_url]`; the worker URL is empty on every surface, so the effective audience was always the single handler-URL string. After this PR the audience is exactly that string. - **Queued deliveries**: every task already in the `audio-merge` queue was enqueued with the handler URL as its OIDC audience, so the token Cloud Tasks mints at delivery is one the handler still accepts. No enqueuer can request a worker-audience token anymore. This is established by code reading and the two unit tests, not by observing a live delivery; a real one needs a production enqueue, which is outside this change's authorization. - **Custody/paid work untouched**: the merge queue, invoker SA, per-user encryption, raw audio ownership and the paid merge path are unchanged — this only deletes the never-taken dispatch branch and its audience expansion. Serving state, from two sources: - Committed config at main `4119fa3a78`: the flag `false` and the worker URL `''` on all 13 composed-manifest surfaces, in the base source, and on all four prod/dev listen and pusher chart values files. No overlay names either key. - A read-only `ro-prod` sample at about 08:20Z: the flag is `false` on the traffic-serving revisions of `backend`, `backend-integration`, `backend-projection-pump`, `backend-sync` and `backend-sync-backfill`, with the worker URL present and empty; both keys are absent on `desktop-backend` and `omi-enterprise-backend`; and all 20 Ready `prod-omi-backend-listen` pods and all 18 Ready `prod-omi-pusher` pods have the flag `false` and the worker URL present with an empty value (the API omits an empty `value`; the deployed chart renders `value: ""`). I did not exec into pods to read the process environment. ## Changes - `backend/config/audio_archive.py`: remove the `SEPARATE_MERGE` phase branch (unknown phases still fail closed via the final `return False`). - `backend/utils/cloud_tasks.py`: `_audio_merge_handler_url()` drops the uid/worker branch; both enqueue paths and the audio-merge OIDC verifier use the plain handler URL. - Deploy: remove both envs from `backend/deploy/runtime_env/_base.yaml`; `backend/deploy/runtime_env.yaml` regenerated with `compose_runtime_env.py` (13 surfaces × 2 keys, all `false`/`''`); removed from the prod/dev listen and pusher chart values; removed from `config/deployment-setting-classification.json`. - Registry: both rows moved from `flags:` to the `2026-11-22` group in `retired:` (reintroduction guard); `backend/docs/feature-flag-registry.md` regenerated against main, most recently `63214b77cba`. - Runbook `sync-ingest-archive.md`: drop the phase row, the never-used separate-worker provisioning paragraph, the separate-worker cost row, and the stale "worker" mentions. - Change note: `backend/docs/listen_pusher_pipeline/changes/2026-11-22-separate-merge-retirement.md` (required by `backend/AGENTS.md` for audio changes). - Tests: delete the two SEPARATE_MERGE-specific tests and the now-unused import; add the two regression guards above; drop the retired keys from the runtime-env and pusher chart contract fixtures. ## Coordination - **SCA-3683 (#26007) landed first**, at 09:00:51Z. Its relabel of the `AUDIO_CUSTODY_FRAMED_PERCENT` row sits next to the `AUDIO_MERGE_WORKER_URL` row this PR removes, which conflicted the generated doc. Resolved here by re-rendering. This PR only moves its own two rows in `config/feature-flags.yaml`; every other row is byte-identical to main, including #26007's relabels. - **SCA-3694 (#26020, merged)** retired `TRANSCRIPTION_FINAL_PASS_VAD_COMPACTION_ENABLED` the same day; #26010 and #26014 retired seven more names (reserved by #26037) after the earlier head. The `2026-11-22` group in `retired:` is the alphabetical union: `AUDIO_ARCHIVE_SEPARATE_MERGE_ENABLED`, `AUDIO_MERGE_WORKER_URL`, the four `EPISODE_BOUNDARIES_*` keys, `PARAKEET_WINDOW_DIARIZATION`, `SONIOX_ELAPSED_AXIS`, `STT_RESILIENT_RECONNECT`, `TRANSCRIPTION_FINAL_PASS_VAD_COMPACTION_ENABLED`. - **The reintroduction guard for these two names is active.** A probe file reading either name makes the plain checker report `retired name reintroduced`, and the tree without it reports `feature-flag registry: OK`. With #26007 landed, the 18 Nov-29 `ops_kill` exceptions no longer cut the check short, so this holds for the forward-dated run too: with `--as-of 2026-11-30`, this head's failure list is main's list minus exactly these two keys. - Any later retirement that lands before this PR needs the same mechanical regeneration again; the patch stays line-identical. - The `AUDIO_ARCHIVE_PERCENT` row's notes still mention SEPARATE_MERGE. That is the verbatim 2026-11-09 ruling text on a pending row owned by lead2 (disposition with SCA-3685), and "(SEPARATE_MERGE is already being retired)" stays accurate, so it is deliberately left for that lane. ## Testing (bounded, on head `6ff7b8dea9`; suites re-run after the third merge) - Audio merge/archive suites (`test_audio_merge_tasks`, `test_audio_merge_destructive_deferral`, `test_audio_placement_merge`, `test_audio_chunk_archive_listing`): 41 passed. - Runtime-env and pusher-config suites (10 files, incl. `test_backend_runtime_env_validator`, `test_verify_pusher_config_references`): 680 passed. - `scripts/test_check_feature_flag_registry.py`: 110 passed. - `python3 scripts/check_feature_flag_registry.py`: `feature-flag registry: OK`; `python3 backend/deploy/compose_runtime_env.py --check`: `runtime_env.yaml` is up to date. Both re-run at this head; the reintroduction guard for the two names is active in the checker run. - The full pre-push gate passed at this head before the push (the PR body supplied via `OMI_PR_BODY_FILE` for invariant discovery). - On the earlier head the same-shaped suites passed (65 audio-merge + sync-ingest-archive; 336 runtime-env + pusher-config; `test_sync_v2.py` 193; the other `cloud_tasks` consumer files per file or in small groups). The merge after that head touches none of this PR's files, and the patch-vs-main is line-for-line identical, so those runs carry. - Pre-existing and not from this change: large mixed test batches error identically on a pristine base, and `test_sync_transcription_prefs.py` errors 59/59 identically on a pristine base. ## Panel review `omi-panel review` round 1 (review-20261122t062934-a741: luna + deepseek completed, glm-flash launch failed) returned FIX-FIRST with 6 findings. F1–F5 accepted and fixed in this PR (retired-list entries, change note, runbook worker mentions, inert-env regression test, unused import); F6 rejected as another lane's ruling record. Round 2 (review-20261122t070503-ff43, same two models) returned SHIP with 3 findings, all mine to fix. My PR body wrongly said the cohort percent was 0 everywhere and wrongly called the reintroduction guard latent, and a docstring still said "merge worker". Round 3 (review-20261122t072621-21a2) returned SHIP with 2 nits. The change note overstated that the flag alone would have moved dispatch, and the guard now observes a worker-audience token being refused. Round 4 (review-20261122t080133-6456) on `507018b2c9` returned SHIP with 1 nit and no change required: the `AUDIO_ARCHIVE_PERCENT` row note, left for its owning lane. Every round ran on two of three models (luna and deepseek); glm-flash failed to launch each time. No fresh panel round was run on the three merge commits; their diff against main is line for line the round-4 diff. Luna recorded carry-forward SHIP verdicts on SCA-3691 — first at the earlier head (10:05Z), then at the current head `6ff7b8dea9`. ## Product invariants affected - INV-MEM-4
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.
What changed and why
Retires
TRANSCRIPTION_FINAL_PASS_VAD_COMPACTION_ENABLED, a default-off localspeech VAD compaction read that served off on every surface since its
2026-10-15 creation. The SCA-3682 pipeline docket (Multica, 2026-11-22)
approved the kill: the flag is already at its kill value everywhere, so the
removal fixes each read to the value prod serves. No serving behavior changes.
Both callers are folded to the off path: the stored-audio shadow calls
_shadow_parakeeton each audio window directly, and the shared pyannotefinal-pass seam in
run_final_pass(legacy sync viafinal_pass_sync, batchvia
final_pass_batch, and the shadow caller) diarizes the complete originalPCM unit through the new
utils.stt.diarization.diarizewhole-unit seam.Word, turn, overlap and embedding clocks stay on the original timeline;
original audio, in-flight work and whole-unit pyannote are preserved. The
diarizer subservice's own internal speech compaction
(
speech_compaction.diarized_secondsprovenance) is a separate mechanism andis untouched.
Deleted:
backend/utils/stt/vad_compaction.py(the unreachable compactionwrapper and sample-exact clock mapping),
backend/config/final_pass_vad.py(the env read),
tests/unit/test_final_pass_vad_compaction.py, the registryrow, and the test's shard-weight entry. The env name is tombstoned in the
registry's do-not-reuse
retired:list,feature-flag-registry.mdisregenerated, and the deleted test file's two still-live cases moved to
test_vad_onnx.py(offline detector final-partial-window) andtest_wal_audio_coverage.py(bounded coverage-label mapping). Living docs nowstate the whole-unit contract.
Product invariants affected
none
How it was verified
python3 scripts/check_feature_flag_registry.py— OK (pre-existinggrandfathered/keep-relabel warnings only; the retired key no longer appears
as an unregistered read or a stale row).
bash backend/test.shon the six touched/nearby files —test_batch_final_pass{,_outage,_repro,_resources,_transient}.pyandtest_transcription_shadow.py: 410 tests pass. The fixtures keep the samediarizer seam (
final.diarize); tests that restore the real HTTP adapternow patch it with
utils.stt.diarization.diarize.test_backend_runtime_env_validator,test_final_pass_assignment,test_final_pass_rehome,test_http_diarizer_retry,test_local_quality_eval,test_read_transcription_shadow_result,test_record_admission_review_fixes,test_rollout_cohort_membership_parity,test_runtime_image_contracts:558 tests pass.
bash backend/scripts/typecheck.sh(full-backend pyright): 0 errors.Serving-set evidence: the key has no declaration in
backend/deploy/,backend/charts/,.env.templateor the cohort/stage configs; the onlyreaders were the two wrappers removed here, and the registry pinned it unset
(off) on every sampled runtime. The batch pipeline's separate in-worker
compaction is unaffected.
Tests
Serving-parity coverage is the existing final-pass and shadow suites
(above): the lane/prod_shaped fixtures patch the same seam, the HTTP
adapter tests exercise
backend.diarizedirectly, and outage/transientsuites cover retry and failure surfaces. The deleted test file's
compaction-machinery cases went with the code; its two still-live cases moved
rather than being dropped (see above).
UI evidence
UI-Evidence: none -- backend flag retirement; no UI change.
Failure class (fixes)
Failure-Class: none