Skip to content

fix(app): restore waiting recordings after same-account sign-in - #25214

Merged
aryanorastar merged 10 commits into
mainfrom
codex/issue-24777-rehydrate
Nov 13, 2026
Merged

aryanorastar merged 10 commits into
mainfrom
codex/issue-24777-rehydrate

Conversation

@aryanorastar

@aryanorastar aryanorastar commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Waiting recordings can remain parked after the process-lived ledger loads while signed out or retires its rows during sign-out. Returning to the same account now restores its inventory through the existing ledger and refreshes Home and Offline Sync. Indexed native files resolve legacy ownership before migration evidence is retired, and accepted job receipts survive preference clearing so recovery does not upload the same audio again.

Fixes #24777. Builds on closed, unmerged #24845, with cocvn157 credited as co-author. Foreign-owner rows and unresolved native-batch ownership stay parked; audio, manual holds, local-only policy and accepted job IDs are preserved.

Product invariants affected

  • INV-CAP-1

Failure-Class: new

Root cause: ledger lifetime exceeds authentication lifetime, but load-time ownership admission had no corresponding reauthentication transition. Native migration also skipped ownership resolution for already-indexed legacy rows. The shared prevention is the ledger's explicit owner reconciliation, fenced across awaited intake and followed by provider refresh. Ordinary inventory reads cannot readmit rows while sign-out still holds the old UID. The new class points to persistence and transition tests rather than a parallel queue or uploader.

Verification

  • 138 protected spine tests passed.
  • 75 targeted custody/ownership/sign-out/completion/Watch/polling tests passed, including real WAL persistence, cold signed-out startup, A/B/A isolation, ambiguous owners, retained queued jobs and unchanged source bytes.
  • Isolated iPhone 17 Pro / iOS 26.5 simulator: real platform preferences, relocated batch-directory recovery, source PCM bytes, parked foreign ownership, queued job preservation and fresh ledger restart passed. The integration assertion reads the durable index, with no unit-test-only accessor.
  • Full-app analyzer ratchet and 20 Home lifecycle/ownership checks passed after switching Home to the public custody-ready refresh path. The final empty-owner correction additionally passed 20 focused intake/completion tests covering null, empty and legacy owner receipts in both normal and headless intake.
  • Repository pre-push manifest: 28 checks passed. 31 seeded journey checks passed (zero failed/skipped). Final-commit CI passed at c35145b: full Dart analysis/tests and Home timezone checks, Android compile, JVM unit tests, emulator native lifecycle/packaged startup, generated files, metadata and hygiene.

This verifies client recovery behavior with synthetic audio and job outcomes. It does not claim recovery of the reporter's original recordings, historical installed-build behavior or a shipped store release; those remain separately tracked.

UI-Evidence: none -- No visual layout or copy change; Home gains an authenticated inventory refresh. Persistence and account-transition behavior is exercised by regression tests and the native simulator lane.

Line-Count-Exception: app/lib/services/wals/local_wal_sync.dart | 2714 -> 2725 | Eleven lines wire the existing native-intake lifecycle to the account-recovery extension and fence its awaited steps; the reconciliation implementation lives in wal_account_purge.dart.

@aryanorastar
aryanorastar marked this pull request as ready for review November 13, 2026 17:15
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 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-13T17:22:39.327671Z c35145b Draft marked ready
ℹ️ 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.

@aryanorastar
aryanorastar merged commit 77ab70a into main Nov 13, 2026
54 checks passed
@aryanorastar
aryanorastar deleted the codex/issue-24777-rehydrate branch November 13, 2026 17:23
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.

Waiting recordings disappear after app update and same-account sign-in

1 participant