Repository navigation
SCA-3042: Fix native Finish summary matching and natural reconcile scheduling - #25759
Git-on-my-level wants to merge 16 commits into
Conversation
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
|
Superseded by #25992, re-cut from current main for SCA-3024. The replacement head is |
|
Hey @Git-on-my-level 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Before your next PR, please skim:
If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing. Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! |
…#25992) ## Summary Re-cuts #25759 from `origin/main` at `d9be505b41a79ca7d7e2d3ab0d4558f0f5bd4278`, using the SCA-3042 candidate `4087ad173f` and the old PR’s subsequent recovery fix as references. - Persist native Finish intent on the exact finalization job, then wake v3 only after the sealed full transcript is projected. Recheck that proof at planning and notes write boundaries, rearm on upload changes, and preserve visibility for notes already committed against valid input. - Schedule fractional natural silence deadlines at the next whole second so reconcile runs after the boundary. The five-minute silence threshold stays in place. - Flutter can match the explicitly completed derived conversation by exact recording lineage when playback pieces are absent. Current live-window lineage and the existing ID and playback-piece matches remain available. ## Verification - 848 focused backend unit tests. - 22 live-record projection integration cases against a loopback Firestore emulator. - 38 Flutter Finish tests across four checked-in suites. Two new iOS-themed Flutter widget captures under `.agent-artifacts/ui-evidence/sca-3024/`. - The full CI gate, independent omi-panel verdict, lead2’s batch-custody acknowledgment, and David’s same-head UI approval are release intake requirements. The local runs use synthetic recordings and do not measure production stop-to-render latency. ## Panel repair - Validate native Finish boundaries before splitting overlapping speech. Retire unmatched revoked pending windows and release their source claims with reconciliation. - Keep the legacy manual cut when native intent is present without a promotion. Exercise the background notes update with StrictFirestore and the legacy merge with the loopback Firestore emulator. Update both suites that called the removed helper. - Worker 2 passed 393 focused backend unit tests under a 135-second cap, 28 Firestore emulator cases under a 100-second cap, and 38 Flutter tests under a 100-second cap. Flutter was rerun in the existing SDK checkout after verifying identical app and evidence trees. Targeted Pyright reported zero errors. ## Receipt clearing (SCA-3634 and SCA-3636) Clear the native visibility receipt and v3 notes coverage in the same transaction that empties notes. Regressions cover background updates and merges, on-open writes, and editing the default notes to empty before a source replan. Worker 2 passed 237 focused backend tests under a 115-second cap and six loopback Firestore emulator cases under a 65-second cap. The repository-pinned formatter passed across the PR’s changed backend Python files. The lifecycle writer inventory and Firestore query-review digest failures from the earlier projection repair still reproduce locally. Release requires green CI, exact-head UI approval, and lead2’s custody acknowledgment. ## CI guard repair The lifecycle inventory now records the single unmatched native retirement payload in `reconcile`. It clears summary debt and pending work, hides and retires the row, clears its native binding, and advances the content revision. The separate live re-derive retirement entry stays in the inventory. The Firestore query checklist review compared `commit_projection` with the previously pinned body. Refinement and redirected live repair still call the existing donor-task query. The registered driver exercises the transactional and nontransactional profiles. Unmatched native retirement uses keyed document reads and writes. The existing coverage applies, so the digest is refreshed with the same query shape and indexes. ## Firestore SDK import repair Resolve `FieldPath` only when generating an update mask. Worker 2 passed 264 unit tests, covering every file reported failing by shards 1, 3, 6, and 7, SDK field escaping, and receipt clearing. The shard 1 router redaction case passed locally. Six Firestore emulator tests and 21 targeted guard assertions also passed. ## Native Finish custody follow-up An unmatched revoked tile keeps its conversation ID so task and memory links can still resolve. The builder hides it from Home, clears its revoked binding and stale work, and replaces its recording claims in a single projection transaction. The regression covers direct link resolution, no deletion or removal marker, and a second reconciliation with one visible window. Legacy backfill re-derive keeps its existing path for ordinary inputs. Native Finish inputs block before planning or deletion, and the projection commit rejects a native tile in the legacy delete list. The pre-existing backfill hard-delete link and marker gap is tracked separately on SCA-3669. Exact-head R19 and custody disposition remain required. ## UI evidence  
What changed and why
Native Finish carries the exact staged upload and recording lineage through transcription, builder reconcile, and notes. The notes writer rechecks the sealed source before publishing. If the source no longer qualifies, it settles the obsolete pending tile. If the source remains eligible, it commits the recording re-arm and then requests a deduplicated reconcile. Natural close retains the five-minute silence threshold and wakes only after that deadline.
Product invariants affected
none
How it was verified
c71bcca213ed68bba621f30719b3474a26d8ce9f, viaomi-heavy. 2,166 focused v3 and lifecycle writer tests passed. Backend Pyright reported zero errors.BATCH_PIPELINE_RECORD_PROTOCOL_READY=true. All 22test_batch_pipeline_live_firestore.pycases passed.Tests
The v3 transaction suite covers the committed source re-arm and single post-commit dispatch, plus pending-tile settlement on newly missing eligibility. The contract suite checks that re-arm names deduplicate across retries and survive a retained native-ready name.
UI evidence
Line-count exceptions
Line-Count-Exception: backend/database/batch_pipeline_projection.py | 1465 -> 1585 | Validate the complete native recording projection and stamp its exact upload-and-seal proof in the existing atomic producer transaction.
Line-Count-Exception: backend/database/conversation_finalization_jobs.py | 3640 -> 3652 | Record the existing manual terminal intent at the finalization boundary that verifies capture custody.
Line-Count-Exception: backend/database/conversations.py | 5292 -> 5308 | Preserve the existing lifecycle write and publish the recovery wake only after the fenced write transaction has committed.
Failure class
Failure-Class: none