Skip to content

SCA-3042: Fix native Finish summary matching and natural reconcile scheduling - #25759

Closed
Git-on-my-level wants to merge 16 commits into
mainfrom
release/native-finish-summary-deadline
Closed

Git-on-my-level wants to merge 16 commits into
mainfrom
release/native-finish-summary-deadline

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

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

  • m1, backend code commit c71bcca213ed68bba621f30719b3474a26d8ce9f, via omi-heavy. 2,166 focused v3 and lifecycle writer tests passed. Backend Pyright reported zero errors.
  • m1, same code commit, isolated Firestore emulator with BATCH_PIPELINE_RECORD_PROTOCOL_READY=true. All 22 test_batch_pipeline_live_firestore.py cases passed.
  • All 17 Flutter Finish widget cases passed. iOS-sized renders on synthetic test data are attached. The evidence shows the processing page and the expiry fallback. The widget suite also asserts matching exact completed derived lineage and rejecting unrelated rows.
  • Repository preflight passed all 52 checks against the screenshot-bearing candidate.
  • Production end-to-render latency and provider cost await serving readback.

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

Finish processing
Finish waiting on Home

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

View guided diff Turn on auto-fix

@Git-on-my-level Git-on-my-level changed the title Fix native Finish summary matching and natural reconcile scheduling SCA-3042: Fix native Finish summary matching and natural reconcile scheduling Nov 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment /approve-ui 4087ad173f3efc6788cf99d516d8d28b084b7575. Each new head needs a fresh approval. To withdraw it, comment /reject-ui <full head SHA>. Non-UI work and unrelated access are unaffected.

@github-actions

Copy link
Copy Markdown
Contributor

@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment /approve-ui 2aefa79b50df8d8a5e2b36c654c357048210965d. Each new head needs a fresh approval. To withdraw it, comment /reject-ui <full head SHA>. Non-UI work and unrelated access are unaffected.

@github-actions

Copy link
Copy Markdown
Contributor

@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment /approve-ui a1e2de2bbe8aa4fd2754efcc2bb750146f9e97ff. Each new head needs a fresh approval. To withdraw it, comment /reject-ui <full head SHA>. Non-UI work and unrelated access are unaffected.

@Git-on-my-level

Copy link
Copy Markdown
Member Author

Superseded by #25992, re-cut from current main for SCA-3024. The replacement head is 2f931b1760f1eb19fcbb9e2cb41db5550b10585e.

@github-actions

Copy link
Copy Markdown
Contributor

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:

  • Project standards — Ensuring consistency across the codebase
  • User needs — Making sure changes align with what our users need
  • Code best practices — Maintaining code quality and maintainability
  • Project direction — Keeping aligned with our product principles and locked invariants

Before your next PR, please skim:

  • PRODUCT.md — product north star
  • Product invariants — locked rules (shared chat, memory tiers, agent control plane, integrations, brand)

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!

Git-on-my-level added a commit that referenced this pull request Nov 27, 2026
…#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

![Finish waiting for the
summary](https://raw.githubusercontent.com/BasedHardware/omi/22e5822e0e7d5939ad5e14d5f94e988c707531fa/.agent-artifacts/ui-evidence/sca-3024/001-mobile-ios-finish-processing.png)

![Finish wait expired with Back to
Home](https://raw.githubusercontent.com/BasedHardware/omi/22e5822e0e7d5939ad5e14d5f94e988c707531fa/.agent-artifacts/ui-evidence/sca-3024/002-mobile-ios-finish-pending-on-home.png)
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