Skip to content

Converge desktop agent, voice, and journal ownership - #9597

Merged
Git-on-my-level merged 19 commits into
mainfrom
codex/9515-agent-continuity-convergence
Jul 13, 2026
Merged

Git-on-my-level merged 19 commits into
mainfrom
codex/9515-agent-continuity-convergence

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Jul 13, 2026 •

Copy link
Copy Markdown
Member

Closes #9515.

What changed

This is the atomic convergence refactor from #9515. It gives each canonical model one mutation owner and removes the superseded authorities in the same PR:

  • VoiceTurnCoordinator/VoiceTurnReducer exclusively own logical PTT/realtime lifecycle; capture, sockets, playback, and floating UI are drivers/projections.
  • The Node kernel exclusively resolves route intent, owns session/run/attempt lifecycle, authorizes run-scoped tool capabilities, publishes versioned context snapshots, and pins immutable execution profiles.
  • The kernel journal/outbox is the single durable main-chat-visible write path. Swift chat stores project journal events and backend reconciliation deduplicates by the stable canonical turn ID.
  • Task chat takes amendment option (a): task-thread turns ride the journal with thread scope; legacy SQLite is a read-only, paginated compatibility import with owner, removal condition, and remove-by metadata.
  • Effective-owner changes use a pre-visibility transition barrier, exact (ownerID, generation) authorization snapshots, correlated Node runtime revocation, commit leases for local mutations, and hard process teardown on account replacement.
  • Foreground and direct-control child tools share one fail-closed run/attempt capability path. Request/client IDs remain correlation only.
  • Superseded routing, authorization, persistence, session-identity, voice-lifecycle, provider-mutation, and dual-write paths were deleted rather than hidden behind flags.

The journal continues to sync through the existing backend message representation. Additive canonical-turn and revision fields remain backward-readable (a missing revision is revision 1), so a reverted client still sees ordinary history. Rollback is a revert of this complete PR, not a runtime dual-architecture switch.

Root cause and durable guard

The system had centralized nouns but plural mutation verbs: Swift request lifetime could authorize kernel tools, physical voice drivers could terminalize logical turns, several stores could persist visible chat independently, and async work could recapture credentials after an owner transition. Recent fixes in these areas shared the same failure class: authority and identity were inferred at a call site instead of proven at the canonical boundary.

The durable guard is an executable ownership contract: typed route/run/attempt/capability/journal/context/profile models in the kernel; one voice reducer in Swift; exact generation-bearing owner snapshots at admission and commit; correlated runtime revocation and process teardown; journal-only projections; behavioral race tests for same-UID ABA, cancellation, restart, and direct-child tool use; and zero-baseline mechanical guards against reintroducing old authorities. Restart recovery now bootstraps an exact positive journal generation before a generation-fenced clear, keeps the Swift journal deadline beyond SQLite's full busy window, and fingerprints the gauntlet trace prefix so rotate/truncate/regrow cannot hide terminal evidence. The live restart harness now waits through the replacement listener's pre-auth window while failing closed on requested bundle/port mismatches and preserving timeout state for diagnosis.

Review contract

Review commit-by-commit in dependency order. Every internal commit leaves the tree buildable and has focused verification evidence; the commits are sequenced for review but this PR must merge or revert atomically. There are no production compatibility flags, dual writes, fallback routers, second lifecycle owners, or dormant legacy authorities.

Product invariants affected

  • INV-AGENT-*
  • INV-AUTH-1
  • INV-CHAT-1
  • INV-VOICE-1
  • INV-INT-1

The matching invariant documents and guards move with the code.

