Repository navigation
refactor wave 2: speakers v2, media/noise, cross-device, calls/recaps/actions/vocabulary, MCP read-API correctness (shadow by default) - #23358
Conversation
Failure-Class: FC-raw-page-limit-before-visibility-filter Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Failure-Class: FC-raw-page-limit-before-visibility-filter Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Failure-Class: FC-raw-page-limit-before-visibility-filter Co-Authored-By: Claude Opus 5.5 <[email protected]>
…wave2-crossdevice
Failure-Class: FC-raw-page-limit-before-visibility-filter Co-Authored-By: Claude Opus 5.5 <[email protected]>
Preserve as-captured archive defaults and shared refactor parsers. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…erage Keep default shadow output, select a quality primary, fence non-destructive groups and alias exact committed secondary frames without wall-clock custody inference. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Normalize and quality-check pooled person enrollment, preserve competing identities, and gate name-only sync assignment through the speaker authority. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Preserve the newer default-on LIVE/READ archive ruling through the shared switch parser. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Retain default-on archive fail semantics in the rendered registry and tighten speaker helper types. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Include unrelated candidate lines in the rate denominator and preserve archive-parser registry semantics after the required main merge. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Add shadow-gated content policy, shared consumer eligibility, and one audited transcript admission filter for live and sync. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keep desktop mic and remote channel clusters apart even when their embeddings are close. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Failure-Class: FC-raw-page-limit-before-visibility-filter Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keep LIVE/READ on by default from P71 while retaining the integrated shared switch parser; other phases retain their independent staged cohorts. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Preserve restored and revised captures when speaker evidence is unavailable. Exercise the real sync path in off, shadow, and serve without a retry or empty-card write. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Use the standard fallback telemetry and avoid repeating alignment after every group pair has already been confirmed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Owner and enrolled-person projections carry the matching identity state while unresolved voices retain abstention states. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keep the generic parser authoritative and declare derived cohort settings in the registry-supported ENV form. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Partial acoustic coverage keeps participant publication unavailable; only resolved voices contribute to a complete participant list. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Legacy generation resumes non-generated rows in place and delivery never treats a pending status as a completed recap. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…bulary Cover lower-case product spellings such as micro1 from memories without requiring a learned spelling entry. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…mposed fixtures Keep empty evidence headers byte-compatible with existing caches while preserving populated energy round trips. Initialize the new media state and isolated call/recap dependencies in legacy seam fixtures. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ave 2 mounts Target the retained legacy budget guard, exercise usage tracking with eligible input, and preserve the real transcript admission policy in the isolated sync router harness. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…tures Retain real parser and metric owners across isolated MCP loads, stub profile reads, accept additive task provenance, and preserve meeting-tail admission checks through the gated call metadata seam. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…speaker metadata Keep the literal pre-V1 cache comparison in explicit off mode; populated shadow cache metadata remains covered by the integrated reload regression. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Pass media and call outcomes through the closed reason helper at metric sites and bound person-sample rejection labels with an explicit reason enum. Preserve the reason-label ratchet and existing debt list. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…heckout The Firestore registry now imports the MCP query definitions. Copy that pure dependency into the synthetic workflow control checkout so readiness gates execute under the same module closure as the repository. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Gate calls boundary publication by its own serve cohort, preserve on-demand partial-day recaps, thread STT identity explicitly, retain grounded social commitments and correct parity telemetry. Restore shared documentation and guard GPU dependency/shim boundaries. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…user-created contacts for spelling Screen-meeting contexts share the sentinel id 'screen-activity', which made every screen window one boundary signal. Drop the sentinel so windows key by start. User-created contacts without voice labels were excluded from trusted spellings, so names the user typed never reached the notes prompt. is_user_created is written only by the user create/rename paths. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 58d4c61a23
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| conversations = [c for c in conversations if not exclude_from_derived(uid, c, consumer='daily_summary')] | ||
| if not conversations: | ||
| return {} |
There was a problem hiding this comment.
Handle an all-filtered recap before returning
When MEDIA_NOISE_MODE serves a user whose selected day contains only media/noise conversations, this returns {}. The scheduled producer prefilters this case, but the create and regenerate routes in backend/routers/users.py still pass their unfiltered lists directly here: creation then raises KeyError: 'id', while regeneration overwrites the existing summary with only preservation metadata. Either these callers must reject the empty eligible set before persistence or this function must return a result they explicitly handle.
AGENTS.md reference: AGENTS.md:L29-L35
Useful? React with 👍 / 👎.
| # The post-processing bulkhead preserves request context (including | ||
| # validated live BYOK keys) while isolating this expensive sync path | ||
| # from WebSocket and Cloud Tasks event loops. | ||
| conversation = await run_blocking(db_executor, apply_call_metadata, uid, conversation) |
There was a problem hiding this comment.
Apply call metadata to every processing entry point
When CALLS_RECAP_MODE serves, this finalizer is the only production caller of apply_call_metadata, while synchronous creation, reprocessing, sync, merge, callback, and backlog paths invoke process_conversation directly. Those paths therefore persist null call fields even when the conversation has positive phone or calendar evidence, so identical inputs produce different metadata depending on their processing entry point. Move the projection into the shared processing path or invoke it from every direct caller.
AGENTS.md reference: AGENTS.md:L29-L35
Useful? React with 👍 / 👎.
| # Imports stay lazy; tests can inject dependencies at the producer seam. | ||
| from utils.other import notifications as n |
There was a problem hiding this comment.
Break the new circular module dependency
daily_recap.generate imports notifications inside the function while notifications._generate_and_store_daily_summary now imports daily_recap inside its function, creating a circular dependency that works only because both imports are deferred until runtime. Refactor the shared producer dependencies in one direction instead of relying on function-local imports; the backend guide explicitly requires imports at module scope and a strict database → utils → routers hierarchy.
AGENTS.md reference: backend/AGENTS.md:L161-L169
Useful? React with 👍 / 👎.
| created_action_items = action_items_db.get_action_items( | ||
| uid, | ||
| start_date=stats_start_date_utc, | ||
| end_date=stats_end_date_utc, | ||
| ) |
There was a problem hiding this comment.
Report the action-item cap instead of claiming complete coverage
When an account creates more than 2,000 action-item documents in the requested day, or enough soft-deleted rows exhaust the bounded scan, get_action_items silently returns at most _ACTION_ITEMS_LIST_HARD_MAX. This result now supplies both action_items_created and the persisted action_items, while the payload declares action_items_coverage as created_in_window, so the recap silently undercounts and omits tasks while advertising complete coverage. Use an aggregate plus paginated payload read, or expose that the action-item coverage was truncated.
Useful? React with 👍 / 👎.
Both shadows read Firestore on every finalize for every user. Measuring needs a uid sample, as wave 1 did with refactor_modes.shadow_sampled; serve cohorts always run. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…tion guard (#23362) ## CI flake fixed at the root `cpu-duration-guard-test_runtime_image_contracts-gpu_batch_retry_cap-1.15s` — the fast-unit CPU duration guard failed `tests/unit/test_runtime_image_contracts.py` when `test_gpu_batch_retry_cap_does_not_reach_cloud_tasks`'s call phase exceeded the 1.00s fail budget. This is a standing CI-flake fix request from David (2026-10-22: every caught CI flake gets fixed at the root; caching and flake fixes approved). No `.github/` changes — the fix is a single evidence-documented entry in `backend/tests/fast_unit_duration_allowlist.txt`. ### Evidence it is a flake, not a regression The test was added ~23:00Z on 2026-10-22 by #23358 (`ed2c03440d`, the batch retry-cap closure regression). Every CI run of the identical code since then measured it right on the 1.00s budget — passing once by 0.02s and failing three times — while **all 66 tests in the file passed in every run**; the only failure output is the guard section: | Run | Context | Guard measurement (CPU, call phase) | Result | |---|---|---|---| | [39873589152](https://github.com/BasedHardware/omi/actions/runs/39873589152) job 120154114649 | #23358 head `58d4c61a23`, shard 2/6, 23:55Z | 0.98s (warn only) | pass | | [39871080428](https://github.com/BasedHardware/omi/actions/runs/39871080428) job 120145388808 | #23358 head `58d4c61a23`, shard 2/6, 23:33Z | **1.07s > 1.00s** | fail | | [39876683920](https://github.com/BasedHardware/omi/actions/runs/39876683920) job 120163867960 | main push of merge `c39757a13a`, shard 2/6, 00:25Z | **1.13s > 1.00s** | fail | | [39878478985](https://github.com/BasedHardware/omi/actions/runs/39878478985) attempt 1 | PR #23356, shard 3/6, 00:42Z | **1.15s > 1.00s** | fail | No run before the test existed shows this signature (all failing `Backend Unit Tests` runs back to 19:31Z on 10-22 were checked; the other failures are unrelated classes). ### Root cause The test proves the batch worker's retry policy stays off Cloud Tasks. It walks the 109-module `batch-pipeline-worker` first-party import closure **twice** — `first_party_import_closure()` for the first-party membership assertions, then `third_party_dependency_modules()` for the `google.cloud.tasks` third-party assertion; both AST-parse the same files. Measured on a quiet host: 0.136s + 0.139s = **0.275s CPU**. On the hosted CI shard runners the same work reads 0.98–1.15s (slower per-core runners plus parallel-load CPU inflation, the phenomenon the guard's own docs measure at ~2x on a saturated host), landing exactly on the 1.00s fail budget — so every PR whose selection includes this file flakes on shard runners. ### Fix Add the node ID to `backend/tests/fast_unit_duration_allowlist.txt` with the measured evidence — the repo's purpose-built mechanism for genuine unit tests whose measured CPU exceeds the failure threshold (three entries were added in the last 48h for this same CI-shard-at-the-limit shape, most recently `test_batch_audio_language.py::test_admitted_short_false_permission_cannot_bypass_worker_barrier[zh-clean_speech-6s-pcm16]`). The test keeps running at full strength in the unit lane; only the duration guard is suppressed for this node ID. Deliberately not done: - **No traversal restructuring of `runtime_image_contracts.py`**: the two walks compute distinct contract facts with different import-candidate semantics (membership vs third-party probe); sharing one traversal would change a contract script that CI image gates depend on, and halving the cost would still leave ~0.5s on loaded runners with no deterministic margin over a budget the test already straddles by 0.02s margins. - **No global `BACKEND_FAST_UNIT_FAIL_SECONDS` bump**: a global budget change weakens the guard for every other test; the per-node allowlist is the documented exception path. - **No skip/xfail/deletion**: the test's assertions are untouched and keep gating every run. ### Local verification (nice -n 19) ``` BACKEND_UNIT_TEST_FILE_LIST=<3 files> bash backend/test.sh # warn=0.1 fail=1.0, file isolation tests/unit/test_runtime_image_contracts.py 66 passed, 0 duration-guard failures tests/unit/test_fast_unit_duration_guard.py 5 passed tests/unit/test_fast_unit_duration_allowlist_selection.py 2 passed ``` The allowlist entry was additionally verified through `backend/tests/conftest.py::_read_duration_allowlist`/`_duration_allowlisted` (node ID parses and matches, 360 entries). `scripts/pr-preflight --suggest`: lane=ci, no product-invariant citations, no failure-class declaration required. <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/23362?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="View guided diff" src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a> <a href="https://www.cubic.dev/action/auto-fix/pr/BasedHardware/omi/23362?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F23362&source=description" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img alt="Turn on auto-fix" src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
…ings (#23693) Hidden media/noise/bystander conversations on macOS can now be found with Filter → Show Discarded and restored from the row menu or detail. Audio/transcripts remain accessible; discarded detail withholds derived notes. Restore publishes the full canonical response only after the server confirms success, rejects stale account responses, and keeps list/count/search/cache scope aligned. This is the desktop companion for #23669 / #23358. The phone-compatible POST reprocess endpoint must include #23669's backend keep-intent fix: it derives `user_kept` from stored discard/keep state before classification; it accepts no client `user_kept` body or query field. Desktop uses the phone's 180-second timeout. No backend deploy, flag/cohort change, data repair, workflow change, or new icon is included. Validation: 56 focused Swift tests passed (repository, search filtering, restore API and finalization projection); compact cross-surface gate passed 71 Swift tests, agent contracts and harness failure propagation. The named non-production app compiled/signed and passed its 19-file Mach-O audit. Actual mounted UI checks against loopback synthetic fixtures covered list filtering, retained transcript, search scope and restore POST200; persisted readback confirmed discarded=false and user_kept=true. LLM/provider leaves were controlled: this is REST/persistence/UI acceptance, not an LLM-quality or audio-playback claim. Production source is unchanged since those checks. After the test-only lint correction, m1 package compile passed and all 52 bounded normal push gates passed. An extra m1 filtered XCTest run stalled at unrelated VoiceTurnDomainTests startup and was stopped; that runtime is inconclusive. New head 28857c4 (retain-detail fix, merge of 17 upstream commits, authorized test seed correction): m1 package compile passed, and the bounded intended-bundle runner for the expanded 59-test selection produced real XCTest output but stalled in its first async case and exited its own 60-second bound as INCONCLUSIVE (124); per instruction it was not retried or loosened — the 59-test runtime claim stays inconclusive on m1. The prior-head 56-test and mounted-UI evidence above is unchanged. Canonical read-only Luna round 1 returned SHIP with no P0/P1 at prior head 1e16305; its one non-blocking P2 is deferred to #23695 (restoring changed summary text can leave a stale text-search hit until refresh). Luna round 2 (delta-only, since 1e16305) returned SHIP with no findings at 08:44Z (ledger round 2, out review-23693-r2.md). Terminal exact-head CI is GREEN: Desktop Swift Static & Test Contracts passed in 35m55s at 28857c4 along with all other non-skipping checks. UI-Evidence: David approved the Show Discarded / Restore Conversation controls and wording shown in screenshots 001–003 on 2026-10-26, relayed by lead ruling 9eddbf at 07:54Z. The PR is ready for review; canonical Luna and terminal CI still gate merge, which the lead owns. Broader wave-2 expansion also requires the desktop companion and backend dependency to ship. Backend durability when a later processing step fails remains owned by wave2ramp in #23669. No merge or deployment is claimed.    Invariant-Impact: INV-AUTH-1, INV-NAV-1, INV-UI-1, INV-UI-2. Session-generation fences remain authoritative; restore adds no alternate mutation authority and uses existing desktop controls and navigation. Failure-Class: none
What and why
Integrate wave 2 of capture, speaker evidence and notes against the reviewed wave-1 authority. This is a branch-only handoff: no PR, merge to main, runtime cohort, deployment or production data access. All implementation commits use the requested co-author trailer.
Defaults, flags and ramp
SPEAKER_EVIDENCE_MODE, MEDIA_NOISE_MODE, CAPTURE_COVERAGE_MODE, NOTES_PACKET_V2_MODE, EPISODE_BOUNDARIES_MODE, LIFECYCLE_V2_MODE, CALLS_RECAP_MODE, ACTION_ITEMS_V2_MODE and STT_VOCAB_MODE remain shadow. No serve cohort is configured. Existing client flags remain off/unknown. Costly shadow database writers use refactor_modes.shadow_sampled: CAPTURE_COVERAGE_MODE_SHADOW_PERCENT, SPEAKER_EVIDENCE_MODE_SHADOW_PERCENT and EPISODE_BOUNDARIES_MODE_SHADOW_PERCENT, each default 5. STT_VOCAB_MODE_SHADOW_PERCENT samples source reads at default 1. Serve cohorts always write and zero disables sampled writes. All bindings are declared and the registry regenerated. Invalid percentages keep the bounded default. V4 phone/calendar boundary publication is serve-only under CALLS_RECAP_MODE; shadow projects the evidence locally without authority writes. No CALLS_RECAP_MODE_SHADOW_PERCENT binding is needed for this serve-only choice. On-demand recaps explicitly bypass scheduled grace; all scheduling/backfill keeps the completed-day grace.
Owner dazheng, by 2026-10-26: synthetic integrated acceptance, reviewed runtime digest pilot, then 1% -> 5% -> 25% -> 100%, one full lookback window per step. Keep modes shadow while configuring sampled serve cohorts; mode serve is the 100% stage. Align producer/consumer runtime cohorts (especially speaker/boundary evidence with media and calls) so sampling does not make serving evidence unavailable. No expansion until manual/identity violations, false folds, lost unique speech/custody, false owner-call/media exclusions, genuine-speech drops and duplicate recap deliveries remain zero. Inspect speaker count/anchor/agreement metrics, omi_media_noise_shadow_total (especially repeated_sentence admission receipts), cross-device duplicate/examined lines, coverage admits/seconds, sync failures/latency and vendor spend. No paid duplicate generation/transcription in shadow. Rollback modes to off and clear runtime cohorts; durable lifecycle obligations still reconcile. Persisted groups/classifications are non-destructive and may need restore/reprocess after rollback. Budget cohort entry for one regeneration per fingerprint-less legacy day inside the seven-day lookback (subject to the existing per-run backfill cap); retained IDs and delivery receipts prevent duplicate notifications. No serve cohort was enabled for this work.
Review disposition
Conflicts and shared contracts
Resolved person_pool.py by retaining incoming quality checks and wave-1 type annotation; duplicate_capture.py retains both lifecycle serving and cross-device imports. Generated artifacts are regenerated from generators, not resolved by hand. ContentKind has one literal definition shared by stored/create models and policy; request classification stays hidden/server-authored. BoundaryKind includes media_playback once. Participant count and owner anchor live only in SpeakerEvidence. Call fields are additive optional Conversation metadata; explicit boundary proof survives canonical normalization and wire round trips. V4 persisted stubs pass through M with null generated_at. Media/noise-only days report not_generated rather than falsely saying no recordings; actual empty days keep no_recordings. Both one-shot and agentic prompt mounts are exercised in off/shadow/serve.
The pipeline guide records integration, sampling, call/recap/prompt contracts, replay and pending socket semantics. The developer storage guide explains original-recording retention and unknown/remote metadata without publishing rollout controls. Dead-code analyzer regenerated its baseline without new suppressions; the allowlist tool deliberately never auto-edits allowlists. Existing evaluator-only exceptions remain, and imported wave-1 contract scaffolds have no stale allowlist entries.
Runtime image closure audit (fix pass)
Merged fresh origin/main at 81270c6 after #23355 landed. It merged without conflicts and leaves exactly the same source tree as fix commit ed2c034. Before #23355 landed, also merged origin/fix-parakeet-policy-closure at 2d3ec70; its remote branch was deleted after merge. No unseen remote integration commits were overwritten.
The audit independently executes each revision's backend/scripts/runtime_image_contracts.py third_party_dependency_modules(contract) over every registered contract (including lazy imports), without importing application code or reading production. There are zero added and zero removed third-party probe targets across all 19 images against the final main base; no new lockfile/requirements package is needed.
The earlier comparison against pre-#23355 main 4499deb had zero additions in all images; the only removals were batch-pipeline-worker: fastapi.Request, google.api_core.exceptions.AlreadyExists, google.cloud.tasks_v2, google.protobuf, google.protobuf.duration_pb2 and google.protobuf.timestamp_pb2; and parakeet: utils.speakers.policy plus its BATCH_CLUSTER/PARAKEET_CLUSTER attribute candidates. Those are the intended #23355 repairs, now present on both sides of the final comparison.
Batch retry policy imports the dependency-light utils.capture.retry_cap core, avoiding utils.sync.retry_hygiene -> utils.cloud_tasks. Dockerfile-overwritten first-party shims are explicitly excluded from checkout dependency probes: parakeet excludes utils.logging_config and utils.speakers.policy; diarizer excludes omi_logging, utils.logging_config and utils.stt.diarization_turns; nllb-translation excludes omi_logging. The copied implementations are standard-library-only. Full-backend/pusher copies use their real source modules rather than checkout shims. Four new regressions verify the three shim contracts and the batch worker's separation from Cloud Tasks. Full final JSON evidence: image-closure-diff.json; earlier comparison: image-closure-diff-pre23355.json; reproducible script: audit-image-closure.py.
Additional integration findings
Validation
Pre-V4 combined validation on ec9bd4f6695: 2,725 passed across 97 focused backend files, 15 standard marker deselections, no skips. Real live name gating, media processing/persistence/restore, replay, recap consumers and V4/M stub timestamps have integrated regressions. Repository preflight: 65 selected checks passed; metadata validation: five passed. Separate CI slow guardrails: 2,049 passed, 1,342 deselected (all 25 manifest files). Flutter capture/labels/Home/parity: 86 passed, 5 existing skips. Swift capture/group/decoder suites: 33 passed. Actual loopback REST/JSON-RPC smoke: nine passed, external connects blocked and synthetic stores only; server stopped. Full backend Pyright: zero errors, existing warning debt retained. App-client/public/integration-public OpenAPI and all Dart/Swift/TypeScript generators completed; dead-code baseline regeneration made no suppressions or tracked changes.
Final whole-backend selection: 2,244 runnable files, 48,510 passed, 84 skipped and 2,120 deselected by the standard marker policy. It ran once and reported 496 failed cases plus nine setup errors across 14 files. Those exposed the cache header/metric-label contracts and isolated fixture dependencies described above. All 14 failed files are repaired: the final 15-file scoped selection passed 860 tests, followed by 94 passed in the workflow fixture after its missing module copy was added (954 green scoped tests across 16 files, including the new cache and quality-label regressions). The whole suite was not rerun. Logs: integration-full-backend.log, integration-failed-files-final.log and integration-workflow-repair.log in this brief directory.
Post-V4 validation also passed: full Pyright zero errors; all 25 CI slow-guardrail files 2,049 passed/1,342 deselected; Flutter 86 passed/five skips; Swift 33 passed; loopback HTTP smoke nine passed. Repository preflight passed 65 checks after the cache repair; metadata passed five checks. V4/shared composition passed all 13 cases and latest-main FinOps selection passed 113 tests across six files. Regenerated OpenAPI and Dart/Swift/TS artifacts are current. All backend suites use nice -n 10, the worktree-local Python 3.11 environment and BACKEND_UNIT_TEST_FILE_LIST through omi-heavy. The normal pre-push gate passed on pushed head 9fc0e71: 65 preflight checks, full Pyright (zero errors), runtime source closure, the bounded 40-file backend selection, generated OpenAPI/Dart/Swift artifacts and the native Swift build. No hook was bypassed. The remote wave2-integration ref was verified equal to that head after the push. GitHub reports a completed/skipped Mintlify check and no commit status checks; this branch-only handoff does not claim full PR CI.
No production reads, api.omi.me calls, user content, cloud changes, device claims or deployment. GCP tier: none. Local validation is not full PR CI or production acceptance; no PR is authorized.
Fix-pass verification
The 16-file focused selection passed 475 tests. After adding four runtime-image regression cases, its image-contract file passed all 66 tests (the original 62 plus four new), giving 479 distinct focused cases green across the 16 files. Full Pyright passed with zero errors (48,941 non-blocking warnings). Logs: fix-pass-focused-tests.log, fix-pass-image-tests.log and fix-pass-pyright.log. The whole backend suite was not rerun. No Flutter or Swift source changed in this pass; the normal pre-push gate still performs its configured native/generated validation.
The full metadata/preflight run passed 65 checks in 250.84 seconds (fix-pass-metadata.log). The subsequent merge of main is source-identical: both source trees are 33f6033c0bd20e3d093daa96aa93a54bd745469c. Current fix-pass head is 58d4c61. The normal pre-push gate passed on 58d4c61: 65 preflight checks (189.64 seconds), full Pyright zero errors, runtime source closure, the bounded 40-file backend selection, OpenAPI/generated-client checks and native Swift build/checks. The fast-forward push 9fc0e71 -> 58d4c61 completed, and git ls-remote verified that exact full SHA at refs/heads/wave2-integration on 2026-10-22 23:15:18Z. Working tree is clean. GitHub reported zero commit statuses and zero check runs at verification; no full PR CI claim is made. No approval or hook bypass was used. Log: fix-pass-push.log. Final saved handoff metadata revalidation passed five checks (fix-pass-metadata-final.log).
Owner-replay fixes (wave-1 code, found by the offline replay)
Episode boundaries: screen-meeting contexts carry the shared sentinel id
screen-activity, so every screen window hashed to one boundary-signal identity (a later window was rejected as an immutable start change; batches collapsed).context_signalnow drops that sentinel and screen-source ids, so each window keys by its own start. BehindEPISODE_BOUNDARIES_MODE(shadow writes are sampled). Test:test_distinct_screen_windows_get_distinct_identities.Contact spelling: a contact the user created by hand (no voice labels yet) was excluded from trusted spellings, so a correct contact name never reached the notes prompt.
is_user_createdis written only by the user create and rename paths (automatic detection never creates people), so it now counts as stored user evidence. This intentionally applies to the legacy prompt too: it only adds names the user typed.Shadow cost: the media/noise classifier (
relevance_media.classify_for_processing) and cross-device reconcile (coverage_crossdevice.reconcile) read Firestore per finalize. Their shadow now runs for a 5% uid sample (MEDIA_NOISE_MODE_SHADOW_PERCENT,CAPTURE_COVERAGE_MODE_SHADOW_PERCENT) viarefactor_modes.shadow_sampled; serve cohorts always run. Found by the default-inertness audit.Risks and remaining work
Precision-first speaker/media and whole-secondary alignment can abstain or retain duplicates. Missing SNR/confidence uses deterministic source/duration order. V3 live secondary receipt dispatch and partial-window suppression require durable frame alignment; only exact committed aliases may release custody. No historical memory/task/recap repair. MCP indexes are declared but not deployed; fallback and bounded-window uncertainty remain explicit. Historical watching intervals and past recap failure causes cannot be reconstructed. Runtime TTL activation and all serve ramps remain separately scoped operator work. V4 screen/desktop positive-proof production and automatic stale task mutation remain partial; the supplied backend boundary and both notes prompt hooks are integrated.
Invariant-Impact: INV-AUTH-1, INV-MEM-1, INV-MEM-3, INV-MEM-4, INV-MEM-5, INV-CAP-1, INV-TASK-2. Auth/privacy and canonical memory/task authorities are preserved; capture custody requires exact durable proof. No unsupported attribution becomes an owner claim.
Failure-Class: FC-split-mutation-authority
V3 lane classification: FC-same-speech-captured-twice-surfaces-twice
M lane classification: FC-raw-page-limit-before-visibility-filter
Failure-Class-Guard: backend/tests/unit/test_cross_device_coverage.py
Failure-Class-Guard: backend/tests/unit/test_wave2_media_integration.py
Failure-Class-Guard: backend/tests/unit/test_mcp_read_correctness.py
Wave 1 client evidence is retained in this integration; V2 adds no UI source:


Line-Count-Exception: backend/database/users.py | 2496 -> 2507 | Small authority integration hooks; substantive policy lives in focused owning modules.
Line-Count-Exception: backend/routers/listen/receiver.py | 2780 -> 2782 | Thread authenticated request identity into the two existing Soniox call sites; vocabulary policy stays in its owning module.
Line-Count-Exception: backend/routers/listen/transcripts.py | 1648 -> 1655 | Small authority integration hooks; substantive policy lives in focused owning modules.
Line-Count-Exception: backend/utils/conversations/process_conversation.py | 3212 -> 3233 | Small authority integration hooks; substantive policy lives in focused owning modules.
Line-Count-Exception: backend/utils/conversations/speaker_resolution.py | 1560 -> 1564 | Small authority integration hooks; substantive policy lives in focused owning modules.
Line-Count-Exception: backend/utils/sync/pipeline.py | 3657 -> 3671 | Small authority integration hooks; substantive policy lives in focused owning modules.
🤖 Generated with Claude Code