Conversation
Return the persisted session surface from external-run admission, project confirmed begin and terminal receipts onto a run-scoped status surface, and wake deferred voice delivery without treating ordinary chat terminals as background completions. The kernel journal and delivery checkpoint remain authoritative. Owner-transition cleanup cannot publish a stale wakeup, failed injection leaves the checkpoint unadvanced, and ordinary floating-chat answers stay excluded. Tests: 53 focused agent contract tests; 55 focused Swift tests; pinned-Xcode cross-surface harness; desktop test-quality check. Failure-Class: new
|
Verified against #12732 — nice catch and a careful fix for a real defect: deferred "let me verify…" answers completed silently in the journal and were only delivered if an unrelated voice connect or input-window event happened to drain the backlog. What I checked: Root cause confirmed. External realtime runs resolve through the shared chat session and never created an Fix shape holds up:
Test coverage is layered well: the TS authority test pins the realtime→floating-chat session aliasing (the subtle part of the bug), the store tests pin accepted→terminal lifecycle plus non-terminal rejection, and the delivery tests cover both the new trigger and the ordinary-chat exclusion. The One minor, non-blocking observation: the terminal projection stores Human review needed before merge: this change sits inside the external-surface owner-authorization fence, so a maintainer should sign off on the projection/concurrency semantics (owner-transition skip plus MainActor fencing), and the queued Desktop Swift Release Compile should land green first. Automated maintainer-assist feedback on behalf of the Omi maintainers. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
Summary
Fixes #12732.
Realtime-owned agent runs can now wake the existing deferred voice-delivery path as soon as their authoritative kernel completion lands. The completed answer is injected as silent background context and remains governed by the existing next-natural-turn behavior; this change does not interrupt speech or create a second response owner.
Root cause
The realtime tool path completed runs directly through the external-surface protocol. Unlike Swift-owned background runs, it never produced an
AgentRuntimeStatusStorelifecycle projection, soAgentCompletionVoiceDelivery.observe()had no terminal transition to react to.The shared chat session made the gap easy to miss: realtime resolves through a
realtime_voicealias, but the canonical persisted session can remainfloating_chat. The kernel had the answer and journal entry, while delivery only retried on an unrelated later voice connect/input-window event.Changes
surfaceKindin successful external-run begin receipts and carry it inExternalSurfaceRunBinding.floating_chat,realtime_voice, and legacyrealtimeprojections.AgentRuntimeProcess.swiftbelow its previous size.FC-terminal-work-without-consumer-wakeupwith behavioral guard artifacts and add a user-facing changelog entry.Correctness and safety
Proof
npm run buildexternal-surface-authority,protocol-v2, andruntime-stdio-contract.desktop/macos/scripts/agent-logic-harness.sh --cross-surface-smokewith Xcode 26.6: Swift and agent cross-surface contracts passed.python3 desktop/macos/scripts/check_desktop_test_quality.py: passed.surfaceKind: floating_chat, publishes the confirmed terminal transition, injects once, and acknowledges once.No iOS, Android, or hardware path is changed. The defect is at the deterministic macOS kernel-to-Swift lifecycle boundary, so no pendant validation is required.
Product invariants affected
Failure-Class: new
This PR adds
.github/failure-classes/FC-terminal-work-without-consumer-wakeup.jsonand its reusable guard tests.Line-Count-Exception: desktop/macos/Desktop/Sources/FloatingControlBar/RealtimeHubController.swift | 1591 -> 1592 | Updates the existing DEBUG owner-boundary fixture for the new required binding field; extracting a one-line fixture initializer would reduce reviewability.