Verification

  • cd backend && bash test.sh — the authoritative full selector passed all 554 backend unit-test files.
  • cd backend && scripts/openapi_runner.sh scripts/export_openapi.py --surface app-client --check ../docs/api-reference/app-client-openapi.json plus the five app-client schema/generator suites — contract snapshot current; 50/50 tests passed across schema inventory and Swift/TypeScript/Dart generators.
  • cd desktop/macos && ./scripts/test-tool-surfaces.sh — generated surfaces matched; Vitest 502/502 and TAP 104/104.
  • cd desktop/macos && ./scripts/agent-logic-harness.sh — passed all lifecycle, runtime, generated-surface, and pi-mono contract stages (47.76s).
  • cd desktop/macos && OMI_SWIFT_TEST_SUITE_WORKERS=4 ./scripts/swift-test-suites.sh — all 264 suites passed in isolated processes with four workers. The rebase-conflict boundary also passed its focused TaskContextualResurfacingTests run (30/30), and the restart hardening passed focused runtime 55/55, projection 23/23, and gauntlet-contract 5/5 runs.
  • cd desktop/macos/Backend-Rust && cargo test — 349/349 after the final main sync, including the new Redis recovery/deadline guards and this branch's LLM stub coverage.
  • cd desktop/macos && ./scripts/agent-continuity-gauntlet.sh --self-check — passed.
  • cd desktop/macos && ./tests/test-local-profile-keychain-reset.sh — passed with hermetic Keychain/process fakes.
  • cd desktop/macos && rm -rf Desktop/.build && xcrun swift build -c release --package-path Desktop --triple arm64-apple-macosx — clean release build passed (378.56s).
  • Desktop test-quality stayed at the exact baseline (59 source-reading files / 169 sites, 19 waits); import-purity, Black, generated-surface, deferred-marker, and diff-hygiene checks passed.
  • python3 .github/scripts/test_pr_preflight.py and python3 .github/scripts/test_run_checks.py — 9/9 each; route-policy inventory tests passed 24/24; bare make preflight resolved PR Converge desktop agent, voice, and journal ownership #9597 metadata and passed all 20 selected checks, including the shared local/CI route-policy baseline guard.
  • Independent architecture/concurrency review approved the final diff with no release blocker. Independent rebase reviews preserved both main's new task-signal/device-provider behavior and the generation-bearing owner lease/fail-closed authorization contract.

Real-path acceptance

The fresh named non-production omi-chat-ptt-convergence-ci-final bundle, signed in as the hermetic local-default-user fixture, exercised the exact request: “Have an agent look through my memories today and surface one surprising insight.” The all-suite gauntlet created one child session, reused that same child for two successful get_memories invocations, emitted exactly one completion for each initial/follow-up run under one parent, preserved the identical producing turn across app restart, passed all seven resilience scenarios plus owner A→B isolation, and recorded zero legacy-path, malformed-frame, forbidden, or unrouted-tool evidence. The finalized manifest is green and pinned to rebased HEAD f3115c38fa; check-gauntlet-evidence-at-head.sh block passed. Evidence: desktop/macos/.harness/agent-continuity-gauntlet/20260713T031834Z.

Rollback

Revert the complete PR. Journal sync is idempotent/restart-safe and backward-readable through the existing backend message wire shape; no destructive chat or agent-data migration is introduced, and no runtime switch keeps both architectures alive.

@mintlify

mintlify Bot commented Jul 13, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
omi 🟢 Ready View Preview Jul 13, 2026, 2:31 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@cubic-dev-ai

cubic-dev-ai Bot commented Jul 13, 2026

Copy link
Copy Markdown

This PR has 61,121 reviewable changed lines after ignored/generated files are excluded, above cubic's default 50,000-changed-line automatic review limit. The raw diff is 62,934 lines before ignored/generated files are excluded.

Most of the diff comes from:

  • desktop/macos/Desktop/Sources/FloatingControlBar/RealtimeHubController.swift (~3,906 changed lines)
  • desktop/macos/Desktop/Sources/Providers/ChatProvider.swift (~2,891 changed lines)
  • desktop/macos/Desktop/Sources/Chat/AgentRuntimeProcess.swift (~2,854 changed lines)
  • desktop/macos/agent/src/runtime/conversation-journal.ts (~2,748 changed lines)
  • desktop/macos/agent/tests/conversation-journal.test.ts (~2,562 changed lines)

Comment @cubic-dev-ai review this to review it anyway. If the largest files are generated or fixture data, add them to your ignored files in review settings or ignorePatterns in cubic.yaml - cubic will then review the rest automatically. You can also raise this limit in review settings.

