Repository navigation
Renew November 30 flag budget rows (SCA-3850) - #26600
Git-on-my-level wants to merge 5 commits into
Conversation
Co-authored-by: multica-agent <[email protected]>
Co-authored-by: multica-agent <[email protected]>
Co-authored-by: multica-agent <[email protected]>
Co-authored-by: multica-agent <[email protected]>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
There was a problem hiding this comment.
60 issues found across 1771 files
Confidence score: 3/5
offline_sync_amounts.darttreats a sharedconversationIdas proof that the live socket captured every frame, which can hide outage chunks from phone-waiting and pipeline counts. Classify copies using explicit capture evidence.app/setup.shchecksdevice_hostbut not the URL baked into the build, so a physical-device build can still point at loopback. Validate the actualOMI_LOCAL_API_BASE_URLtoo.ai_consent_widget.dartremoves the explicit disclosure that audio and transcripts go to third-party AI services while making absolute encryption and model-training claims. Restore the disclosure and make sure those claims are substantiated.sockets.dartreconnects custom STT sockets when their effective language differs from the requested language, interrupting live audio. Compare the effective language or avoid reconnecting in this case.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="app/lib/utils/sync/offline_sync_amounts.dart">
<violation number="1" location="app/lib/utils/sync/offline_sync_amounts.dart:65">
P1: `conversationId` is lineage, not proof that the live socket captured every frame, so outage chunks with that ID are incorrectly hidden from the phone-waiting and pipeline counts. Classify copies only from an explicit coverage/commit result; keep uncovered WALs in the at-risk slice until transcript confirmation.</violation>
</file>
<file name=".github/scripts/check-direct-backend-production-admission.py">
<violation number="1" location=".github/scripts/check-direct-backend-production-admission.py:318">
P2: This validator accepts required canary guard text anywhere in the raw `run` scalar, so a no-op quoted block can preserve the snippets while removing the checks. Parse the shell or otherwise verify executable guard structure before exempting this checkout from `source_checkouts`.</violation>
</file>
<file name="app/lib/pages/conversation_detail/summary_tab_presence.dart">
<violation number="1" location="app/lib/pages/conversation_detail/summary_tab_presence.dart:16">
P2: Action items and events are valid summary content, but this gate ignores both and can hide Summary while the server has already returned useful content. Count non-empty `structured.actionItems` and `structured.events` for both the fetched conversation and live recap before hiding the tab.
(Based on your team's feedback about summary body fields.) [85f9e605-c40f-490e-96f3-79cefb8c89ca].</violation>
</file>
<file name="app/lib/pages/onboarding/variants/yinka/yinka_onboarding_flow.dart">
<violation number="1" location="app/lib/pages/onboarding/variants/yinka/yinka_onboarding_flow.dart:181">
P2: The Yinka flow can fall back to the BLE scan on iOS 18+ when Connect Omi is restored directly, because `isActiveSync` may still be null. Resolve `AccessorySetup.isActive()` asynchronously before selecting this page, then render `AccessoryPairingStep` once the result is known; otherwise resumed users cannot discover a new device.</violation>
<violation number="2" location="app/lib/pages/onboarding/variants/yinka/yinka_onboarding_flow.dart:185">
P2: The iOS 18+ branch bypasses `ConnectOmiStep`'s device-choice tracking. Neither the `Onboarding Device Choice` event nor its user property is recorded on this path, which breaks the Shopify order matching that property feeds. Record the choice in the branch callbacks, reusing the same tracking as `ConnectOmiStep`.</violation>
<violation number="3" location="app/lib/pages/onboarding/variants/yinka/yinka_onboarding_flow.dart:187">
P2: 'Not now' is mapped to `OnboardingDeviceChoice.ordered`, which means 'on its way'. Readers without an Omi also reach this button, so the value and comment are wrong for them. Add a `skipped` value to `OnboardingDeviceChoice` and pass it here instead.</violation>
</file>
<file name="app/lib/services/wals/upload_health.dart">
<violation number="1" location="app/lib/services/wals/upload_health.dart:38">
P2: An auth refusal stops counting once any later network or server failure overwrites `_lastFailure`. `failing()` then goes false until three failures span ten minutes, even though the doc says any authentication refusal since the last accepted upload keeps uploads failing. Track auth refusal in its own flag, set it in `recordFailure` and clear it in `recordAccepted` and `resetForTesting`.</violation>
<violation number="2" location="app/lib/services/wals/upload_health.dart:59">
P2: `UploadHealth` never notifies when the ten-minute failure window elapses without another attempt, so its consumers can remain on a healthy status indefinitely. Schedule a deadline reevaluation or have consumers poll the time-based transition.</violation>
</file>
<file name=".github/workflows/grafana_batch_pager_diagnostic.yml">
<violation number="1" location=".github/workflows/grafana_batch_pager_diagnostic.yml:43">
P2: This step succeeds even when the diagnostic cannot read Grafana. `get_json()` converts HTTP/network failures into status fields, while `main()` always returns 0, so an invalid token or outage appears as a green run; make required read failures return nonzero or validate the response statuses before completing.</violation>
</file>
<file name="app/lib/services/devices/discovery/native_bluetooth_discoverer.dart">
<violation number="1" location="app/lib/services/devices/discovery/native_bluetooth_discoverer.dart:83">
P2: Native can reject a scan after `ensureReady` succeeds, but this path never updates `lastScan`; the unconditional assignment reports it as `completed` instead of `blocked`. Subscribe to the bridge’s scan-blocked notification for this scan and preserve the blocked outcome.</violation>
</file>
<file name=".github/firestore-collection-budgets.json">
<violation number="1" location=".github/firestore-collection-budgets.json:40">
P2: This source citation does not match the checked-in scheduler: `jobs.yaml` defines `enrichment-maintenance` at two-minute cadence, not `sync-backfill-uid-sequencer`. Correct the caller/cadence evidence before relying on the 720/day daily budget.</violation>
<violation number="2" location=".github/firestore-collection-budgets.json:224">
P2: `batch_provider_stt_wait_sample.py` does not enforce this 2,001-read cap: its accepted flags allow 500×100 pages plus lookahead, or 50,001 reads. Hard-cap those options or revise the budget to cover the supported invocation envelope.</violation>
</file>
<file name="app/lib/pages/conversations/widgets/sync_details_sheet.dart">
<violation number="1" location="app/lib/pages/conversations/widgets/sync_details_sheet.dart:101">
P2: This label fires while the phone is offline, not only on server or account errors. `uploadsFailing` also becomes true after repeated network failures, and this condition does not check connectivity. Gate it on connectivity as `AudioPipelineStatus` does, so offline audio keeps the "Waiting on this phone" label.</violation>
</file>
<file name="app/setup.sh">
<violation number="1" location="app/setup.sh:534">
P2: This probe treats any HTTP response from the backend root as success, so an unhealthy or wrong service returning 404/500 lets the build continue even though the app's `/v1/health` startup gate will still fail. Probe `${api_base_url%/}/v1/health` with `curl --fail` before allowing the build to proceed.</violation>
<violation number="2" location="app/setup.sh:604">
P1: The physical-device guard checks `device_host` but not the URL that gets baked into the build. If `OMI_LOCAL_API_BASE_URL` is loopback (for example `http://127.0.0.1:8000/`) while `OMI_DEV_HOST` is a LAN address, the phone receives a loopback API URL and hangs, and the Mac-side probe still passes. Reject a loopback `api_base_url` in this branch as well.</violation>
</file>
<file name="app/lib/pages/onboarding/ai_consent_widget.dart">
<violation number="1" location="app/lib/pages/onboarding/ai_consent_widget.dart:68">
P1: The consent copy drops the explicit disclosure that audio and transcripts go to third-party AI services, and replaces it with absolute claims such as "Encrypted in transit and at rest" and "don't train their models on your conversations". Keep the third-party processing disclosure on this consent screen, and get the new claims confirmed by legal or privacy review rather than relying on a code comment.</violation>
</file>
<file name="app/lib/services/sockets.dart">
<violation number="1" location="app/lib/services/sockets.dart:90">
P1: The new `_socket?.language == language` check never matches for custom STT sockets whose effective language differs from the requested one. Each call then stops the live socket and reconnects, which interrupts audio. Compare against the language the socket was actually built with.</violation>
</file>
<file name="app/lib/models/local_recording.dart">
<violation number="1" location="app/lib/models/local_recording.dart:80">
P2: `retryCanHelp` is false for auto-retrying recordings, but they are mapped to `failed` here. Those rows lose Try Again and are skipped by Transcribe all. `walRetryCanHelp` only passes the `failed` display state, while `retrying` (retryCount 1–2) is still a retryable state. Include `retrying` in the retry check, or keep `retryCanHelp` true for it.</violation>
</file>
<file name="app/lib/pages/conversations/widgets/conversation_state_tile.dart">
<violation number="1" location="app/lib/pages/conversations/widgets/conversation_state_tile.dart:51">
P2: Removing the `v3On` gate changes legacy and rollback rows: `homeTileState` falls back to `homeStepOf`, so non-v3 accounts now see progress icons and the failed icon. The class docstring still says these rows show the emoji. Restore the gate, or update the docstring and add a legacy-row test if the change is intended.</violation>
</file>
<file name=".github/scripts/failure_class_guard_ratchet_allowlist.json">
<violation number="1" location=".github/scripts/failure_class_guard_ratchet_allowlist.json:8">
P2: This adds a new grandfather entry, which the ratchet's 'only shrinks' rule forbids for a class that was not over threshold at landing. Remove the entry and let the dormant class age out, or record a canonical_prevention_artifact. Also move the dormant status change out of this PR into a separate registry-only change.</violation>
</file>
<file name=".github/failure-classes/FC-finalize-hook-allowlist-omits-ingestion-path.json">
<violation number="1" location=".github/failure-classes/FC-finalize-hook-allowlist-omits-ingestion-path.json:6">
P2: This failure-class registry rewrite does not belong in a flag-budget renewal PR. Changing `canonical_prevention` and its artifacts must go in a separate registry-only PR, per the PR template. Please move this change out.</violation>
</file>
<file name="app/lib/services/wals/pendant_ring_custody.dart">
<violation number="1" location="app/lib/services/wals/pendant_ring_custody.dart:1206">
P2: `sourceMarks` becomes unavailable immediately after disconnect, while later WAL flushes resolve live `ringPosition` through this accessor. Preserve proven marks until pending WALs are sealed; otherwise those WALs lose duplicate-proof geometry and fall back to legacy matching.</violation>
</file>
<file name="app/lib/pages/settings/device/device_catching_up_card.dart">
<violation number="1" location="app/lib/pages/settings/device/device_catching_up_card.dart:55">
P2: Checking-only copies still set `hasPending`, producing a zero-second Catching up route that opens an empty On the Way page. Exclude checking copies from the catch-up presence flag, or provide a separate checking-only destination/status.</violation>
<violation number="2" location="app/lib/pages/settings/device/device_catching_up_card.dart:154">
P2: The copy exclusion is applied to the processing loop only. Pending-work items keep the old `local.hasPending` gate, so server work is counted or dropped depending on which list it came from. Use the same catch-up predicate in the pending loop and in `phoneSyncing`, and compute it once outside the loop.</violation>
</file>
<file name="app/lib/pages/conversation_detail/widgets/conversation_detail_header.dart">
<violation number="1" location="app/lib/pages/conversation_detail/widgets/conversation_detail_header.dart:45">
P2: Ending the conversation locally clears Live but does not clear the title-at-end placeholder, so a stored title remains hidden while the server still reports Live. Include `!ended` in the `displayText` placeholder condition.</violation>
</file>
<file name="app/lib/pages/conversation_detail/widgets/name_speaker_sheet.dart">
<violation number="1" location="app/lib/pages/conversation_detail/widgets/name_speaker_sheet.dart:438">
P2: An active speaker clip is not stopped when the app becomes inactive, so it can continue behind an interrupted or backgrounded sheet without position reports. Include `AppLifecycleState.inactive` in this cleanup condition.</violation>
</file>
<file name="app/lib/pages/conversations/on_the_way_page.dart">
<violation number="1" location="app/lib/pages/conversations/on_the_way_page.dart:95">
P2: A pendant transfer with only announced ring audio can make `pipeline` non-calm while `work` is empty, but the page still says all recordings are synced. Include pipeline activity in the empty-state decision and render a transfer/status row for rowless work.</violation>
</file>
<file name="app/changelog/unreleased/20261130-end-keeps-conversation-page.json">
<violation number="1" location="app/changelog/unreleased/20261130-end-keeps-conversation-page.json:2">
P2: This fragment marks the change as internal-only, but the diff changes user-visible End navigation and summary feedback. Replace `kind: none` with a short `change` entry describing the behavior.</violation>
</file>
<file name=".github/failure-classes/FC-episode-membership-waits-for-enrichment.json">
<violation number="1" location=".github/failure-classes/FC-episode-membership-waits-for-enrichment.json:8">
P2: Dropping `backend/utils/episodes/` from `scope_hints` means `scripts/failure-class prepare` will no longer surface this class for episode-service changes, where its membership contract applies. Keep `backend/utils/episodes/` in the list, or justify its removal in a separate registry change.</violation>
<violation number="2" location=".github/failure-classes/FC-episode-membership-waits-for-enrichment.json:11">
P2: This dormant transition is bundled with removal of `canonical_prevention_artifact` in the same registry edit. Move the `status`/`dormant_since` lifecycle change to its own registry-only change and keep the prevention-artifact rewrite separate.</violation>
</file>
<file name=".github/failure-classes/FC-cancel-reaches-one-of-duplicate-subscriptions.json">
<violation number="1" location=".github/failure-classes/FC-cancel-reaches-one-of-duplicate-subscriptions.json:6">
P2: `canonical_prevention` says Stripe failures surface as a clear 4xx, but metadata-discovery failures deliberately return 503 and the guard test asserts that behavior. Distinguish per-subscription cancellation errors from discovery failures in the registry contract.</violation>
<violation number="2" location=".github/failure-classes/FC-cancel-reaches-one-of-duplicate-subscriptions.json:6">
P2: `canonical_prevention` overstates the target as every non-terminal subscription, but this fix explicitly excludes `incomplete` and `paused` because they never billed. Describe the guard as targeting every cancelable live subscription so the registry does not prescribe canceling non-billable objects.</violation>
</file>
<file name="app/lib/services/wals/PENDANT_RING_CUSTODY.md">
<violation number="1" location="app/lib/services/wals/PENDANT_RING_CUSTODY.md:315">
P2: The rollback relies on a fail-open cached config key, which section 8 of this file says cannot gate data behavior. The rollback should also name the backend switch `RECORD_WAL_SOURCE_POSITIONS_ENABLED=false`, which the server doc requires. Otherwise an operator may believe the feature is off while the server still settles duplicates.</violation>
</file>
<file name=".github/agent-docs/worker-shadow-percent.md">
<violation number="1" location=".github/agent-docs/worker-shadow-percent.md:16">
P2: This runbook never says the forward step writes 0. "Admit ... at 25" reads as setting 25, but the writer changes 25 to 0 (the kill switch). State the direction explicitly, e.g. "forward sets `BATCH_PIPELINE_SHADOW_PERCENT` from 25 to 0; inverse restores 25".</violation>
</file>
<file name="app/lib/services/wals/sync_upload_batch.dart">
<violation number="1" location="app/lib/services/wals/sync_upload_batch.dart:93">
P2: The ring branch does not require the legacy capture triple, unlike the mic branch. A ring WAL without `capture_root`/`clock_epoch`/`source_frame_start` yields a claim the backend S1 validator rejects with KeyError, which drops every claim in that header. Require `legacy != null` here too, or partition batches on triple presence as well as `position`.</violation>
<violation number="2" location="app/lib/services/wals/sync_upload_batch.dart:111">
P2: The new `position` object roughly doubles each claim's header bytes. With the 4096-byte header cap, a batch of ring/mic WALs will hold about 8 files instead of about 18–20. That raises the job count against the rate limiter that the top-of-file comment is written to avoid. Size the batch by the encoded header, or confirm the lower per-job count is acceptable.</violation>
</file>
<file name=".github/failure-classes/FC-episode-span-cap-misses-member-speech.json">
<violation number="1" location=".github/failure-classes/FC-episode-span-cap-misses-member-speech.json:8">
P2: This dormant transition is bundled with removal of `canonical_prevention_artifact` in the same registry edit. Move the `status`/`dormant_since` lifecycle change to its own registry-only change and keep the prevention-artifact rewrite separate.</violation>
<violation number="2" location=".github/failure-classes/FC-episode-span-cap-misses-member-speech.json:8">
P2: Removing `canonical_prevention_artifact` and `scope_hints` drops the link to the episode guard tests and stops `prepare` from surfacing this class for episode changes. Keep both fields unless they are changed in a separate registry-only PR.</violation>
</file>
<file name=".github/failure-classes/FC-guided-intro-transcription-has-no-answer-path.json">
<violation number="1" location=".github/failure-classes/FC-guided-intro-transcription-has-no-answer-path.json:8">
P2: This dormant transition is bundled with removal of `canonical_prevention_artifact` in the same registry edit. Move the `status`/`dormant_since` lifecycle change to its own registry-only change and keep the prevention-artifact rewrite separate.</violation>
</file>
<file name="app/lib/pages/settings/developer.dart">
<violation number="1" location="app/lib/pages/settings/developer.dart:315">
P2: The experimental-design toggle does not react when the account flag resolves because it never subscribes to the design scope. Read the displayed value through `ExperimentalDesign.of(context)` so the row updates and disables manual control for flagged accounts.</violation>
</file>
<file name=".agent-artifacts/ui-evidence/ship-bundle/evidence.json">
<violation number="1" location=".agent-artifacts/ui-evidence/ship-bundle/evidence.json:5">
P2: This manifest adds unrelated iOS onboarding, player, and sync evidence to a backend flag-budget renewal PR. Remove these artifacts from this change or move them to the corresponding UI feature PR so the budget-only review stays scoped.</violation>
</file>
<file name="app/changelog/unreleased/20261129-home-feed-doc-episodes-retired.json">
<violation number="1" location="app/changelog/unreleased/20261129-home-feed-doc-episodes-retired.json:2">
P2: `kind: none` suppresses the release note, but retiring document episodes from Home changes what users see. Add a user-facing `change` entry instead.</violation>
</file>
<file name=".github/failure-classes/FC-output-language-follows-newest-speech.json">
<violation number="1" location=".github/failure-classes/FC-output-language-follows-newest-speech.json:7">
P2: This deletes the class's whole `canonical_prevention_artifact` record, not just the stale paths. Keep the field and point it at the artifact that exists, `backend/utils/llm/output_language.py`, so the class still records its guard.</violation>
</file>
<file name="PRODUCT.md">
<violation number="1" location="PRODUCT.md:141">
P2: The recorded-time section lost its `Proposed` label even though its substance changed yesterday (episodes retired, 2026-11-29). Per the 'Before you build' rule, a changed product rule stays `proposed` for seven unchanged days. Restore the `Proposed` heading until then.</violation>
</file>
<file name="app/lib/pages/activity/needs_attention_section.dart">
<violation number="1" location="app/lib/pages/activity/needs_attention_section.dart:69">
P2: `_failingRecordings` hardcodes `online: true`, so the row says "Uploads aren't going through" while the phone is offline. The other pipeline surfaces read connectivity and report waiting for internet. Thread the connectivity value into this helper and into `hasContent`, and fix the doc comment, since `UploadHealth` also counts transient network failures.</violation>
</file>
<file name="app/lib/pages/episodes/episode_page.dart">
<violation number="1" location="app/lib/pages/episodes/episode_page.dart:85">
P2: The doc comment on `_currentPendingMembers` still says a card replacement removes a recording from the Delete scope, but this change removed that card check. Either update the comment to describe the owner-episode check that remains, or restore an equivalent replacement check from `EpisodeProvider` state.</violation>
</file>
<file name="app/lib/pages/conversation_detail/widgets.dart">
<violation number="1" location="app/lib/pages/conversation_detail/widgets.dart:642">
P2: This reads `ExperimentalDesign.enabled`, which does not subscribe to the design scope. If the flag resolves or the Developer Settings choice changes while the page is open, this Selector will not re-run, so the place row stays in the wrong state. Use `ExperimentalDesign.of(context)`, as the rest of this file's experimental checks do.</violation>
</file>
<file name=".github/failure-classes/FC-bulk-clear-refused-by-active-transfer.json">
<violation number="1" location=".github/failure-classes/FC-bulk-clear-refused-by-active-transfer.json:3">
P2: This new failure-class entry is unrelated to the PR title and description, which cover only the November 30 flag budget renewal. Either move it to its own PR with the required `Failure-Class: new` declaration and fix commit, or drop it from this change.</violation>
</file>
<file name="app/lib/pages/voice_profile/voice_profile_page.dart">
<violation number="1" location="app/lib/pages/voice_profile/voice_profile_page.dart:47">
P2: The notice is built before the pop, so `OmiFeedback` ignores Home's bottom clearance. After the pop, the toast sits at the default 12pt margin and can overlap Home's chat bar when opened from Home. Pop first, then show the message through the navigator's context.</violation>
</file>
<file name="app/lib/services/capture/capture_uplink_policy.dart">
<violation number="1" location="app/lib/services/capture/capture_uplink_policy.dart:17">
P2: This adds a live-capture reconnect kick that changes first-attempt socket timing from about 20s to about 1s and can start uplink reconciliation from the commit callback. The PR description does not mention it, and no test covers the new reason. Either split it into a separate PR with its own description and backend/app test coverage, or document the intent here.</violation>
</file>
<file name="app/lib/pages/episodes/finish_capture.dart">
<violation number="1" location="app/lib/pages/episodes/finish_capture.dart:212">
P2: Under the experimental design, a FinishProcessing outcome that Home does not show as a pending row now pops the live page without opening `FinishedCapturePage`, and no message is shown. Keep the page when the outcome is processing and Home has no pending row.</violation>
</file>
<file name="app/lib/services/wals/wal_service.dart">
<violation number="1" location="app/lib/services/wals/wal_service.dart:5">
P2: This hunk wires the new `SyncBacklogFleet` telemetry into `WalService`, but the PR describes only a flag-budget renewal. `start()` also starts the fleet's 30 s timer and lifecycle observer on every iOS and Android launch, even while its flag is off. Split this into its own PR, or update the description and get it reviewed separately.</violation>
</file>
<file name="app/lib/widgets/row_press.dart">
<violation number="1" location="app/lib/widgets/row_press.dart:20">
P2: The default `borderRadius` is `OmiRadius.mdAll` (12), but the only consumer's card is 24pt rounded. The pressed wash will tint square-ish corners outside the card. Default this to `OmiRadius.xlAll`, or pass `borderRadius: OmiRadius.xlAll` at the call site.</violation>
</file>
<file name="app/lib/utils/analytics/adapters/posthog_adapter.dart">
<violation number="1" location="app/lib/utils/analytics/adapters/posthog_adapter.dart:242">
P2: A flag refresh that finishes before PostHog initialization caches `_omi` but never stamps its exposures: `_stampExposure` returns while `_initialized` is false, and `init()` does not replay the cache. Stamp the cached flags immediately after initialization (or defer this refresh's exposure work until the SDK is ready), otherwise early-loaded accounts miss `$feature/<key>` attribution until another reload.</violation>
</file>
<file name="app/e2e/SKILL.md">
<violation number="1" location="app/e2e/SKILL.md:130">
P2: The onboarding map now lists step 6 twice: the stale `6: User Review` row is still above the new `6: Teach Omi your voice` row. Per `wrapper.dart`, User Review no longer exists, Teach Omi is index 6, Knowledge Graph is 7, and Complete is 9. Remove the User Review row and renumber the remaining steps to match `wrapper.dart`.</violation>
</file>
<file name="app/lib/services/experiments/experimental_design.dart">
<violation number="1" location="app/lib/services/experiments/experimental_design.dart:89">
P3: `experimentalRowTitleStyle` is never used, so conversation rows do not receive the experimental title style it defines. Apply it at the row-title call sites or remove the unused helper.</violation>
</file>
<file name="app/lib/services/wals/mobile_batch_buffer.dart">
<violation number="1" location="app/lib/services/wals/mobile_batch_buffer.dart:278">
P3: A crash between sealing and publication loses `sealedAtMs` for batches without a hold because the journal is not refreshed with the new timestamp. Persist a final journal snapshot after assigning the seal time and before publication.</violation>
</file>
<file name="app/lib/pages/home/home_content.dart">
<violation number="1" location="app/lib/pages/home/home_content.dart:5">
P2: This removes the Daily Recaps row from Home, which the PR description never mentions. The description covers only flag budget renewals, registry deadlines, and test dates. Confirm this removal belongs in SCA-3850, or split it into its own PR.</violation>
</file>
<file name="app/lib/services/live_preview/live_words_coordinator.dart">
<violation number="1" location="app/lib/services/live_preview/live_words_coordinator.dart:183">
P2: `onEndAccepted` re-checks `ExperimentalDesign.enabled`, but `onEnd` already decided to defer the cut based on the flag at tap time. If the flag turns off before the server answers, the cut is skipped in both places and the old words stay on screen. Drop the flag check here; `cutAtEnd` is idempotent for the same `endedAt`.</violation>
</file>
<file name="app/lib/pages/conversations/widgets/live_running_length.dart">
<violation number="1" location="app/lib/pages/conversations/widgets/live_running_length.dart:12">
P3: This comment hard-codes a 5-minute close, but the silence timeout defaults to 2 minutes and is user-configurable (2 min to 4 h). Reword it to refer to the configured silence timeout instead of a fixed duration.</violation>
</file>
Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.
View guided diff | Turn on auto-fix | Re-trigger cubic
| /// every second, so these copies are shown as "being checked", never as saved, | ||
| /// and they still upload. Display only; custody and upload never read this. | ||
| bool walIsConversationCopy(Wal wal) => | ||
| wal.status == WalStatus.miss && !walIsOnDevice(wal) && (wal.conversationId?.isNotEmpty ?? false); |
There was a problem hiding this comment.
P1: conversationId is lineage, not proof that the live socket captured every frame, so outage chunks with that ID are incorrectly hidden from the phone-waiting and pipeline counts. Classify copies only from an explicit coverage/commit result; keep uncovered WALs in the at-risk slice until transcript confirmation.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/lib/utils/sync/offline_sync_amounts.dart, line 65:
<comment>`conversationId` is lineage, not proof that the live socket captured every frame, so outage chunks with that ID are incorrectly hidden from the phone-waiting and pipeline counts. Classify copies only from an explicit coverage/commit result; keep uncovered WALs in the at-risk slice until transcript confirmation.</comment>
<file context>
@@ -54,20 +54,31 @@ bool walIsSyncable(Wal wal) => switch (wal.syncDisplayState) {
+/// every second, so these copies are shown as "being checked", never as saved,
+/// and they still upload. Display only; custody and upload never read this.
+bool walIsConversationCopy(Wal wal) =>
+ wal.status == WalStatus.miss && !walIsOnDevice(wal) && (wal.conversationId?.isNotEmpty ?? false);
+
/// Where unsynced audio is sitting right now. Drives the Sync details sheet.
</file context>
| esac | ||
| # Only the build's defines change; app/.dev.env stays loopback for hermetic tests | ||
| # (Env.apiBaseUrl prefers the define). | ||
| local api_base_url="${OMI_LOCAL_API_BASE_URL:-http://${device_host}:8000/}" |
There was a problem hiding this comment.
P1: The physical-device guard checks device_host but not the URL that gets baked into the build. If OMI_LOCAL_API_BASE_URL is loopback (for example http://127.0.0.1:8000/) while OMI_DEV_HOST is a LAN address, the phone receives a loopback API URL and hangs, and the Mac-side probe still passes. Reject a loopback api_base_url in this branch as well.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/setup.sh, line 604:
<comment>The physical-device guard checks `device_host` but not the URL that gets baked into the build. If `OMI_LOCAL_API_BASE_URL` is loopback (for example `http://127.0.0.1:8000/`) while `OMI_DEV_HOST` is a LAN address, the phone receives a loopback API URL and hangs, and the Mac-side probe still passes. Reject a loopback `api_base_url` in this branch as well.</comment>
<file context>
@@ -538,18 +586,39 @@ function run_build_ios() {
+ esac
+ # Only the build's defines change; app/.dev.env stays loopback for hermetic tests
+ # (Env.apiBaseUrl prefers the define).
+ local api_base_url="${OMI_LOCAL_API_BASE_URL:-http://${device_host}:8000/}"
+ check_local_stack_reachable "$device_host" "$api_base_url" || return 1
+ local rewritten=()
</file context>
| local api_base_url="${OMI_LOCAL_API_BASE_URL:-http://${device_host}:8000/}" | |
| local api_base_url="${OMI_LOCAL_API_BASE_URL:-http://${device_host}:8000/}" | |
| case "$api_base_url" in | |
| *://127.* | *://localhost* | *://\[::1\]*) | |
| echo "❌ OMI_LOCAL_API_BASE_URL='${api_base_url}' is loopback; a physical device cannot reach it." >&2 | |
| echo " Unset it, or point it at ${device_host}." >&2 | |
| return 1 | |
| ;; | |
| esac |
| const SizedBox(height: OmiSpacing.md), | ||
| Semantics(header: true, child: Text(context.l10n.consentPromisesTitle, style: OmiType.title1)), | ||
| const SizedBox(height: OmiSpacing.lg), | ||
| // Plain promises first; each one is true today (confirmed by product before shipping copy). |
There was a problem hiding this comment.
P1: The consent copy drops the explicit disclosure that audio and transcripts go to third-party AI services, and replaces it with absolute claims such as "Encrypted in transit and at rest" and "don't train their models on your conversations". Keep the third-party processing disclosure on this consent screen, and get the new claims confirmed by legal or privacy review rather than relying on a code comment.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/lib/pages/onboarding/ai_consent_widget.dart, line 68:
<comment>The consent copy drops the explicit disclosure that audio and transcripts go to third-party AI services, and replaces it with absolute claims such as "Encrypted in transit and at rest" and "don't train their models on your conversations". Keep the third-party processing disclosure on this consent screen, and get the new claims confirmed by legal or privacy review rather than relying on a code comment.</comment>
<file context>
@@ -61,10 +63,15 @@ class _AiConsentWidgetState extends State<AiConsentWidget> {
- const SizedBox(height: OmiSpacing.md),
+ Semantics(header: true, child: Text(context.l10n.consentPromisesTitle, style: OmiType.title1)),
+ const SizedBox(height: OmiSpacing.lg),
+ // Plain promises first; each one is true today (confirmed by product before shipping copy).
+ _Promise(icon: FontAwesomeIcons.lock, text: context.l10n.consentPromiseEncrypted),
+ _Promise(icon: FontAwesomeIcons.code, text: context.l10n.consentPromiseOpenSource),
</file context>
| @@ -87,9 +87,11 @@ class SocketServicePool extends ISocketService { | |||
| if (!force && | |||
| _socket?.codec == codec && | |||
| _socket?.sampleRate == sampleRate && | |||
| _socket?.language == language && | |||
There was a problem hiding this comment.
P1: The new _socket?.language == language check never matches for custom STT sockets whose effective language differs from the requested one. Each call then stops the live socket and reconnects, which interrupts audio. Compare against the language the socket was actually built with.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/lib/services/sockets.dart, line 90:
<comment>The new `_socket?.language == language` check never matches for custom STT sockets whose effective language differs from the requested one. Each call then stops the live socket and reconnects, which interrupts audio. Compare against the language the socket was actually built with.</comment>
<file context>
@@ -87,9 +87,11 @@ class SocketServicePool extends ISocketService {
if (!force &&
_socket?.codec == codec &&
_socket?.sampleRate == sampleRate &&
+ _socket?.language == language &&
_socket?.state == SocketServiceState.connected &&
_socket?.sttConfigId == sttConfigId &&
</file context>
| _socket?.language == language && | |
| _socket?.language == (customConfig?.effectiveLanguage ?? language) && |
| ' echo "::error::Listen canary permission readback requires environment=prod"\n' | ||
| ' exit 1\n' | ||
| 'fi\n' | ||
| ) in guard.get("run", "") |
There was a problem hiding this comment.
P2: This validator accepts required canary guard text anywhere in the raw run scalar, so a no-op quoted block can preserve the snippets while removing the checks. Parse the shell or otherwise verify executable guard structure before exempting this checkout from source_checkouts.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At .github/scripts/check-direct-backend-production-admission.py, line 318:
<comment>This validator accepts required canary guard text anywhere in the raw `run` scalar, so a no-op quoted block can preserve the snippets while removing the checks. Parse the shell or otherwise verify executable guard structure before exempting this checkout from `source_checkouts`.</comment>
<file context>
@@ -293,6 +293,43 @@ def pusher_image_only_checkout_is_bound(text: str) -> bool:
+ ' echo "::error::Listen canary permission readback requires environment=prod"\n'
+ ' exit 1\n'
+ 'fi\n'
+ ) in guard.get("run", "")
+ and '"$GITHUB_REF" == refs/heads/main' in guard.get("run", "")
+ and '"$EXPECTED_SHA" == "$GITHUB_SHA"' in guard.get("run", "")
</file context>
| if (!local.hasPending && !ids.contains(conversation.id)) seconds += max(0, conversation.getDurationInSeconds()); | ||
| // Checking copies are not catch-up: with only those local, a separate conversation still counts. | ||
| final localCatchUp = local.hasPending && local.pendingSeconds > 0; | ||
| if (!localCatchUp && !ids.contains(conversation.id)) seconds += max(0, conversation.getDurationInSeconds()); |
There was a problem hiding this comment.
P2: The copy exclusion is applied to the processing loop only. Pending-work items keep the old local.hasPending gate, so server work is counted or dropped depending on which list it came from. Use the same catch-up predicate in the pending loop and in phoneSyncing, and compute it once outside the loop.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/lib/pages/settings/device/device_catching_up_card.dart, line 154:
<comment>The copy exclusion is applied to the processing loop only. Pending-work items keep the old `local.hasPending` gate, so server work is counted or dropped depending on which list it came from. Use the same catch-up predicate in the pending loop and in `phoneSyncing`, and compute it once outside the loop.</comment>
<file context>
@@ -139,7 +149,9 @@ class DeviceCatchUpSummary {
- if (!local.hasPending && !ids.contains(conversation.id)) seconds += max(0, conversation.getDurationInSeconds());
+ // Checking copies are not catch-up: with only those local, a separate conversation still counts.
+ final localCatchUp = local.hasPending && local.pendingSeconds > 0;
+ if (!localCatchUp && !ids.contains(conversation.id)) seconds += max(0, conversation.getDurationInSeconds());
}
final phoneSyncing = local.hasPending || serverProcessing;
</file context>
| final ring = wal.ringPosition; | ||
| final mic = wal.micSampleStart; | ||
| final Map<String, dynamic> position; | ||
| if (ring != null && wal.codec.isOpusSupported()) { |
There was a problem hiding this comment.
P2: The ring branch does not require the legacy capture triple, unlike the mic branch. A ring WAL without capture_root/clock_epoch/source_frame_start yields a claim the backend S1 validator rejects with KeyError, which drops every claim in that header. Require legacy != null here too, or partition batches on triple presence as well as position.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/lib/services/wals/sync_upload_batch.dart, line 93:
<comment>The ring branch does not require the legacy capture triple, unlike the mic branch. A ring WAL without `capture_root`/`clock_epoch`/`source_frame_start` yields a claim the backend S1 validator rejects with KeyError, which drops every claim in that header. Require `legacy != null` here too, or partition batches on triple presence as well as `position`.</comment>
<file context>
@@ -74,7 +76,43 @@ Map<String, dynamic>? _captureEvidenceClaim(Wal wal, String name) {
+ final ring = wal.ringPosition;
+ final mic = wal.micSampleStart;
+ final Map<String, dynamic> position;
+ if (ring != null && wal.codec.isOpusSupported()) {
+ position = {
+ ...ring.toJson(),
</file context>
| if (ring != null && wal.codec.isOpusSupported()) { | |
| if (ring != null && legacy != null && wal.codec.isOpusSupported()) { |
| } | ||
|
|
||
| /// A conversation row's title: the theme's, or 17pt medium in the experimental design. | ||
| TextStyle? experimentalRowTitleStyle(BuildContext context) { |
There was a problem hiding this comment.
P3: experimentalRowTitleStyle is never used, so conversation rows do not receive the experimental title style it defines. Apply it at the row-title call sites or remove the unused helper.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/lib/services/experiments/experimental_design.dart, line 89:
<comment>`experimentalRowTitleStyle` is never used, so conversation rows do not receive the experimental title style it defines. Apply it at the row-title call sites or remove the unused helper.</comment>
<file context>
@@ -0,0 +1,100 @@
+}
+
+/// A conversation row's title: the theme's, or 17pt medium in the experimental design.
+TextStyle? experimentalRowTitleStyle(BuildContext context) {
+ final style = Theme.of(context).textTheme.titleMedium;
+ return ExperimentalDesign.of(context)
</file context>
| @@ -272,6 +275,7 @@ class MobileBatchBuffer { | |||
| _writer = null; | |||
| _wal = null; | |||
| _journal = null; | |||
| wal.sealedAtMs = _now().millisecondsSinceEpoch; | |||
There was a problem hiding this comment.
P3: A crash between sealing and publication loses sealedAtMs for batches without a hold because the journal is not refreshed with the new timestamp. Persist a final journal snapshot after assigning the seal time and before publication.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/lib/services/wals/mobile_batch_buffer.dart, line 278:
<comment>A crash between sealing and publication loses `sealedAtMs` for batches without a hold because the journal is not refreshed with the new timestamp. Persist a final journal snapshot after assigning the seal time and before publication.</comment>
<file context>
@@ -272,6 +275,7 @@ class MobileBatchBuffer {
_writer = null;
_wal = null;
_journal = null;
+ wal.sealedAtMs = _now().millisecondsSinceEpoch;
onSealed?.call(wal);
var published = false;
</file context>
|
|
||
| /// How long a conversation in progress has run: from its start to now, moving every second. The | ||
| /// stored-speech length it replaces stood still between two transcribed pieces and read as a stuck | ||
| /// stopwatch. It keeps counting through silence; the conversation closes after five minutes of it. |
There was a problem hiding this comment.
P3: This comment hard-codes a 5-minute close, but the silence timeout defaults to 2 minutes and is user-configurable (2 min to 4 h). Reword it to refer to the configured silence timeout instead of a fixed duration.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/lib/pages/conversations/widgets/live_running_length.dart, line 12:
<comment>This comment hard-codes a 5-minute close, but the silence timeout defaults to 2 minutes and is user-configurable (2 min to 4 h). Reword it to refer to the configured silence timeout instead of a fixed duration.</comment>
<file context>
@@ -0,0 +1,34 @@
+
+/// How long a conversation in progress has run: from its start to now, moving every second. The
+/// stored-speech length it replaces stood still between two transcribed pieces and read as a stuck
+/// stopwatch. It keeps counting through silence; the conversation closes after five minutes of it.
+/// [builder] gets '' when the start is unknown or still ahead.
+class LiveRunningLength extends StatelessWidget {
</file context>
| /// stopwatch. It keeps counting through silence; the conversation closes after five minutes of it. | |
| /// stopwatch. It keeps counting through silence until the conversation's silence timeout ends it. |
…in shard 8/8 red since #26828) (#26853) ## What changed and why `tests/unit/test_rollout_cohort_deploy.py::test_helm_retains_legacy_fallbacks[prod-backend-listen]` and `[prod-pusher]` have been red on main since `197be6283a` (#26828), which is why "Backend unit shard 8/8" fails on main and on every PR that merges it. The test holds the listen and pusher charts' allow-lists in place "until a later removal PR". #26828 was that removal for `SPEAKER_GROUPING_SHADOW_UID_ALLOWLIST` (the retired speaker-grouping shadow: prod serves `SPEAKER_GROUPING_SHADOW: off`), and set the key to `""` in both prod charts. The test still asserted the key is non-empty. #26828's own CI was green because a chart edit does not select this test file. One line: the assertion now pins the cleared value. The key must still be present, and the other fallbacks (`DREAM_AGENT_UID_ALLOWLIST`, and for listen `SYNC_LINEAGE_RESOLVE_UID_ALLOWLIST` and `STT_LIVE_DEMAND_UID_ALLOWLIST`) are asserted non-empty as before. No chart or config file is touched. Not in this PR: mapping the listen and pusher chart paths to this test in `backend/scripts/select_backend_unit_tests.py`, so the next removal fails on its own PR. Say if you want it here. The other two red tests on main are separate: `test_flag_budget.py` (review dates of 2026-11-30, #26600) and `test_listen_overlay_workflow.py` (the evidence scripts pin, #26839). ## Product invariants affected none ## How it was verified `cd backend && .venv/bin/python -m pytest tests/unit/test_rollout_cohort_deploy.py -q` on main `0d04614136`: 2 failed before (the two prod parameters, `assert ''`), 10 passed after. ## Tests The changed test is the regression test. No product code changed. ## UI evidence UI-Evidence: none -- test only ## Failure class (fixes) Failure-Class: none 🤖 Generated with [Claude Code](https://claude.com/claude-code)
…ers-sol/82984ccd9d76
… SCA-3850) (#26862) ## What changed and why `tests/unit/test_flag_budget.py::test_pipeline_env_surface_holds_its_budget` has been red on main since 2026-12-01 00:00 UTC: 26 rows of `backend/config/flag_budget.json` passed `review_by` 2026-11-30. That keeps "Backend unit shard 5/8" and the "Backend unit suite" gate red on main and on every backend PR that runs the file. This PR carries the three-file change of #26600 (SCA-3850, by @Git-on-my-level) onto current main, with one difference noted below: - `backend/config/flag_budget.json`: the 26 rows dated 2026-11-30 move to 2026-12-06, each with the reason from #26600 (production-use review and keep-or-retire decision due December 3 at 16:00 UTC). Difference from #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 that text, with the renewal sentence appended, instead of having it replaced. - `config/feature-flags.yaml`: the `SERVER_BATCH_ONLY_WEB_PERCENT` row gets the matching extension to 2026-12-06. - `backend/tests/unit/test_flag_budget.py`: the pinned dates follow. No rollout setting, ramp criterion or runtime value changes. The dates, reasons and owners are the ones #26600 proposes; nothing here is a decision of this PR. Why a second PR: #26600 cannot pass the required `UI author approval` check. It was opened on 28 Nov and has since merged main in, so the check's `base...head` compare returns 300+ files and `.github/scripts/ui-author-approval.cjs` fails closed with "Incomplete immutable file evidence" (run 46550242365). Against today's main its real diff is these three files. A PR opened from current main does not have that problem. #26600 can be closed once this is in. Not verified by me: the owner objection window that #26600 describes for 20 of the rows. If an owner objected to a row, that row should be reverted or its flag retired in a follow-up. ## Product invariants affected none ## How it was verified On main `ba502efad6` plus this change: - `cd backend && bash test.sh --changed`: the three selected files pass (`test_flag_budget.py` 26 of 26; it fails on main without the change). - `bash test.sh tests/unit/test_flag_docket_retirement.py tests/unit/test_omi_flags.py tests/unit/test_graduated_flag_behavior.py`: pass. - `scripts/check_feature_flag_registry.py`: OK. `scripts/render_feature_flag_registry.py` leaves the generated page unchanged. - A JSON comparison against main: exactly 26 `names` rows differ, all from `review_by` 2026-11-30 to 2026-12-06; no other key of the budget file differs. The five rows that had a reason on main still start with that reason word for word. ## Tests No new test. `test_flag_budget.py` is the test that was failing; its pinned dates are updated as in #26600. ## UI evidence UI-Evidence: none -- no UI change ## Failure class (fixes) Failure-Class: none 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Carries the three-file change of BasedHardware#26600 onto current main, unchanged: the 26 rows of backend/config/flag_budget.json dated 2026-11-30 move to 2026-12-06 with the reason from BasedHardware#26600, SERVER_BATCH_ONLY_WEB_PERCENT gets the matching registry extension, and the pinned dates in test_flag_budget.py follow. test_flag_budget.py has been red on main since 2026-12-01 00:00 UTC. BasedHardware#26600 cannot pass the required UI author approval check: it was opened against a 28 Nov base and has merged main since, so the check's compare returns 300+ files and fails closed. No rollout setting, ramp criterion or runtime value changes. Failure-Class: none Co-authored-by: David Zhang <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
…y switch off (#26875) ## 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`, the generated registry page, `backend/config/reliability_experiments.py`), so merged one at a time each merge made the 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. | Part | Original PR | Switch | What a merge changes in production | |---|---|---|---| | Flag budget renewal | #26862 (merged) | none | Already on main. | | GPU worker floor 6 to 12 | #26851 (merged) | none | Already on main. Nothing changes until the worker chart is rolled by the release owner. | | Fresh class for just-recorded phone audio | #26848 | `fresh_class_for_new_audio`, off | One more histogram label; one in-process flag evaluation per qualifying upload. | | Commit wake made dependable and measured | #26860 | `commit_wake` (existing), off | New counters and two histograms for every account; behaviour only for admitted accounts. | | Declared unsupported language stays on the vendor route | #26870 | `declared_unsupported_language_route`, off | Nothing without a rule. | | One capture transport per listen session | #26822 | `one_capture_transport`, off | Nothing without a rule, on the backend or in a new app build. | | Stored outlines of unvisited stretches are kept | #26832 | `outline_keep_stored`, off | One new metric; nothing else without a rule. | | Live builder pass with fewer database requests | #26868 | `lean_builder_pass`, `outline_context_on_demand`, `tombstone_check_written_rows`, all off | Nothing without a rule. | No 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 - **Flag budget renewal (#26862).** Carries the three-file change of #26600 (SCA-3850) onto current main: the 26 rows of `backend/config/flag_budget.json` that passed `review_by` on 2026-11-30 move to 2026-12-06 with the reasons #26600 gives. One difference from #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 that text, with the renewal sentence appended. No rollout setting or runtime value changes. - **GPU worker floor (#26851).** `replicaCount` and `autoscaling.minReplicas` of the production batch worker go from 6 to 12; `maxReplicas` stays 16. Nodes for the weekday peak cannot be obtained on the day, so the floor 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. - **Fresh class for new audio (#26848).** A phone upload in the backfill lane whose audio is at most 10 minutes old is served with the fresh class (job row `priority` 0, `admitted_priority` 1). Metering, the enrichment queue 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. - **Commit wake (#26860).** A wake that meets a busy account claim is retried (0.5, 1, 2, 4 s), the first walk 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_text` histograms by path and cohort. In the local load test, commit to written fell from a median of 11.2 s to 0.52 s. - **Declared unsupported language (#26870).** For a multilingual-profile user (#26431), a declared language 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. - **One capture transport (#26822).** With the rule on, a batch-only session sends no pendant audio on the socket and a live session gets no phone-file grant, so the same audio is no longer transcribed twice. Admit accounts to `end_open_conversation` together with this rule: without socket audio the baseline End closes nothing. Stored text then depends on the phone's serial upload queue alone. - **Stored outlines kept (#26832).** A live builder or on-open pass keeps the stored outlines of stretches it 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. - **Fewer database requests per builder pass (#26868).** Three experiments remove bookkeeping reads and 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_rows` touches the commit's deletion guard: please review it as such, and agree it with the owner of conversation deletion before any account is admitted. ### Where the parts meet - `_reconcile_outlines` in `backend/utils/conversations/v3/service.py` now takes both `keep_stored` (#26832) and `clock` (#26868). The two do not interfere: a stretch found by its lines key keeps its stored fingerprint, and `outline.with_unvisited` drops stored rows by that fingerprint as before. - `config/feature-flags.yaml`: the `commit_wake` row is #26860's; #26822 only adds its own row beside it. - `backend/testing/pipeline_lab/scenario/reach.json` was measured again on the combined branch. - `backend/docs/feature-flag-registry.md` was 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 whether pendant 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_conversation` is also on for the account, because without 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, the kept 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 owner drain switched off); corrected. `ready_to_text` now times a vendor-route row without `ready_at` from its settle instant, as the ordered merge does. - **`tombstone_check_written_rows`.** The ramp now starts with a step that admits no account until the owner of conversation deletion has agreed the change to the deletion guard. - **Simulator and lab.** The pipeline simulator clears an inherited `OMI_RELIABILITY_EXPERIMENTS`; the lab's final verdict carries STT routes and queue counts; a scenario's `route` is validated when it is loaded. - **Docs.** Wording corrected where it promised more than the code does (the fresh-class pause is a bound on promotions, not a guarantee for units already fresh; `served` is the class on the job row, not who transcribed the unit; when `lines_key` is 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 - MAX_READY_UNITS (#26848, fresh ring size at which promotion pauses), new: 600 waiting units, about 30 s of fleet work at the weekday peak's lease rate; promotion resumes under 300. - MAX_TIMED_OWNERS (#26860, receipt times kept for the wake start histogram), new: 8192 accounts per process. Past it a wake still walks, untimed. - SETTLE_SECONDS (#26860, wait before a wake's first walk): before 0 s, after 0.5 s. - BUSY_RETRY_DELAYS (#26860, retries of a wake's walk after a busy account claim): before 0 retries (the wake was dropped), after 4 retries at 0.5, 1, 2 and 4 s. - Worker floor (#26851): before 6, after 12 (`replicaCount` and `autoscaling.minReplicas`); `maxReplicas` stays 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`, with `project_owner` kept 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 - INV-CAP-1: the change of #26822 is in the capture routing boundary (`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: - Unit, after the review fixes: the test files the parts change, every `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`). - App, after the review fixes: `flutter test` on `one_capture_transport_test.dart`, `local_preview_admission_test.dart` and `reliability_experiments_test.dart`: 73 pass; `flutter analyze` on the changed files: no issues. - Firestore emulator: the integration files of #26868, #26832, #26870 and #26860 plus `test_conversations_v3_unchanged_writes_firestore.py`: 45 tests pass, also after the review fixes. After the merge of #26847 (multipart reads and part retirement, which meets `tombstone_check_written_rows` in the projection commit) the same files plus `test_conversations_v3_finish_emulator.py` and `test_v3_multipart_transcript_firestore.py`: 92 pass; after the merge of #26771 and #26873, with the locked closure 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 and 08: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. - Pipeline lab, all 30 committed scenarios: 30 pass (`scenario run --trace-calls`, the run `reach.json` was measured from), 30 pass again after the review fixes, and all 31 (main added one) after the last merge of main. - Pipeline lab, old against new, run before the review fixes (`scenario compare`, four arms: `origin/main`, this branch with every switch off, 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_passes` and the two `stt_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_conversation` guard): 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_conversation` guard, a capture-end flush and the hold counters in the app tests; the provider open and the warm-before-admission order in `test_reliability_experiment_one_capture_transport.py`; the kept declaration 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 stored outline in `test_conversations_v3_fewer_requests.py`; a real opened conversation in `test_reliability_experiment_outline_keep_stored.py`; the simulator's inherited override in `test_pipeline_sim_new_audio_wait.py`; the lab verdict's routes and the route names at load. - #26848: `tests/unit/test_reliability_experiment_fresh_class.py`, `tests/unit/test_pipeline_sim_new_audio_wait.py`. - #26860: `tests/unit/test_reliability_experiment_commit_wake.py`, `tests/integration/test_batch_commit_wake_firestore.py`. - #26870: `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. - #26822: `tests/unit/test_reliability_experiment_one_capture_transport.py`, `app/test/services/capture/one_capture_transport_test.dart`. - #26832: `tests/unit/test_reliability_experiment_outline_keep_stored.py`, `tests/integration/test_conversations_v3_outline_keep_stored_firestore.py`. - #26868: `tests/unit/test_conversations_v3_fewer_requests.py`, `tests/integration/test_conversations_v3_fewer_requests_firestore.py`, one pipeline lab scenario. - #26851: `tests/unit/test_batch_pipeline_chart.py` and the two HPA replay files follow the new floor. - #26862: `tests/unit/test_flag_budget.py` follows the new dates. ## UI evidence UI-Evidence: none -- no screen changes ## Failure class (fixes) Failure-Class: none 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Renews all 27 rows dated November 30 in
backend/config/flag_budget.jsonthrough December 6 UTC. The seven Pipeline-area rows have executive approval. The remaining 20 are proposed under the owner objection window through November 30 at 12:00 UTC and must be reconciled before Release merges. Target merge is November 30 before 18:00 UTC.Every renewed row records the December 3 at 16:00 UTC production-use decision and points to SCA-3850. The diff updates the budget dates and reasons, synchronizes the two registry deadlines asserted by the budget tests, and updates the pinned test dates. Rollout settings and ramp criteria are unchanged.
Owner approval and objection window
Verification
JSON comparison verified exactly 27 date and reason updates with owner counts matching the approval. Git diff hygiene passed. Run backend unit CI and place any heavy rerun on m1 or multica-worker-1.
Product invariants affected
none