Repository navigation
Require durable audio receipts before releasing phone WALs - #26133
Merged
Merged
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why
Record-lane sessions can commit the original audio before a transcript exists. A capable phone now negotiates Listen audio receipts, persists the writer's evidence in one owner-scoped journal, and checks every frame of a disk WAL before marking it server-confirmed. A transcript commit can contribute only the frames the server explicitly binds to a pinned original and manifest. The existing retention policy owns deletion.
Product invariants affected
How it was verified
Local verification passed 386 Flutter tests across ten suites and 186 backend tests across four suites. One backend test was deselected. Scoped Dart analysis reported no issues.
The backend tests exercise the archive writer and Listen serializer against a fixture also consumed by Dart. Mobile tests exercise receipt delivery over loopback WebSockets, reconnect and account changes, journal replay and conflict eviction, whole-file hashing, and the single and batch upload paths.
Custody review
An independent review of
275eb13b17identified custom-STT negotiation, server recording rollover, repeated shadow hashing, and the memory cost of retaining manifest windows. The follow-up excludes custom STT sockets, carries the writer's explicit client-to-server session mapping, caches shadow audits against WAL identity, file stat and journal evidence revision, and retains only mapped frames for transcript binding. Serving re-reads the WAL bytes. When either side names a session, it must match. The approved optional-session rule also permits two unbound sides when every other identity field and frame digest matches. Final-head custody sign-off is a release gate.Release and readback
Ship on the normal app release train with
custody_durable_audio_releasedefault off. Keep the old flag off on legacy builds. Before enabling release, complete the full custody review and a closed 24-hour shadow window with positive covered WALs, zero disagreements and verified zero releases without durable audio. Hold on missing evidence. Reconcile actual releases against retained, generation-pinned originals and manifests before expanding.The Goal: Margin owner advances through internal, 1%, 10%, 50% and 100% cohorts after each closed 24-hour window meets the custody gate. Turn the switch off on a disagreement or a release lacking durable audio. Review progress on 2026-12-07. Compare capable builds with legacy in matched 24-hour windows by app version, recording installed share, WAL upload attempts per recorded hour and backend-sync
record_capture_pending503s per recorded hour. Server duplicate settlement has a separate processing-obligation gate.End state at 100%: transcript-only release of Omi audio WALs is retired. Once
custody_durable_audio_releaseserves 100% of capable builds, a WAL is released only on durable-audio proof (audio_custody, or acapture_committedrange the server binds to a committed original and manifest). The legacy!useCommitstranscript path does not remain as a fallback. A follow-up removes it, and the oldcustody_capture_committed_releasekey, once installed share makes legacy builds negligible. The explicitly approved Custom STT transcript exception is unchanged.The pre-build baseline for 2026-11-23 09:00–10:00 UTC contained 106 production server-batch-only admissions. Zero eligible
capture_committedsends was inferred from the serving configuration and image. Successful sends were unmeasured.UI evidence
UI-Evidence: none -- changes affect transport, custody persistence and upload admission.
Failure-Class: none
Line-Count-Exception: app/lib/services/capture/capture_controller.dart | 5014 -> 5041 | Bind receipts and explicit custom transcription confirmation to the capture session.
Line-Count-Exception: app/lib/services/wals/local_wal_sync.dart | 3196 -> 3212 | Reconcile the journal on index admission and before single or batch upload.
Line-Count-Exception: backend/routers/listen/receiver.py | 3053 -> 3054 | Forward the source coordinate with consented audio to the archive writer.