CI added 14 commits July 12, 2026 22:36
Verification: Node build + 472 tests; Swift production and 277 test sources compile/link; focused runtime/alias 56, owner/auth/PTT/database 28, UI/task/permission 84; desktop test-quality and diff checks pass.
Verification: seven focused Swift suites passed (120 tests total); agent-continuity-gauntlet --self-check passed; desktop test-quality and git diff checks passed.
Verification: backend inventory and task-intelligence contract suites passed 35/35; import-purity guard, Black, independent peer review, and git diff checks passed.
Verification: race test passed 30/30, meeting suites passed 21/21, four concurrent workers passed, and the full 262-suite Swift matrix passed with four workers.
Verification: strict desktop E2E coverage reports 97 changed Swift files, 97 covered, and zero uncovered; git diff checks passed.
Make journal revisions, context freshness, exact child producer binding, ordered transport, owner transitions, and stale backend acknowledgements fail closed at their canonical boundaries. Add behavioral regression coverage plus hermetic named-bundle and Keychain harness support.

Verification: backend 7353 passed; Node 502 passed; Rust 329 passed; all 262 Swift suites passed; test-tool-surfaces and agent-logic harness passed; clean arm64 release build passed; local PR preflight passed 19 checks; named-bundle all-suite gauntlet passed before commit and will be rerun at this exact HEAD.
Track QueryTracer by file identity and complete-byte offset across append, rotation, truncation, and replacement. Require exact-query owner-switch evidence and cover each cursor transition in the gauntlet self-check.

Verification: python compilation, gauntlet self-check, and git diff --check passed; failed live evidence proved the prior line-count cursor skipped the new one-line active log after 5 MiB rotation.
Bootstrap generation-fenced clears from the authoritative owner surface, propagate clear failures through automation, and keep journal IPC deadlines beyond SQLite's full busy window. Fingerprint the gauntlet trace prefix so rotate/truncate/regrow cannot hide new exact-query evidence.

