Skip to content

Require durable audio receipts before releasing phone WALs - #26133

Merged
Git-on-my-level merged 3 commits into
mainfrom
agent/m1-studio-codex-astra/ad6c214d0182
Nov 23, 2026
Merged

Git-on-my-level merged 3 commits into
mainfrom
agent/m1-studio-codex-astra/ad6c214d0182

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

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

  • INV-CAP-1. Manual, on-device, foreign, ambiguous and in-flight WALs stay outside receipt release. The client compares merged coverage with the digests of the actual framed Opus file. Release requires both checks.

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 275eb13b17 identified 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_release default 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_pending 503s 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_release serves 100% of capable builds, a WAL is released only on durable-audio proof (audio_custody, or a capture_committed range the server binds to a committed original and manifest). The legacy !useCommits transcript path does not remain as a fallback. A follow-up removes it, and the old custody_capture_committed_release key, 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_committed sends 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T12:01:40.544668Z 6b51344 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Git-on-my-level
Git-on-my-level merged commit caff79c into main Nov 23, 2026
80 of 83 checks passed
@Git-on-my-level
Git-on-my-level deleted the agent/m1-studio-codex-astra/ad6c214d0182 branch November 23, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant