Repository navigation
fix(macos): preserve PTT spawn authority through barges - #9675
Merged
Git-on-my-level merged 6 commits intoJul 14, 2026
Merged
Git-on-my-level merged 6 commits into
Git-on-my-level merged 6 commits into
Conversation
Git-on-my-level
force-pushed
the
codex/ptt-post-tool-recovery
branch
from
July 14, 2026 03:47
9484c19 to
b6fe5fa
Compare
Regression coverage: targeted VoiceTurnCoordinator FIFO admission test; agent context snapshot tests. Exercised rebuilt omi-ptt-spawn-recovery bundle against dev backend.
Member
Author
|
@cursor address merge conflicts and review/fix any issues |
…ecovery # Conflicts: # desktop/macos/Desktop/Sources/Generated/GeneratedRealtimeTools.swift # desktop/macos/Desktop/Sources/Generated/GeneratedToolExecutors.swift # desktop/macos/agent/src/runtime/omi-tool-manifest.ts # desktop/macos/agent/tests/fixtures/tool-manifest.json
Git-on-my-level
added a commit
that referenced
this pull request
Jul 14, 2026
## Summary - Converge the desktop bridge lifecycle, canonical tool-result envelopes, adapter conformance fixtures, one tool manifest, hermetic local-adapter discovery, and PTT/chat context-cache contracts. - Make bridge startup failures recoverable and enforce artifact-backed bounded output, including the 620 KiB session-listing regression. - Add contract fixtures, state fuzzing, anti-regrowth checks, a changelog fragment, and manifest-gated cross-surface tests. ## Dependency This builds on #9675, the PTT spawn-authority restoration, which has landed on `main` and supplies the reused kernel-restore seam and fixture/guard conventions. ## Root cause and durable guard The runtime had multiple Swift and Node result boundaries that could independently reinterpret lifecycle or tool results, leaving dead-end startup failures, unbounded or lost projections, and divergent ledger/provider outcomes. Prior fixes in this failure class fixed individual routes without establishing a shared contract boundary. This change centralizes lifecycle and result finalization, makes tool provenance artifact-backed and canonical, and guards it with shared Node/Swift fixtures, a 620 KiB persistence regression, an end-to-end Swift result/ledger test, a sequence fuzzer, the agent-logic harness, and the preflight check manifest. ## Verification - `cd desktop/macos/agent && npm test -- --run && npm run build` (47 files, 555 tests) - `cd desktop/macos && xcrun swift test --package-path Desktop` (2,436 tests) - `cd desktop/macos && bash ./scripts/agent-logic-harness.sh --cross-surface-smoke` - `cd desktop/macos/Backend-Rust && cargo test routes::realtime::tests` - `bash desktop/macos/scripts/test-tool-surfaces.sh` - `python3 desktop/macos/scripts/check-agent-runtime-convergence-ratchet.py` - Local named bundle `omi-agent-runtime-contract-pr` launched with its bridge on port 47975 and navigated to Chat; the final runtime code was confirmed in the packaged bundle. The bundle was signed out because no reusable Omi Dev auth existed. ## Product invariants affected - INV-AGENT-* - INV-AUTH-1 - INV-CHAT-1 - INV-VOICE-1 Closes #9688 Closes #9658 Closes #9342 Closes #8461 Closes #9033 Closes #9680
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
spawn_agentjournal authority when a PTT turn is barged or its provider closes.list_agent_sessionsschema explicit that it discovers subagents and floating-bar sessions.Root cause and durable guard
The realtime hub kept accepted spawn ownership only in mutable transport tracking. A barge-in or provider teardown cleared that tracking while a delayed journal-finalization task was still resolving the transcript. The task then treated an already-accepted delegation as an ordinary provider response, which could duplicate the exchange and separate the child lifecycle from the PTT acknowledgment.
The interrupted-turn payload and completed-turn finalization now snapshot the accepted spawn owner before transport cleanup. The regression test drives that captured payload through the real provider-failure continuity and journal-authority policies, asserting that it refreshes the canonical spawn rather than records a second exchange.
The hub-warmup follow-up reserves the reducer effect identity before draining FIFO work, so a valid PTT context update cannot be rejected merely because it was admitted during an active drain. The policy follow-up retains the generic direct-recall requirement while avoiding content-specific memory rules. The broader shared context/cache contract is tracked in #9680.
The desktop Swift CI suite also exposed a drift in the canonical realtime tool description: the list-sessions tool remained present, but its generated schema no longer told the model that it discovers subagents. The manifest source now states that contract explicitly; its generated Swift and fixture surfaces are refreshed, while
HubSystemInstructionTestsexercises the emitted schema and the tool-surface test keeps generated outputs in sync.Product invariants affected
Verification
cd desktop/macos/agent && npm test -- context-snapshot.test.ts(17 passed)cd desktop/macos && xcrun swift test -c debug --package-path Desktop --filter RealtimeHubBargeInContinuityTests(53 passed)cd desktop/macos && xcrun swift test -c debug --package-path Desktop --filter HubSystemInstructionTests(12 passed)cd desktop/macos/agent && node --experimental-strip-types scripts/generate-tool-surfaces.mjs --check && node node_modules/vitest/vitest.mjs run tests/tool-surfaces-exhaustiveness.test.ts(9 passed)cd desktop/macos && ./scripts/agent-logic-harness.sh --cross-surface-smoke(Swift/Node/Rust contract gates passed)cd desktop/macos && OMI_APP_NAME="omi-ptt-spawn-recovery" ./run.sh --yolo(named dev-backend bundle built and launched; main UI rendered via accessibility snapshot)git pushpre-push gate: 14 manifest checks, desktop debug build, and 104 desktop tool-surface tests passed.