Verification: AgentRuntimeProcessTests 55/55; KernelTurnRecordedProjectionTests 23/23; AgentContinuityGauntletTests 5/5; gauntlet self-check; desktop test-quality ratchet; git diff --check.
Regenerate the app-client OpenAPI snapshot and its Dart/TypeScript clients so the optional journal provenance fields introduced by the desktop continuity work are part of the released compatibility boundary.\n\nVerification:\n- backend/scripts/openapi_runner.sh scripts/export_openapi.py --surface app-client --check ../docs/api-reference/app-client-openapi.json\n- backend/venv/bin/python -m pytest -q tests/unit/test_assistant_settings_response_models.py tests/unit/test_app_client_schema_inventory.py tests/unit/test_app_client_swift_generator.py tests/unit/test_app_client_ts_generator.py tests/unit/test_app_client_dart_generator.py (50 passed)
Route make preflight through the existing PR metadata resolver so locked invariant citations are checked against the live PR body instead of an always-empty temporary body.\n\nVerification:\n- python3 .github/scripts/test_pr_preflight.py (9 passed)\n- make preflight (19 checks passed against PR #9597)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6c4d27565c

ℹ️ 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".

Comment on lines +24 to +25
offset += page.count
if page.count < ChatLegacyCompatibilityMetadata.pageSize { return rows }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Advance legacy imports by the requested page size

When a legacy backend page contains any reported messages, /v2/desktop/messages still applies limit/offset to the raw Firestore query and then filters reported rows out (backend/database/chat.py:215,222-225). Advancing by page.count and stopping when the filtered count is below 100 makes the one-time kernel import overlap rows and then checkpoint as complete while older visible messages are never imported; this affects any history page with a reported message before the end of the user's chat history.

Useful? React with 👍 / 👎.

Comment on lines +1448 to +1450
const candidateFrontier = Number(state.page_count) === 0 && remoteIds.length > 0
? remoteIds[0]!
: state.candidate_frontier_remote_id == null ? null : String(state.candidate_frontier_remote_id);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep a reconcile frontier after empty visible pages

If the first reconcile page contains only reported messages, the backend can return messages: [], a cursor, and has_more: true; this code then leaves candidate_frontier_remote_id null because remoteIds is empty on page 0. Later pages may import visible rows, but page_count is no longer 0, so completion never stores a frontier and every future reconcile starts from the top again, repeatedly scanning the same reported prefix/history instead of stopping at the last successful sync.

Useful? React with 👍 / 👎.

Treat the replacement listener's pre-auth Firebase window as retryable while retaining fail-closed CLI bundle and port attribution. Persist timeout state for diagnosis and cover transitional, ready, mismatch, and missing-ok classifications in self-check.\n\nRoot cause: the automation listener binds before auth restoration completes, and the gauntlet treated the first transient signed-out snapshot as terminal.\n\nVerification:\n- python3 scripts/agent-continuity-gauntlet-lib.py --self-check\n- xcrun swift test --package-path Desktop --filter AgentContinuityGauntletTests (5 passed)\n- full live all-suite gauntlet passed after reproducing the pre-fix race\n- independent harness review approved
CI added 3 commits July 12, 2026 23:00
Declare the authenticated first-party route policy for the canonical desktop journal reconciliation page so CI's missing-route baseline remains a no-increase ratchet.\n\nVerification:\n- route_policy_inventory.py --enforce-missing-baseline (0 new missing routes)\n- pytest -q tests/unit/test_route_policy_inventory.py (24 passed)
Root cause: the route-policy baseline was enforced only by a one-off OpenAPI workflow step, so local PR preflight could not catch a missing policy entry for a newly added route. Register the check in the shared manifest and make the workflow reuse the same script.

Verification: make preflight (20/20 checks); .github/scripts/test_run_checks.py (9 tests); backend route-policy inventory tests (24 tests); baseline comparison against origin/main (0 new missing entries).
The shared Hygiene preflight now selects the manifest-owned route-policy baseline check, but its runner did not install uv. Provision the same pinned Python and uv environment used by the OpenAPI contract job so local and CI lanes execute the identical guard.

Verification: make preflight (20/20); backend workflow contract checker; check-manifest runner tests (9/9).
@Git-on-my-level

Copy link
Copy Markdown
Member Author

@cursor resolve merge conflict

@cursor

cursor Bot commented Jul 13, 2026 •

Copy link
Copy Markdown

Merge conflict resolved and pushed to codex/9515-agent-continuity-convergence.

Conflict: desktop/macos/Desktop/Sources/FloatingControlBar/RealtimeHubController.swift in hubDidRequestTool.

Resolution: Kept the PR branch’s kernel-authorized path (invokeExternallyAuthorizedTool) and dropped main’s inline HubTool switch plus handleRealtimeDelegationRequest. That matches the convergence model: tool calls go through the kernel’s external-run authority instead of being dispatched inline in Swift.

Merge commit: ed5a39bc1 — merged origin/main into the branch.

PR status: #9597 is MERGEABLE again (no remaining conflict markers). mergeStateStatus may still show BLOCKED until CI finishes or other required checks pass.

Open in Web Open in Cursor 

Resolve RealtimeHubController conflict by keeping kernel-authorized
invokeExternallyAuthorizedTool path in hubDidRequestTool. Main's inline
HubTool switch and handleRealtimeDelegationRequest are superseded by the
convergence PR's external-run authority model.

Co-authored-by: David Zhang <[email protected]>
@Git-on-my-level
Git-on-my-level merged commit eef09b3 into main Jul 13, 2026
29 checks passed
@Git-on-my-level
Git-on-my-level deleted the codex/9515-agent-continuity-convergence branch July 13, 2026 04:40
Git-on-my-level added a commit that referenced this pull request Jul 17, 2026
## Summary

- Project cancelled and superseded task statuses through one shared
lifecycle rule, so the local cache, Dashboard refresh, and To Do
reconciliation all retire the same task.
- Make Tasks-page first-load, loading, error, and retry behavior follow
the selected To Do or Done view instead of aggregate task rows.
- Add regression coverage for soft retirement, Dashboard visibility,
selected-view state, and both terminal statuses.

## Failure class

Failure-Class: FC-split-mutation-authority

The violated contract was that separate callers projected task
retirement differently. The fix converges this lifecycle transition in
`TaskActionItem.isRetired`, the shared domain model, rather than adding
another surface-specific observer. It covers the reported cross-surface
disagreement and follows the class's prior evidence in #9365 and #9597.

## Product invariants

None. `scripts/pr-preflight --suggest` found no product-invariant
citations required by these changed paths.

## Verification

- `xcrun swift test -c debug --package-path Desktop --filter
'ActionItemStorageVisibilityReconciliationTests|TasksStoreEmptyCloudReconcileTests|DashboardTaskRefreshPolicyTests|StartupWarmupPolicyTests|TasksViewModelCompletedToggleTests'`
(59 tests passed)
- `./scripts/agent-logic-harness.sh --cross-surface-smoke` (Swift,
agent, and Rust contract smoke passed)
- `./scripts/swift-format-wrapper.sh lint ...` and `python3
scripts/check_desktop_test_quality.py`
- Built and launched the named ad-hoc `omi-task-projection` bundle; its
automation bridge navigated to Tasks. The dev bundle was signed out, so
live account data could not be exercised.
- Independent Sol review approved the implementation with no blocking
findings.


<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/9940?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="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
choguun pushed a commit to choguun/omi that referenced this pull request Jul 28, 2026
Evidence: PR BasedHardware#9597 converged run authority onto the kernel with an
adapter-only capability allowlist, structurally rejecting every voice-only
surface tool; observed live in Beta 0.12.141 as 'kernel rejected tool
ask_higher_model code=tool_not_allowed'. Guard artifact: behavioral
swift_realtime authorization test in agent/tests/run-tool-capability.test.ts.

Co-Authored-By: Claude Fable 5 <[email protected]>
Git-on-my-level added a commit that referenced this pull request Jul 28, 2026
## What changed and why

Replace the remaining split memory lifecycle with one canonical
pipeline: broad, bounded intake always lands in Short-term; canonical
consolidation is the sole route into Long-term and atomically records
its promotion receipt and graph assertion. Retrieval now collapses
canonical lineage, while vector, keyword, compatibility, and graph
projections converge from a durable outbox instead of acting as memory
authority.

### High-level change map

- **Broad Short-term intake:** conversation extraction, explicit writes,
observations, imports, APIs, plugins, and integrations now enter the
same Short-term lifecycle. Capture is subject-aware, accepts useful
short utterances, preserves source state when grounding is invalid, and
retracts only genuinely empty extraction results.
- **One Long-term admission authority:** canonical consolidation gives
every pending item exactly one route—promote, archive, review, or
reject. Promotion is the only route into Long-term and atomically
commits the promotion receipt, canonical item, ledger state, structured
graph assertion, and derived-view outbox work. The old generic L2
promotion workers and helper paths are removed.
- **Cleaner, higher-context retrieval:** default access can use eligible
Short-term and Long-term memory, but collapses aliases and superseded
items by canonical lineage so one logical fact appears once. Vector
hydration is fenced to the authoritative item revision/commit,
restricted content stays provider-ineligible, and chat/developer/MCP
compatibility adapters preserve the canonical policy.
- **Reliable derived projections:** vector, keyword, V3 compatibility,
and graph cleanup are durable, retryable outbox effects rather than
competing memory owners. Workers reload authoritative state, use leases
and idempotent writes, reconcile after provider calls, and acknowledge
only successful convergence.
- **Correct replacement and privacy closure:** conversation reprocessing
replaces its complete source set atomically, restores independently
supported facts when a merged source disappears, and keeps
source-addressable lineage. Memory deletion, conversation cascades,
exact 100-item batches, and account deletion now close over canonical
lineage under durable deletion and processing fences.
- **Bounded cost and failure handling:** consolidation and
required-processing work use stable cursors, bounded Firestore queries,
capped batch sizes and LLM calls, retry leases/backoff, and terminal
review/quarantine after repeated failure. Sparse legacy scans rotate
durably so old rows cannot starve newer work.
- **Operational and contract updates:** the PR adds the canonical
maintenance schedule/runtime contract, Firestore indexes and rules,
malformed-document read-boundary coverage, deployment setting
classification, architecture/runbook updates, the proposed `INV-MEM-4`
lifecycle invariant, and a backend prevention artifact for
`FC-split-mutation-authority`.

## Why these are improvements

- **Simpler ownership:** capture, admission, mutation, and projection
responsibilities now have one named authority each. Removing parallel
promotion paths makes contradictory tier/graph state structurally harder
to create.
- **Better recall without simply returning more noise:** broad intake
retains potentially useful observations in Short-term, while
evidence/subject validation and the exact-one-route consolidation
boundary decide what deserves durable Long-term status.
- **Better precision:** promotion requires structured grounding and a
graph plan; retrieval rehydrates authoritative records and collapses
lineage before returning results, rather than trusting stale provider
rows or showing both an alias and its survivor.
- **Higher reliability and privacy:** canonical state and every derived
effect are journaled together, external work is retried from
authoritative state, stale generations are fenced, malformed Firestore
documents use the shared sanitized boundary, and deletion wins over
delayed projection work.
- **Controlled cost:** all new maintenance scans and LLM paths have
explicit query, batch, attempt, and per-pass bounds. Failed or poisoned
work is quarantined instead of being retried forever or starving the
queue.
- **Evidence, not only structure:** behavioral tests execute production
seams for capture, consolidation, atomic apply, replacement, deletion,
retrieval, projection delivery, scheduling, and malformed data. Fault
cases assert rollback, retry, redaction, and no-side-effect behavior.

The requested recall, precision, reliability, and cost percentages
remain design targets. This PR establishes the mechanisms expected to
improve those metrics but does not claim production benchmark results.

## Product invariants affected

- INV-MEM-1
- INV-MEM-2
- INV-MEM-4 (proposed)

## How it was verified

- `BACKEND_PYTEST_WORKERS=1 bash test.sh` swept all 776 backend test
files. It initially exposed nine integration-fixture regressions; after
repairing those seams, `BACKEND_UNIT_TEST_FILE_LIST=.unit-failures.txt
BACKEND_PYTEST_WORKERS=1 bash test.sh` passed every formerly failing
file.
- Focused canonical capture, consolidation, apply/outbox,
lineage/privacy, adapter, runtime-contract, and source-replacement
suites passed, including the hermetic canonical pipeline path.
- `make preflight` passed the complete diff-scoped local manifest.
- The bounded pre-push gate passed all 60 selected backend test files
with serial workers; the one prior parallel-only duration failure passed
its required guarded rerun (`22 passed in 0.80s`).
- Pyright (`0 errors`), Black, Ruff, Python compilation,
changed-workflow `actionlint`, Firestore index generation/coverage,
runtime validators, and the app-client OpenAPI drift check passed.
- `npx tsc --noEmit --incremental false` passed for the admin web
workspace.

No production deployment or live personal account data was used. A
live-service/user-facing production exercise therefore remains
intentionally unperformed.

## Tests

Core-path and error-path coverage was added or updated for broad
Short-term capture, sole-route consolidation, atomic graph-backed
promotion, required-processing retries, source replacement/reactivation,
lineage collapse, projection retries/read fences, privacy deletion,
account purge, bounded review queries, scheduler wiring, and
compatibility adapters.

## Failure class (fixes)

Failure-Class: FC-split-mutation-authority

## New guards (only when adding a check or ratchet)

Merged PRs #9365 and #9597 are the recorded instances this would have
caught. `backend/tests/unit/test_canonical_maintenance_ordering.py` is
intentionally a backend behavioral contract, not a new shared checker,
because it must execute the production memory-maintenance owner and
prove that no second promotion route can run when consolidation is
blocked; the shared cross-component primitive remains the
`FC-split-mutation-authority` registry contract.

<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/10772?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="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
undivisible pushed a commit to Archit-lal/omi that referenced this pull request Jul 29, 2026
Evidence: PR BasedHardware#9597 converged run authority onto the kernel with an
adapter-only capability allowlist, structurally rejecting every voice-only
surface tool; observed live in Beta 0.12.141 as 'kernel rejected tool
ask_higher_model code=tool_not_allowed'. Guard artifact: behavioral
swift_realtime authorization test in agent/tests/run-tool-capability.test.ts.

Co-Authored-By: Claude Fable 5 <[email protected]>
kodjima33 added a commit that referenced this pull request Sep 2, 2026
…12579)

