Repository navigation
Description
A successfully persisted relevance discard on a batch_live_v1 capture currently makes register_recording return False. The strict finalizer gate retries with a registration failure before reaching the existing terminal fanout fence. This causes bounded retry churn; the strict behavior preserves the audio obligation.
Fix this with a restore-aware authoritative fence. A prototype that skips registration based on the returned model's discarded state is unsafe: a user can restore the durable row before claim_finalization_fanout reads it. Restore sets discarded=False without changing the finalization binding, so the claim can admit the restored completed row and terminalize fanout without its deterministic record_pending audio job. A separate read before claiming does not close that race.
The correction must preserve all of these outcomes:
- An intentional discard reaches a terminal no-fanout outcome without registration retry churn.
- A restore before the fanout transaction cannot admit kept-capture fanout without retaining its canonical audio job; changed state must retry or atomically retain the obligation.
- A processing revival uses the current kept state, rather than the stale initial discarded snapshot.
- Silent backfill retains its existing processing fence; real/unknown audio obligations remain strict.
- Privacy/deletion fences and finalization revision/lease ownership still apply.
Reproduction tests in commit 75babcd603199c168a8cf6a121624494b772c4fb cover newly persisted discard, stale-snapshot revival and silent discard. Before the prototype they produced two failures and one passing revival control. The prototype passes those cases but misses the concurrent restore race; add a real Firestore transaction race regression before implementing the eventual correction. The prototype was explicitly reverted under lead ruling f498ab and is not part of the final PR tree.
Evidence: PR #24104; Luna R5 identified the restore race. Code boundaries: backend/utils/conversations/finalizer.py, backend/database/conversations.py::restore_conversation_from_discarded, and backend/database/conversation_finalization_jobs.py::_claim_finalization_fanout_txn.
Owner: rollout lead to assign the restore-aware follow-up. Next: by 2026-10-30 18:00 UTC, assign an implementation owner and a dated regression/fix plan, or renew the promise with evidence. Tracked under the C1 step of card:two-lane-transcription-local-bench-quality-to-all-users.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsIn progress
Activity
fix: recover unsealed no-job batch captures with digest-gated backfill (
Dimank92 commentedon Oct 30, 2026
I have resolved this issue in PR #24119 with the restore-aware authoritative fence in finalizer, lifecycle, and cfj transaction logic, along with full test coverage (90/90 tests passing).
Payout wallet (USDC Base / Polygon / Arbitrum / Stellar):
0xC345C07229307d4f1c7935aD2cAe48e390215808fix(finalizer): restore-aware authoritative fence for discarded live …
fix(finalizer): support kwargs in harness stubs and omit expected_dis…
fix(finalizer): restore-aware authoritative fence for discarded live …
fix(finalizer): support kwargs in harness stubs and omit expected_dis…
fix(finalizer): restore-aware authoritative fence for discarded live …