Repository navigation
fix(stt): route multilingual-profile users' uploads by audio, not the en pin; add lab STT routing - #26431
Conversation
… en pin; add lab STT routing
A multi-language user's conversations carry the app language ('en') as their
pin, and batch admission trusted it, so their Mandarin went to batch Parakeet
(no zh) and came back as English-sounding nonsense. When the user's own live
language profile shows a non-Parakeet language, the pin is no longer capability
proof: the upload takes the existing sampled path (vendor LID on the first
window, self gate on every later window, legacy multilingual STT on refusal).
Kill switch BATCH_MULTILINGUAL_PROFILE_ROUTING_ENABLED (ship-on). No extra I/O.
Pipeline lab: a routing step (OMI_PIPELINE_LAB_STT_ROUTING=product) routes each
audio recording with production's admission, sampled-LID and legacy selection
under the arm's env and plays the chosen engine's cassette; metric stt_routing
reports unsupported speech sent to Parakeet. On an owner's real evening the
compare went from 100% to 8.5% of CJK speech on Parakeet.
Failure-Class: FC-unknown-language-treated-as-model-capability
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8e72d993ca
ℹ️ 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".
…TT routing lab Panel review on #26431: - Admission returns its own reason, multilingual_profile; sync intake samples it like unknown_multilingual_conversation (input multi) and logs outcome=reclassified; the record lane gives a new owner to legacy; draining/dark admits it as multi instead of the pin. - Unsupported profile codes come from language_class; und is not evidence and a canonical code with a Parakeet alias (sr) counts as supported. - Lab: legacy uniform routes keep the first file's engine; an empty upload raises; refused samples count only classified self-gate windows; cassette pins never carry empty keys and an unmapped routed engine is a miss; LID probes need --stt-budget-usd and reserve/settle their list price in a spend ledger. - Tests for the record lane, intake profile paths, kill switch, and each lab fix. - Contract paragraph in listen_pusher_pipeline.mdx plus a changes note. Failure-Class: FC-unknown-language-treated-as-model-capability Co-Authored-By: Claude Opus 5.5 <[email protected]>
… env isolation Late panel findings on #26431: - live_stt_language_sessions counts classified segments, not words; the floor is renamed PROFILE_MIN_UNSUPPORTED_SEGMENTS (same values) and docs/flag notes say so. - Lab legacy files follow resolve_file: with the prerecorded language guard off they select for 'multi' without a probe. - Lab routing clears product switches the arm's env does not set, so an ambient value in the lab process never stands in for production's default. - The step table states the one-unit-per-recording simplification. - Tests: guard off, a sub-second legacy recording, ambient switch isolation. Failure-Class: FC-unknown-language-treated-as-model-capability Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7ad8656c09
ℹ️ 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".
…ification log Panel review-20261126t210714-b8ee on #26431: - Each lab route records the vendor LID probes production pays (sample plus guarded legacy files); the stt_routing metric counts those, not legacy pieces. - A routed record-vendor run refuses to start unless both routes have a cassette mapping, so a bad mapping fails before any paid probe. - Test pins the outcome=reclassified log line the production readback counts; drop a tautological assertion. - Docs state that a record-lane batch_sync_v1 owner keeps its pin under draining/dark legacy (open before legacy drain, SCA-4810). Failure-Class: FC-unknown-language-treated-as-model-capability Co-Authored-By: Claude Opus 5.5 <[email protected]>
…g batch owners Panel review-20261126t210714-b8ee F6 (independently resolved accept): a conversation the record lane already gave to batch_sync_v1 skips admission, so a profiled user's upload inherited the supported 'en' pin. Batch inheritance now goes through _inherited_language, which returns None when pin_untrusted(user) (multi-language, switch on, profile shows non-Parakeet speech): such units are classified per unit as 'multi' in every legacy mode. The helper replaces the call inside accept_upload, which is at pyright's complexity limit. Failure-Class: FC-unknown-language-treated-as-model-capability Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c0a8452416
ℹ️ 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".
… pin; lab hardening Panel review-20261126t215043-f999 on #26431: - The profile share is over classified segments: 'und' counts in neither numerator nor denominator, and a Parakeet alias (sr) counts as supported. - pin_untrusted also honors BATCH_ADMISSION_LANGUAGE_EXCLUSION_ENABLED, so either kill switch restores the former admission and input selection in both lanes. - Lab: a self-gate pass that leaves a recording unrouted is a routing error; stand-in subprocess failures and short output raise RoutingError; STT_GPU_FLEET_OFF is isolated from the lab process; the step table names the exclusion-off gap. - Tests: sampling off keeps legacy; live-record policy keeps its multi escape; und share cases; exclusion kill switch. - Docs: rule wording, the reclassified attribution, live-record escape and the STT_LEARNED_LANGUAGE_PROFILE dependency. Failure-Class: FC-unknown-language-treated-as-model-capability Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d6f16bfc12
ℹ️ 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".
…nce off; shadow mirrors Panel review-20261126t223125-ad21 on #26431: - The declared language (_declared_language) is 'multi' for a pin_untrusted user, so with inheritance off an existing batch_sync_v1 owner's route no longer sees the 'en' pin. _inherited_language takes the inherit switch (no new branch in accept_upload). - Shadow intake does not inherit a flagged user's pin either. - Profile helpers import at module top and classify each code once. - Lab: a routed cassette miss says to record each engine with routing unset. - Docs: turning STT_LEARNED_LANGUAGE_PROFILE off should be paired with the kill switch. Failure-Class: FC-unknown-language-treated-as-model-capability Co-Authored-By: Claude Opus 5.5 <[email protected]>
…uting # Conflicts: # backend/testing/pipeline_lab/scenario/audio.py # backend/testing/pipeline_lab/scenario/run.py
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 79f3ee730c
ℹ️ 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".
…spend fidelity Panel review-20261126t231207-b807 on #26431: - Profile codes are classed by language_class alone: the canonical 'sr' (Serbian, Croatian or Bosnian) counts as unsupported, so those speakers are checked on audio instead of keeping the pin. The alias exception is gone. - Shadow intake declares 'multi' for a flagged user, matching serving with inheritance off. - Lab: legacy files use legacy sync's request language and probe only when it is unknown (resolve_file); a sent-but-failed LID probe stays charged against the cap; a mixed upload's unmapped engine is a miss in replay too; STT_PRERECORDED_SHORT_LID_ GUARD_ENABLED is isolated; the exclusion-off table row names the provider route. - Test: the admission exclusion kill switch restores the pinned input through intake. - Readback: count sync intake's reclassified decisions and the record lane's excluded reason=multilingual_profile. Failure-Class: FC-unknown-language-treated-as-model-capability Co-Authored-By: Claude Opus 5.5 <[email protected]>
…intake Panel review-20261127t002048-e77c on #26431: - profile_inherited_language (config.batch_pipeline_language) replaces intake's private helper and shadow intake's inline copy; a test asserts both stages use it. - The lab step table states the self-gate stand-in has no P(supported) floor, so lab admissions are an upper bound and legacy audio/spend a lower bound. Failure-Class: FC-unknown-language-treated-as-model-capability Co-Authored-By: Claude Opus 5.5 <[email protected]>
Brings in #26473 (live_words_cascade) and #26431. Conflicts kept both sides: - api/conversations.dart, capture_controller.dart: the End request takes both finishCut (X-Omi-Finish-Cut) and liveTail (live_tail body field). - conversations_v3_processing.settle_processing: the SLI's update dict and eligible_after check keep the cascade's absorbed-landing covers_through. - v3/service.py: import both finish_home_sli and live_tail. Co-Authored-By: Claude Opus 5.5 <[email protected]>
## Summary Preserve each legacy audio piece's selected provider, model, and language in the pipeline lab. Cassette lookup now uses that piece's routed language, and the lab splices words from each matching cassette into the corresponding time range. This covers recordings where the same provider handles multiple languages as well as mixed-provider uploads. Follow-up to the review of PR #26431 at `6babf46f522708c849f6c1585c409f6d8f041f8a`. ## Verification - Python formatting completed; `git diff --check` passed. - `python -m testing.pipeline_lab affected origin/main` identified 15 affected scenarios; those scenarios and focused STT routing tests were not run. `make preflight` was not run. - The pre-commit PR preflight passed its 12 checks; it reported zero changed paths. Its manifest contract check ran 78 tests and passed. - `scripts/failure-class validate` passed for the fix commit and this declaration. Failure-Class: none <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/26492?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/26492?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F26492&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. -->
…te table); page instead of a Soniox cap (#26526) ## What this changes Languages Parakeet cannot serve (Mandarin, Japanese, Korean, Hindi, Arabic, Hebrew and others) start on **Soniox** in the batch pipeline, with Modulate Velma as failover. English and the other Parakeet languages stay on the GPU. This is per unit, so Soniox only gets the speech that needs it. Decided by David on 2026-11-27 (SCA-4917). - **Route table:** `backend/deploy/batch-pipeline/vendor_route_table.prod.json` moves `en-overflow-1116` → `soniox-unsupported-1127`. The table is served as `BATCH_VENDOR_ROUTE_TABLE` on backend-sync, backend-sync-backfill and backend-integration; `runtime_env.yaml` is regenerated. - `gpu_unsupported: [soniox, modulate]`. It was `[modulate, soniox]`. - Soniox: `failover_only: false`, `price_usd_per_audio_hour: 0.12` (list), `daily_audio_hours_cap: null`, `monthly_budget_usd: null`. - Unchanged: `en: [gpu, modulate, soniox]`, `gpu_supported: [gpu]`, `*: [gpu]`, and the Modulate cap of 5,000 audio-h/day. - **Code lock removed:** `vendor_route_contracts.FAILOVER_ONLY_SERVICES`, a lead rule from 2026-11-01, made any table that listed Soniox as a primary invalid. `failover_only` stays a per-table choice for every vendor. - **No Soniox cap, a page instead:** David does not want user growth to hold units on a cap. The new alert `omi-batch-soniox-daily-hours` (tier page, two-lane-lead) fires above 1,500 batch Soniox audio-h in 24 h, about $180 at list price. It is in `live-alert-gate.json`, so the production alert import fails closed without it. The query was probed against prod GMP and reads about 156 audio-h for the 24 h to 2026-11-27T16:0xZ. - **Behaviour change to note:** because Soniox is now a primary in the English row too, a saturated GPU ring with Modulate down overflows fresh English to Soniox instead of waiting on the ring. That needs both outages at once, and the page bounds the spend. ## Why Soniox This is a public eval run through production's own Velma and Soniox clients: FLEURS dev (12 languages, about 10 min each) plus ASCEND test (code-switched Mandarin/English), in 60 s blocks. Soniox beats Velma on every language except English, where they tie: | set | metric | Soniox | Velma | |---|---|---|---| | English | WER | 4.5% | 4.7% | | Spanish | WER | 3.8% | 5.3% | | Mandarin | CER | 8.4% | 21.8% | | Japanese | CER | 4.1% | 12.8% | | Korean | CER | 5.6% | 16.8% | | Hindi | WER | 8.3% | 33.6% | | Hebrew | WER | 17.8% | 58.9% | | Arabic | WER | 10.9% | 22.0% | | ASCEND code-switch | mixed | 11.3% | 16.9% | Soniox had 0 failures in 156 files, with p95 latency of 5.3 s per 60 s file against Velma's 23.7 s. The harness, scorer and full table are in omi-workspace `data/run-2026-11-26-multilang-stt-lab/eval/`. ## Reach and rollout The table serves the `batch-vendor-routing` cohort: 25% in prod on 2026-11-27, with a registry ramp plan to 100% by 2026-11-29. David asked on 2026-11-27 for the ramp to go to 100% now, so the built-in route logic can be deleted. The ramp write goes to the release owner separately. Owners outside the cohort keep the built-in route (Modulate) for these languages. ## Cost 24 h to 2026-11-27T05:5xZ (GMP, summed 10-minute increases): batch Modulate 528 audio-h, batch Soniox 132 audio-h (failover). At 100% vendor routing, moving unsupported-language units from Velma ($0.06/h) to Soniox ($0.12/h) adds roughly **$30–75/day**: today's units, plus the multilingual-profile units that #26431 now classifies per unit. There is no hard cap; the page is the bound. ## Rollback Put `en-overflow-1116` back in `BATCH_VENDOR_ROUTE_TABLE` on the sync services (it is in git history). Units already admitted keep their route. If an older revision receives the new table, it rejects it (Soniox not failover-only) and serves its last valid table, so a mixed fleet is safe. ## Readback after serving (on SCA-4917) - `omi_batch_pipeline_vendor_route_decisions_total{route="soniox"}` by reason, and Soniox audio-h/day against the estimate. - Failovers Soniox → Modulate, and held units by reason. - The owner's next code-switched conversation: Mandarin units served by Soniox, English by the GPU. ## Test plan - [x] 13 route-table suites (contracts, selection, prod table, health, overflow, provider stage, failover, outage drills, sim drills, unsupported languages, audio language, held contract, oldest-age alerts): 908 passed. - [x] `provision_monitoring_alerts.py --regenerate` and `--lint`: 271 definitions valid. - [x] `test_batch_soniox_daily_hours_alert.py`: the page's query, 24 h window, firing at 1,500 h (1,499 and 1,500 quiet, 1,500.5 fires), 5 m duration, page routing, the counter it reads is the one emitted, it is in the fail-closed `live-alert-gate.json`, and the prod table has no Soniox cap. Monitoring contract suites and the GMP inventory pass (547 passed). - [x] `check_runtime_env_compose.sh`: up to date. `alert_backtest.py --lint`: no failures (the attempt-audio counter is declared, as the overflow counter is). Flag registry re-rendered: it embeds the prod table value. ## Product invariants affected - INV-MEM-4: path match only. The regenerated `backend/deploy/runtime_env.yaml` changes only the `BATCH_VENDOR_ROUTE_TABLE` value on the sync services; no memory intake, promotion or projection behaviour changes. Failure-Class: FC-unknown-language-treated-as-model-capability 🤖 Generated with [Claude Code](https://claude.com/claude-code)
What this fixes
A multi-language user's conversations are pinned
language=en(the app language).batch_admission_languagetrusts that pin, so their sync uploads go straight to batch Parakeet (tdt-0.6b-v3, 25 European languages, no Chinese, Japanese, Korean or Vietnamese). Parakeet then writes English-sounding nonsense for the Mandarin. The language check never runs:requires_multilingual('en')is false. Only GPU-overflow uploads reached the multilingual vendor.Seen on an owner account on 2026-11-25 (Mandarin/English family evening). In production, 3,142 s of speech went to Parakeet with 0 Chinese characters, and 1,790 s went to legacy Velma with 3,804 Chinese characters.
The change
Product (
config/batch_pipeline_language.py,utils/batch_pipeline/intake.py): for a multi-language user whose own live speech shows a language Parakeet can't transcribe, the supported pin is no longer treated as evidence. Admission returns a new reason,multilingual_profile, so logs and readbacks can attribute it. What happens next depends on the path:Sync intake, legacy ON:
_batch_admissionmaps it onto the existing sampled path, the one used forunknown_multilingual_conversation. The upload is classified asmulti, the first 30 s speech window is vendor-probed, and every later window goes through the self gate. Uploads over 600 s are refused. A refused upload goes to legacy multilingual STT. Intake logsevent=batch_admission_language outcome=reclassified reason=multilingual_profile.Record lane, legacy ON: it has no sampler, so a new owner claim gives the conversation to
legacy_final_pass_v1, the same as any language exclusion. Legacy then runs per-file language detection.Legacy draining or dark, and existing batch owners: the upload is admitted to batch as
multi, classified per unit. Batch inheritance (_inherited_language, viapin_untrusted) never takes such a user's supported pin. That also covers a conversation the record lane already gave tobatch_sync_v1, which skips admission, in every legacy mode.Not covered: the native record lane (an existing
batch_live_v1owner) stages units with the declared pin. It needs its own record-custody change, tracked as SCA-4892.Type checker:
accept_uploadis at pyright's "too complex to analyze" limit, so the new logic lives in a wrapper, and the existing exclusion branch reuses_sampled_refusal(now with a reason) to make room. There is no behavior change there.Unsupported codes: these are decided by the codebase's own
language_class.undis not evidence. An ambiguous canonical code such assr, which the live profile stores for Serbian, Croatian and Bosnian alike, counts as unsupported, so those uploads are checked on audio.Signal:
live_stt_language_sessions, the rolling 20-session live language projection (STT_LEARNED_LANGUAGE_PROFILE, on in prod). The user is flagged when 2 or more sessions each have at least 10 segments in a non-Parakeet language, making up at least 20% of their classified segments (undcounts in neither). It sits on the user document both admission paths already read in full, so there is no extra I/O. The projection counts segments, not words.Who is unaffected: English-only users with classifier noise, European-language users, and anyone in single-language mode keep the pinned route. Tests cover each case.
Long uploads: for a flagged user, a sync upload over 600 s is refused by the sampler before any probe and goes to legacy multilingual STT, the same as today's
unknown_multilingual_conversation. That is deliberate. Without language evidence, the multilingual engine is the one that is right for both languages, while Parakeet drops the Mandarin. The cost is multilingual vendor STT instead of GPU Parakeet for that cohort's long uploads, and the lab compare above includes it.Kill switch:
BATCH_MULTILINGUAL_PROFILE_ROUTING_ENABLED, ship-on.falserestores pinned admission. It is registered infeature-flags.yaml,flag_budget.jsonand the deployment classification.BATCH_ADMISSION_LANGUAGE_EXCLUSION_ENABLED=falserestores the former behavior too.Cohort caveats: a policy with live record enabled keeps its existing
multiescape to legacy before sampling, so Mandarin still reaches multilingual STT, without a probe. The signal depends onSTT_LEARNED_LANGUAGE_PROFILEstaying on. Stored rows persist without expiry, so turning learning off should be paired withBATCH_MULTILINGUAL_PROFILE_ROUTING_ENABLED=false; backend-sync does not carry the listen setting. Shadow intake mirrors serving and skips the flagged pin. Refused samples are recorded under theunknown_multilingual_conversationexclusion, and thereclassifiedline attributes them.Pipeline lab (
testing/pipeline_lab/stt_routing/): the lab had no routing step. It played whatever cassette a scenario pinned, so a kill-switch-on vs off compare transcribed identically. This PR adds that step.OMI_PIPELINE_LAB_STT_ROUTING=product, eachaudio_filerecording is routed by production's own code under the arm's env:batch_admission_language, intake's_speech_windowsandSAMPLE_SCAN_SECONDS,LanguageDecision.parakeet_safe,language_class, andget_prerecorded_servicefor legacy files. The recording then plays the cassette of the engine chosen.--stt-budget-usdspend ledger. A record run refuses to start unless both routes have a cassette mapping. A probe that was sent but failed stays charged against the cap. A mixed legacy upload whose second engine is unmapped is a miss. Legacy files probe only when legacy sync's request language is unknown, asresolve_filedoes. The self-gate windows use a local Whisper-base stand-in, also recorded once. Replays never call a vendor.resolve_file(guard off ->multiwithout a probe; guard on -> the recorded vendor answer, without the self gate's confident skip). A mixed upload plays each engine's words inside its own pieces.stt_routingforscenario comparereports audio per route and the vendor probes production would pay for (counted per route, not per piece). Given an independent per-audio reference, it also reports unsupported speech sent to Parakeet.scenario/run.pypasses the product env (profile + scenario + arm) toprepare.Lab evidence (owner's real audio, private; nothing from it is in this PR)
scenario compare, two arms on the same code, 72 production recordings (2.9 h, 2026-11-25 evening), recorded cassettes and language answers:The lab's self-check stand-in is Whisper-base's top-1 language. Production also refuses a window below its P(supported) floor or when the gate is unavailable. So the lab's Parakeet admissions are an upper bound, and its multilingual audio and vendor cost are a lower bound.
Both arms passed and Home was built through the product route. The reference is per-word CJK-script timing from Velma cassettes, computed outside either arm.
Lab gaps found while dogfooding (follow-ups, not in this PR)
audio_files, sofetch-owner-audiofinds no audio for them; per-recordingchunks/andraw-live/reads were needed.record-vendorimports the product chain, which needsENCRYPTION_SECRETto load.unsupported_languageatvad_windows.local_parakeetreloads the model per file.An engine comparison on the same audio, 293 VAD units scored by agreement, found Soniox best on code-switched Mandarin/English. Velma mislabels short Chinese clips. Whether the multilingual route should use Soniox is a separate decision.
Docs
The contract paragraph is in
docs/listen_pusher_pipeline.mdx(batch admission language), and the changes note isdocs/listen_pusher_pipeline/changes/2026-11-26-multilingual-profile-routing.md.Rollback
Set
BATCH_MULTILINGUAL_PROFILE_ROUTING_ENABLED=false; admission goes back to trusting the pin. No data or schema changes.Readback after serving
Three production numbers will prove it:
outcome=reclassified reason=multilingual_profilelines (sync intake admission decisions, once per attempt) plusoutcome=excluded reason=multilingual_profile(the record lane's same decision);omi_batch_pipeline_language_detection_totalgainsdecision=multilingualdetections from sampled uploads;parakeet.Test plan
tests/unit/test_batch_multilingual_profile_routing.py: profile thresholds, noise, European languages, single-language mode, kill switchtests/unit/test_batch_admission_language.py: profiledenpin sampled (Chinese stays on legacy, English admitted after the self gate), admitted asmultiwhen draining/dark, kill switchtests/unit/test_batch_admission_language_router.py: record-lane new owner per legacy mode and kill switchtests/unit/test_pipeline_lab_stt_routing.py: sampled admit/refuse per window, scan limit, silent upload, legacy pieces (first file's engine, empty upload), env per arm, cassette pin without wildcards, LID probes reserve and settle against--stt-budget-usd, metricbash test.sh(changed-files selection): 0 failurestests/unit/test_pipeline_lab_scenario_audio.py,test_pipeline_lab_scenario.py,test_pipeline_lab_compare.py,test_pipeline_lab_ux2_compare.py(unchanged, pass)tests/unit/test_flag_budget.py,scripts/check_feature_flag_registry.pyLine-Count-Exception: backend/utils/batch_pipeline/intake.py | 1585 -> 1599 | the multilingual_profile admission wrapper (attribution log, multi input) sits beside accept_upload, which is at pyright's complexity limit; splitting intake is out of scope for this fix
Failure-Class: FC-unknown-language-treated-as-model-capability
🤖 Generated with Claude Code