## Summary
The voice model only saw the screen when it chose to call the
`screenshot` tool. On Beta 0.12.256/257 it skipped that call on ~1 turn
in 6 (stale in-session image, fresh barge-in session, short ambiguous
audio routed to think_deeper) and answered a current-screen question
("what's the answer to this riddle?", "5+2?") from an earlier turn.

- The PTT-down frame is now sent as in-turn `realtimeInput.video` on
every Gemini turn (`attachTurnScreenFrameIfNeeded`, called when the
frame finishes encoding and on every `beginLiveInputTurn`, once per
evidence per physical session so barge-in replacements get it too).
- Session: buffered frames are tagged with their turn and flushed at
`activityStart` only for the matching turn; frames that miss their
window are dropped at commit, never carried into the next turn.
- `think_deeper` falls back to the OCR text of the same PTT-down frame
when no screen observation was accepted this turn.
- Voice instruction: the per-turn image IS the current screen; earlier
images are stale; `screenshot` is for a fresh re-look only. Tool
description updated in the manifest and regenerated.

Restores the turn-start frame delivery from 1d46c82 (vendz, Jun 17)
that was dropped in the #9597 refactor.

## Verification
Local `omi-doors` bundle built from this patch (2026-09-01 22:20). Nik
exercised the real path: Notes with `5+5`/`5+2`, and the doors page. 8
PTT turns, every one shows `ptt_screen_evidence
stage=turn_frame_attached` followed by `screen frame sent in-turn (~263
KB)`; answers followed the current screen, including the changed note.
Regression tests added: `RealtimeHubSessionInputLifecycleTests` (frame
flushed at activityStart; frame from a finished turn dropped),
`HubSystemInstructionTests` (instruction + tool description),
`ScreenContextTelemetryTests` (snapshot visibleText).

