Repository navigation
perf(backend): backend bottleneck bundle: eight open PRs in one, every switch off - #26875
Conversation
…es in batch Reliability experiment one_capture_transport (Omi flag store rule, default off, per account), backend half. The phone-file grant sends a session's pendant audio to batch as uploaded files. It was given without regard to how the server transcribes the session, so a session recognised live (a language batch does not take, a profile mismatch, a capture batch does not own) could have the same audio recognised on its provider stream and again in batch. With the experiment on, the grant goes only to a session with server_batch_only; a live session is refused with outcome live_session, is not deferred, opens its provider stream from the first frame and gets no grant on renewal. mobile_batch_admission also carries server_batch_only, true or false, on every renewal, so a phone running the app half can keep pendant audio off a batch-only socket and resume at once if the session turns live. Off, admission and both payloads are unchanged. Failure-Class: none Co-Authored-By: Claude Fable 5.2 <[email protected]>
… keeps for batch Reliability experiment one_capture_transport, app half (same flag store rule as the backend half, default off). A batch-only session's audio is transcribed from uploaded files, yet the phone also streamed every packet its phone-file journal did not take and uploaded a safety copy of it. With the experiment on, when the server says it only keeps the connection's audio for batch (server_batch_only on ready, and on each grant renewal from a server running the experiment), a pendant packet is not sent: it is in a phone file, or in the safety copy when the journal declined it, and uploads once. - Packets are held until the first answer (the existing verdict hold, now also for a connection that did not ask for the preview), so none reaches a batch-only connection first; a live connection gets them in order and then streams as before. - The safety copies of a batch-only stretch are not stamped with the server's recording row, which holds none of that audio. - Custody first: a packet the safety copy refused is still sent, and capture end still hands not-yet-durable copies to an open connection. Off, routing is unchanged. Failure-Class: none Co-Authored-By: Claude Fable 5.2 <[email protected]>
…t visit
A builder pass that is not partial wrote the stored outline list from the
stretches it loaded only, so the outline of every other stretch was dropped.
When such a stretch was loaded again with the same lines and the same prompt
(a late line elsewhere in its recording, a speaker field write that re-arms
the recording row), the pass missed the list and paid for the same model call
again; a third visit took the fallback outline, because a cache key gets two
model attempts.
Experiment outline_keep_stored (Omi flag store rule, per account, default
off): a live builder or on-open pass keeps the successful model outlines of
unvisited stretches, newest first, within 128 rows and 256 KiB. The cache key
is unchanged, so only an exact repeat is answered from the list. Backfill and
re-derive passes are untouched.
omi_conversations_v3_outline_reuse_total{source} counts hits on the list:
visited (as on main), kept (a model call saved) and kept_open. It is added to
the backend-sync scrape keep rule.
Failure-Class: none
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Both sides register an experiment and add a counter to the backend-sync scrape keep rule; the scenario reach map is re-measured with both sets of scenarios. Failure-Class: none Co-Authored-By: Claude Fable 5.2 <[email protected]>
…sport # Conflicts: # backend/config/reliability_experiments.py
Failure-Class: none Co-Authored-By: Claude Fable 5.2 <[email protected]>
The end-to-end test opened its socket with codec=opus, the only e2e test to do so. The hermetic runner has no native Opus library, so the session closed with unsupported_audio_format before the first message. The test sends no audio, so it now uses pcm8 like its sibling tests. The app test carried an import it no longer used, which the analyzer ratchet counts as a new finding. Failure-Class: none Co-Authored-By: Claude Fable 5.2 <[email protected]>
…(fresh_class_for_new_audio, default off)
A phone upload without server capture proof is filed in the backfill sync lane and queued as RECENT
whatever its age. At the 2026-11-30 weekday peak such uploads under 10 minutes old waited a median
154 s for a GPU worker (p90 20 min); the fresh class waited 6 s in the same hours.
With the flag store rule on for the owner, a backfill-lane upload whose age is inside the existing
10-minute fresh bar has its new GPU units served as FRESH: the job row carries priority 0 and
admitted_priority 1. The work item, the sync lane, compute admission, the fair-use meter source and the
enrichment queue binding keep reading the admitted class or the lane. A promotion covers the first wait
(a rejoining row returns to its admitted class) and pauses while the fresh ring holds 600 or more
waiting units; a failed or hung count means no promotion and does not forget a pause. Vendor-route
uploads, automatic releases, repair re-drives and uploads held to be combined are never promoted.
It reorders the queue and adds no capacity.
Rows also rejoin a ring in the GPU workers, so the worker image must carry this build before the first
flag store rule is created.
Measured with omi_batch_pipeline_admitted_to_text_seconds{served} (a retried promoted unit stays in the
promoted series) and omi_batch_pipeline_fresh_class_promotions_total{outcome}; simulated with
python -m testing.pipeline_sim new-audio-wait.
Failure-Class: none
Co-Authored-By: Claude Fable 5.2 <[email protected]>
The upload function sits at the type checker's complexity limit, so the decision moves out of it: batch intake hands admission to fresh_class.admit_served, which runs on the worker thread that already runs the admission transaction. No extra executor hop, same decision. The scheduler compares the served class with the work item's own class instead of the untyped row value. Co-Authored-By: Claude Fable 5.2 <[email protected]>
The per-test time guard covers the call phase; the other simulator tests keep their runs in module fixtures for the same reason. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Rule commit_wake (default off, per account) lets a GPU worker tell the serving backend which owner it committed for. A wake whose walk met a busy owner claim was dropped, serving-side commits sent no wake, and nothing counted wakes or separated woken writes from swept ones. - Retry a wake's walk after a busy owner claim (0.5, 1, 2, 4 s), outside the coalescer's drain gate; then leave it to the sweep. - Wait 0.5 s before a wake's first walk, so it does not start under the worker's next commit attempt and one walk serves the commits of one upload. - Serving maintenance commits of an admitted owner ask the in-process drain. - Counters on both ends (sent on the worker, received and walk outcomes on the serving backend), wake receipt-to-start histogram, and commit-to-text and ready-to-text histograms by path (wake, provider, drain, sweep, other) and commit_wake cohort. - A wake's walk reads under its own Firestore origin, task:batch_commit_wake. No setting is added. The sweep is unchanged and stays the safety net. Co-Authored-By: Claude Fable 5.2 <[email protected]>
…mulator Two accounts in one database, one admitted to the experiment through the per-account resolver, are told the same story; after every builder pass everything stored under them is compared, the builder's lease document apart: conversations, recording rows, Home feed rows, the summaries written and from what input, the created deliveries, and whether a conversation kept its id. Real: the builder pass, its lease and attempt counters, the summary stage's begin, persist and settle writes, the created-delivery claim and the speaker field write. Faked: the outline, live-title and summary models, Cloud Tasks and the integrations fanout. The v3 settings are read from deploy/runtime_env.yaml (backend-sync). Stories: a late piece that reloads an unchanged stretch, a speaker named on a line, an app open, speech the model cannot outline, an outline aged out of the bounds, a capture in progress. With a model that gives the same answer to the same prompt nothing stored differs in any of them. Two stories pin the one place the accounts part. On its third visit to an unchanged stretch the baseline has spent both model attempts, plans from the fallback outline and hands its first-words title to the model as the preceding conversation of the next stretch; the experiment still holds the model's outline. A model that answers a repeat differently has the same effect one visit earlier. Conversations, cuts, transcripts, statuses, summaries owed and deliveries stay the same; the wording of titles outlined afterwards can differ. The change note says so. The suite joins the emulator proofs. Failure-Class: none Co-Authored-By: Claude Fable 5.2 <[email protected]>
pyright (reportUnnecessaryIsInstance): drain_owner returns an int. Co-Authored-By: Claude Fable 5.2 <[email protected]>
…three switches One live builder pass re-read its lease document about ten times, renewed the lease before every stretch and the commit, read the pending recording rows twice and read the account background for the outline prompt on passes that never asked the model. Three per-account experiments, default off: - lean_builder_pass: the back-off state is read inside the lease claim and that copy serves the load; the lease is renewed by age; the pending page the terminal scan read seeds the load and an empty clear transaction is not run; closure sources and planned ids are fetched in batched reads. What the pass plans and commits is unchanged. - outline_context_on_demand: a stored outline also carries a key of its lines, and the background is read only when a stretch needs a model call. - tombstone_check_written_rows: the commit looks up tombstones only for rows it writes. Old against new on the Firestore emulator (tests/integration/test_conversations_v3_fewer_requests_firestore.py): the same documents and the same model prompts after every step, with 35% fewer reads, 19% fewer writes and 39% fewer round trips over a synthetic day. In the pipeline lab no conversation, title or summary differs on any scenario. Co-Authored-By: Claude Fable 5.2 <[email protected]>
…for multilingual-profile users The multilingual-profile rule (#26431) stops trusting a supported conversation pin for a multi-language user whose live speech shows a language batch Parakeet cannot transcribe. Its two intake lines drop every declaration of such a user, also an unsupported one: a user who declares Japanese and speaks Japanese live is admitted as multi on the GPU route, probed, refused by the worker (unsupported_language) and transcribed by a vendor only after the recovery sweep. Before the rule the declaration gave the upload the vendor route at admission. Flag store rule declared_unsupported_language_route (default off, per account): for such a user, a declaration that is a known language Parakeet cannot serve stays the declaration and the inherited language, so select_route admits the upload on the vendor route with no probe and no GPU unit. A supported or unknown declaration is still dropped and classified on audio. Serving intake and shadow intake decide through one helper; the rule is read only for an upload it can change, from the process's flag-store snapshot. With the rule off the two functions answer what they answer on main (tested value for value). Failure-Class: none Co-Authored-By: Claude Fable 5.2 <[email protected]>
…h the declared-language rule on and off The lab's routing step modelled only owners whose legacy sync is on, where an excluded upload goes to legacy. With "legacy_sync": "draining" or "dark" in the routing inputs it now follows intake for an admitted upload: a declared language Parakeet cannot serve goes to the vendor at admission (no probe); anything else goes to the GPU, a multi upload is probed once, and a frozen verdict that is not Parakeet's is a refusal the vendor serves after recovery. The product's own helpers decide each step, including the experiment declared_unsupported_language_route from the arm's env; the refusal and the recovery are a label on the route, their wait is not modelled. - A recording expectation can pin what routing decided (route, route_reason, lid_probes, gpu_refused); metric stt_routing counts GPU refusals and vendor admissions. - Scenarios stt_route_declared_unsupported_language_vendor (rule on) and stt_route_declared_unsupported_language_gpu_refused (rule off) run one synthetic upload through the route and on through the batch worker, projection, v3 builder and Home. - A committed synthetic language answer for the committed synthetic audio (fixtures/lid/) and synthetic routing inputs (fixtures/stt_routing/), so both run in CI without a private lab root. - reach.json re-measured: the two new scenarios added, the 26 existing ones unchanged. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Strict pyright rejected the untyped lease copy and the conditional keyword arguments passed to store.load. No behaviour change. Co-Authored-By: Claude Fable 5.2 <[email protected]>
…queries The emulator proofs job has a 20 minute limit and the suite took 106 s of it: the comparison listed subcollections with one request per document, and every test re-read the runtime env file. One recursive query per top-level collection and a cached settings read bring it to about 30 s. The recursive walk was checked against the per-document walk on every comparison of a full run: same documents. Co-Authored-By: Claude Fable 5.2 <[email protected]>
…supported-language-route
…supported-language-route
…e test notes Found while testing the branch on a local stack and on a test phone: - With no socket audio the baseline End, which finalizes the socket's recording row, closes nothing. End closes the conversation only when end_open_conversation is on for the same account. Said in both flag descriptions, the registry row and the change note. - Stored text then depends on the phone's serial upload queue alone. Noted as a known limit, with what the phone test showed. No behaviour change. Failure-Class: none Co-Authored-By: Claude Fable 5.2 <[email protected]>
… bottleneck bundle Failure-Class: none
…neck bundle Failure-Class: none
…nd bottleneck bundle Failure-Class: none
- Retry a busy owner claim also when the try wrote rows first (row-by-row claim); count the write as well. - Take the wake's receipt time on every try, so a wake served by a retry leaves no stale time for a later wake to be measured from. - A targeted walk with the owner-chain switch off stops as chain_off and is counted as stopped, not as empty. - Flag text names the retry waits instead of a total. - Tests that read product source are marked slow and the file joins the slow-guardrail manifest. Co-Authored-By: Claude Fable 5.2 <[email protected]>
There was a problem hiding this comment.
All reported issues were addressed across 91 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
The job took 18.5 to 19.5 minutes on main on 2026-12-01 and was cancelled at 20 on branches that add a proof, this one included (its three added proofs take about 70 s there). Failure-Class: none Co-Authored-By: Claude Fable 5.2 <[email protected]>
one_capture_transport (app): safety copies are left untagged per conversation window, by whether pendant audio was kept off the socket in that window, so phone-microphone copies keep their tag and a mode change on a renewal leaves nothing waiting; the app half acts only with end_open_conversation; refusal flushes go through the routed sender; hold counters of a socket held only for its mode are cleared. Flag texts say the rule covers the preview grant and name the pairing as a precondition of every cohort. declared_unsupported_language_route: with language inheritance off and a conversation language that declares nothing, serving and shadow intake now take the one kept declaration. commit_wake: the busy-claim retry set names the stop the walk really returns; ready_to_text times a vendor-route row without ready_at from its settle instant. tombstone_check_written_rows: the ramp starts with the deletion owner's agreement. Pipeline simulator clears an inherited experiment override; the lab verdict carries STT routes and queue counts and validates route names at load. Tests strengthened where the review found them weaker than their names; docs corrected where they promised more than the code does. Failure-Class: none Co-Authored-By: Claude Fable 5.2 <[email protected]>
Failure-Class: none
…get change The nightly contract pins each reusable job's runner and timeout; the 20 to 30 minute change of the emulator proofs job is entered in INTENTIONAL_BUDGET_CHANGES with the measured runs. budget_p50 is unchanged. Failure-Class: none Co-Authored-By: Claude Fable 5.2 <[email protected]>
Two conflicts. capture_latency.py: the admitted-to-text histogram keeps the served label of the fresh-class part and takes main's shared buckets; main's by-priority histogram is observed beside it. cloud_run_gmp_sync.yaml: main's rewritten keep rule, with outline_reuse added to it again. Failure-Class: none
Two conflicts with #26847 (bounded multipart reads and part retirement), both in the projection commit. conversations_v3.py: the planned part-retirement field is dropped in staged_row, the helper the tombstone_check_written_rows decision and the write loop share, so both see the row main's loop wrote. firestore_query_driver_registry.py: the commit's body digest is pinned again and both re-review notes kept. test_conversations_v3_fewer_requests.py follows main: the multipart switch takes the uid, and the staged manifest and the prior manifest are in the shape part retirement reads. Failure-Class: none
One conflict with #26866 (predecessor intake overflow on backend-sync), in the imports of utils/batch_pipeline/intake.py: both sides' names are imported. The overflow choice applies to the FRESH sync lane and the fresh-class promotion to the backfill lane, so the two do not meet. Failure-Class: none
… one UTC day World starts recording A eight hours before the run and A lasts 26 minutes. In the 26 minutes of a day when that span crosses midnight UTC (07:34 to 08:00), the baseline outlines one more stretch and test_naming_a_speaker_rearms_a_recording_and_nothing_stored_differs fails on its counts. A then starts half an hour earlier. Seen on 2026-12-01 at 07:53 UTC; with the change the file passes inside that window. Failure-Class: none Co-Authored-By: Claude Fable 5.2 <[email protected]>
#26882 gives the emulator proofs job 25 minutes on main. This branch's own change of that limit (30) and its budget entry are dropped in favour of main's, so the workflow and the nightly contract test are main's. Failure-Class: none
Conflicts with #26771 (an older stretch of late speech settles on landing) and #26873 (memory redrive fence). service.py: _load_live_batch and reconcile carry both the pass's shared sibling_reads allowance and the lean_builder_pass lease row and clock; every load attempt gets both. The load driver names both sets of neutral arguments. The projection commit's body digest is pinned again with both re-review notes. The metrics keep rule is main's with outline_reuse added again. reach.json is measured again on the merged tree (31 scenarios). test_conversations_v3_fewer_requests.py expects the sibling_reads argument on the load call. Failure-Class: none
|
Verdict: The production changes here are careful and well fenced: every behavioural change sits behind a default-off per-account rule, audio custody is preserved packet by packet, and all 69 check runs on this head are green. I found no blocking defect. What remains are two maintainer decisions and a few ramp watch-items, so this goes to human maintainer review rather than an automated sign-off. What I checked (sampled from the 58 non-test files)
Maintainer decisions needed
To watch during the ramps
Performance/cost: fewer Firestore round trips per builder pass (emulator: reads -35%, writes -19%), ~11% fewer outline model calls once USER IMPACT: none at deploy, every switch is off. Once rules are admitted: just-recorded phone audio is transcribed in seconds instead of minutes at peak, batch results show up in conversations sooner, a declared language the GPU cannot serve no longer waits on a GPU refusal, and pendant audio on batch-only sessions is uploaded once instead of also being streamed. Leaving for human maintainer review: the deletion-guard change in by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
Thank you for the review. Answers to the points that can be settled from the code, on head Watch item: Could not verify: Could not verify: Decision 1, the deletion guard. Agreed that this is the conversation-deletion owner's call. The flag row's ramp now starts with a step that admits no account, the internal allow list included, until that owner has reviewed and agreed the change, and the runbook says the same. No rule exists for any of the switches in this PR. Decision 2, one merge unit. Yes, one merge unit is intended, for the reason in the description. Each part is rolled back by deactivating its rule, and none has a rule today.
🤖 Addressed by Claude Code |
…hone capture was removed #26875 added a phone-microphone case to one_capture_transport_test.dart and #26345 then removed phone microphone capture (and phone_mic_pigeon.g.dart) without that case, so Dart Analyze fails on main. Phone capture no longer exists, so the case goes; the pendant cases are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
What changed and why
Open pull requests from the backend bottleneck work, joined into one so they take one pass through CI
instead of one each. Two of the eight parts (#26862, #26851) have since merged on their own; this PR carries
the same commits, so they add nothing to its diff. Six of them add a row to the same three flag files (
config/feature-flags.yaml, thegenerated registry page,
backend/config/reliability_experiments.py), so merged one at a time each merge madethe next one conflict and cost it another full CI run.
Each part is the head of its own PR, merged here with a merge commit, so the history of every part is intact.
The original PR carries the full description, measurements and review notes of its part; they are closed in
favour of this one.
fresh_class_for_new_audio, offcommit_wake(existing), offdeclared_unsupported_language_route, offone_capture_transport, offoutline_keep_stored, offlean_builder_pass,outline_context_on_demand,tombstone_check_written_rows, all offNo flag store rule exists for any of the seven new switches, so no account's behaviour changes at deploy.
The parts in one paragraph each
26 rows of
backend/config/flag_budget.jsonthat passedreview_byon 2026-11-30 move to 2026-12-06 withthe reasons Renew November 30 flag budget rows (SCA-3850) #26600 gives. One difference from Renew November 30 flag budget rows (SCA-3850) #26600, after review: the five rows that already carried a
row-specific reason (
BATCH_PIPELINE_PROTECTED_SHARE_ENABLED,BATCH_PIPELINE_PROTECTED_SHARE_PERCENT,SYNC_BACKFILL_WORKER_API_URL,SYNC_BACKFILL_WORKER_AUDIENCE,LISTEN_BATCH_RECONNECT_ENABLED) keep thattext, with the renewal sentence appended. No rollout setting or runtime value changes.
replicaCountandautoscaling.minReplicasof the production batch workergo from 6 to 12;
maxReplicasstays 16. Nodes for the weekday peak cannot be obtained on the day, so thefloor is the only setting that has them in place before the ramp. In a replay of nine weekdays it about
halves the mean wait for a worker for 27% more worker node-hours.
old is served with the fresh class (job row
priority0,admitted_priority1). Metering, the enrichmentqueue and admission still read the admitted class. It reorders the GPU queue and adds no capacity; the ramp
in the flag row stops at 25% until GPU capacity covers the weekday peak. The GPU worker image must carry
this build before the first rule is created.
waits 0.5 s, and serving-side commits of an admitted account ask the in-process owner drain. Counters at
both ends and
commit_to_text/ready_to_texthistograms by path and cohort. In the local load test,commit to written fell from a median of 11.2 s to 0.52 s.
Parakeet cannot serve stays the declaration, so the upload takes the vendor route at admission: no language
probe, no GPU unit, no refusal, no recovery wait. Supported and unknown declarations, legacy-on owners and
the record lane are unchanged.
socket and a live session gets no phone-file grant, so the same audio is no longer transcribed twice. Admit
accounts to
end_open_conversationtogether with this rule: without socket audio the baseline End closesnothing. Stored text then depends on the phone's serial upload queue alone.
did not visit, so a later visit with the same lines and prompt reuses the model's answer instead of paying
for it again. About 11% fewer outline calls with every account on.
writes of the live builder pass. On a synthetic day against the Firestore emulator: same documents and
prompts, reads down 35%, writes down 19%.
tombstone_check_written_rowstouches the commit's deletionguard: please review it as such, and agree it with the owner of conversation deletion before any account is
admitted.
Where the parts meet
_reconcile_outlinesinbackend/utils/conversations/v3/service.pynow takes bothkeep_stored(perf(v3): keep the stored outlines of stretches a builder pass did not visit (outline_keep_stored, default off) #26832)and
clock(perf(v3): the live builder pass with fewer database requests, behind three switches #26868). The two do not interfere: a stretch found by its lines key keeps its storedfingerprint, and
outline.with_unvisiteddrops stored rows by that fingerprint as before.config/feature-flags.yaml: thecommit_wakerow is perf(batch): make commit wake dependable and measured #26860's; One capture transport per listen session, behind a per-account flag (one_capture_transport) #26822 only adds its own row beside it.backend/testing/pipeline_lab/scenario/reach.jsonwas measured again on the combined branch.backend/docs/feature-flag-registry.mdwas rendered again from the combined YAML.Changed after the automated review
The review bot left 34 comments. One was not valid, three are answered without a code change, the rest are
fixed in this PR. Behaviour with every switch off is unchanged by all of them. What changed in behaviour:
one_capture_transport, app half. Safety copies are left untagged per conversation window, by whetherpendant audio was really kept off the socket in that window, not by the socket's mode when the conversation
closes. Before, phone-microphone copies (always sent) could end marked as sent with no conversation id and
no upload. The app half now does nothing unless
end_open_conversationis also on for the account, becausewithout socket audio the baseline End closes nothing. The flag row makes that pairing a precondition of
every cohort. The flag texts now say the rule covers the grant that comes with the on-phone preview; the
Standard cohort grant is unchanged and listed as a known limit.
declared_unsupported_language_route. With language inheritance switched off(
BATCH_PIPELINE_LANGUAGE_INHERITANCE_ENABLED=false) and a conversation language that declares nothing, thekept declaration was lost and the upload went to the GPU. Serving and shadow intake now take one kept value.
commit_wake. The retry set held a busy-claim token no walk returns (it mattered only with the ownerdrain switched off); corrected.
ready_to_textnow times a vendor-route row withoutready_atfrom itssettle instant, as the ordered merge does.
tombstone_check_written_rows. The ramp now starts with a step that admits no account until the ownerof conversation deletion has agreed the change to the deletion guard.
OMI_RELIABILITY_EXPERIMENTS; the lab'sfinal verdict carries STT routes and queue counts; a scenario's
routeis validated when it is loaded.promotions, not a guarantee for units already fresh;
servedis the class on the job row, not whotranscribed the unit; when
lines_keyis written; which rollout readouts are fleet-wide).CI
The first run of this PR had its emulator proofs job cancelled at the 20-minute limit (the job took 18.4 to
19.5 minutes on main that day; this PR's three added proofs take about 70 s there). #26882 has since raised
the limit to 25 minutes on main, so this PR changes no workflow.
Tuning
fleet work at the weekday peak's lease rate; promotion resumes under 300.
Past it a wake still walks, untimed.
was dropped), after 4 retries at 0.5, 1, 2 and 4 s.
replicaCountandautoscaling.minReplicas);maxReplicasstays 16.
Not in this PR
#26857 (the sweep that gives a lost memory extraction its task back) is left out. #26859, merged to main on
2026-12-01, recovers the same lost memory obligations with its own re-drive in the builder sweep, so the two
would now run side by side. #26857 stays open for its author to rework or close.
Line-Count-Exception: backend/utils/batch_pipeline/scheduler.py | 1529 -> 1534 | the enqueue takes the served class and a rejoining row returns to its admitted class; both belong to the two functions that own the ring
Line-Count-Exception: backend/utils/batch_pipeline/projection.py | 1978 -> 2003 | the walk now returns its stop reason to the caller (
walk_owner, withproject_ownerkept as a wrapper for its existing callers) and names its origin for the commit-to-text series; one observe call, two origin markers and the method's signature and docstring. Splitting the projector is outside this change.Line-Count-Exception: app/lib/services/capture/capture_controller.dart | 5265 -> 5276 | call sites of the experiment at the per-packet routing boundary, socket publish, socket close and the status handler; its state and helpers are in the new part file capture_one_transport.dart
Line-Count-Exception: backend/routers/listen/receiver.py | 3066 -> 3070 | two one-line calls and their two imports; the logic is in routers/listen/local_preview.py
Line-Count-Exception: backend/utils/conversations/v3/service.py | 2570 -> 2647 | the experiments' branches sit in reconcile and _reconcile_outlines beside the baseline calls they replace, so the two paths can be read side by side and deleted together when the rollouts end; the old branches and the switches go then
Line-Count-Exception: backend/database/conversations_v3.py | 3075 -> 3171 | PendingPage, the pending page clear_terminal_pending returns and the batched source read share load's private helpers and the commit's tombstone decision is carved out of its write loop in place; the baseline paths they duplicate are removed when the rollout ends
Product invariants affected
app/lib/services/capture/capture_controller.dart,capture_conversation_custody.dart). No packet loses custody: one that is not sent is already in a phone file or the safety copy, and one the safety copy refused is sent as before. Tests follow each packet to exactly one place.How it was verified
Each part was verified on its own branch; the commands and results are in its PR. On the combined branch:
test_conversations_v3*,test_reliability_experiment*, pipeline lab and simulator file, the batch intake, commit, projection,scheduler, admission and language files, the local preview and Standard batch files, the Firestore query
shape guard and the flag files, plus the multipart and part-retirement files, every unit file that exercises batch intake and the unit files main changed since: 216 files, 9,661 tests, all pass
(
BACKEND_UNIT_TEST_FILE_LIST=<list> bash test.sh).flutter testonone_capture_transport_test.dart,local_preview_admission_test.dartandreliability_experiments_test.dart: 73 pass;flutter analyzeonthe changed files: no issues.
test_conversations_v3_unchanged_writes_firestore.py: 45 tests pass, also after the review fixes. Afterthe merge of Bound v3 multipart transcript reads and retirement #26847 (multipart reads and part retirement, which meets
tombstone_check_written_rowsin theprojection commit) the same files plus
test_conversations_v3_finish_emulator.pyandtest_v3_multipart_transcript_firestore.py: 92 pass; after the merge of fix(conversations-v3): an older stretch of late-landing speech settles on landing too #26771 and fix: Fence memory redrive and fall back to the builder queue #26873, with the lockedclosure cost and live catch-up files added: 104 pass. One of them,
test_naming_a_speaker_rearms_a_recording_and_nothing_stored_differs, failed when run between 07:34 and08:00 UTC, because the story's first recording (26 minutes, starting eight hours before the run) then
crosses midnight UTC and the baseline outlines one more stretch. The test now starts that recording half an
hour earlier in that case, and the file passes inside the window.
scenario run --trace-calls, the runreach.jsonwasmeasured from), 30 pass again after the review fixes, and all 31 (main added one) after the last merge of main.
scenario compare, four arms:origin/main, this branch with every switchoff, with the four v3 switches on together, with all eight switches on together). With the switches off,
every scenario main can run (28 of 30) has the same conversations and exactly the same reads, writes and
no-op writes as main. With the switches on, no conversation differs; reads fall 10.6% and writes 9.3%
over those scenarios, and the four v3 switches together give the same result as all eight. The four
scenarios whose verdict changes with a switch are the ones written to show that switch
(
fewer_requests_two_talks_and_late_sync,outline_kept_across_passesand the twostt_route_declared_unsupported_language_*).scripts/check_feature_flag_registry.py: OK.scripts/pr-preflight: 65 of 65 checks pass.Not verified on the combined branch: a running stack, a phone, production. The app half of #26822 was run on
a test phone from its own branch (results in #26822), not from this one, and that run predates the changes
made in review (per-window untagging, the
end_open_conversationguard): tests are their only evidence.Tests
Every part brings its own tests (listed below). Added or strengthened in review: the per-window untagging,
the
end_open_conversationguard, a capture-end flush and the hold counters in the app tests; the provideropen and the warm-before-admission order in
test_reliability_experiment_one_capture_transport.py; the keptdeclaration with inheritance off in the three language test files; the real projector walk with the claim held
and the vendor-row ready time in
test_reliability_experiment_commit_wake.py; changed lines against a storedoutline in
test_conversations_v3_fewer_requests.py; a real opened conversation intest_reliability_experiment_outline_keep_stored.py; the simulator's inherited override intest_pipeline_sim_new_audio_wait.py; the lab verdict's routes and the route names at load.tests/unit/test_reliability_experiment_fresh_class.py,tests/unit/test_pipeline_sim_new_audio_wait.py.tests/unit/test_reliability_experiment_commit_wake.py,tests/integration/test_batch_commit_wake_firestore.py.tests/unit/test_batch_multilingual_profile_routing.py,tests/unit/test_batch_admission_language.py,tests/integration/test_batch_declared_unsupported_language_route_firestore.py, two pipeline lab scenarios.tests/unit/test_reliability_experiment_one_capture_transport.py,app/test/services/capture/one_capture_transport_test.dart.tests/unit/test_reliability_experiment_outline_keep_stored.py,tests/integration/test_conversations_v3_outline_keep_stored_firestore.py.tests/unit/test_conversations_v3_fewer_requests.py,tests/integration/test_conversations_v3_fewer_requests_firestore.py, one pipeline lab scenario.tests/unit/test_batch_pipeline_chart.pyand the two HPA replay files follow the new floor.tests/unit/test_flag_budget.pyfollows the new dates.UI evidence
UI-Evidence: none -- no screen changes
Failure class (fixes)
Failure-Class: none
🤖 Generated with Claude Code