Invariants: INV-VOICE-1, INV-AGENT-1, INV-AGENT-2, INV-AGENT-3,
INV-CHAT-1.
Failure-Class: none
undivisible pushed a commit to undivisible/omi that referenced this pull request Sep 29, 2026
…dware#9940)

## Summary

- Project cancelled and superseded task statuses through one shared
lifecycle rule, so the local cache, Dashboard refresh, and To Do
reconciliation all retire the same task.
- Make Tasks-page first-load, loading, error, and retry behavior follow
the selected To Do or Done view instead of aggregate task rows.
- Add regression coverage for soft retirement, Dashboard visibility,
selected-view state, and both terminal statuses.

## Failure class

Failure-Class: FC-split-mutation-authority

The violated contract was that separate callers projected task
retirement differently. The fix converges this lifecycle transition in
`TaskActionItem.isRetired`, the shared domain model, rather than adding
another surface-specific observer. It covers the reported cross-surface
disagreement and follows the class's prior evidence in BasedHardware#9365 and BasedHardware#9597.

## Product invariants

None. `scripts/pr-preflight --suggest` found no product-invariant
citations required by these changed paths.

## Verification

- `xcrun swift test -c debug --package-path Desktop --filter
'ActionItemStorageVisibilityReconciliationTests|TasksStoreEmptyCloudReconcileTests|DashboardTaskRefreshPolicyTests|StartupWarmupPolicyTests|TasksViewModelCompletedToggleTests'`
(59 tests passed)
- `./scripts/agent-logic-harness.sh --cross-surface-smoke` (Swift,
agent, and Rust contract smoke passed)
- `./scripts/swift-format-wrapper.sh lint ...` and `python3
scripts/check_desktop_test_quality.py`
- Built and launched the named ad-hoc `omi-task-projection` bundle; its
automation bridge navigated to Tasks. The dev bundle was signed out, so
live account data could not be exercised.
- Independent Sol review approved the implementation with no blocking
findings.


<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/9940?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="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->

This branch was successfully deployed

1 active deployment
staging - docs — ed5a39bc Deployed Jul 13, 2026 by mintlify[bot]
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.

refactor(macOS): converge chat, PTT, agents, tools, and continuity onto single owners

2 participants