M-7: Turn.bargeIn triggers Voice.cancelTTS (R-018 surface wiring) #141

Open
opened 2026-05-12 19:37:40 +00:00 by KofTwentyTwo · 0 comments
KofTwentyTwo commented 2026-05-12 19:37:40 +00:00 (Migrated from github.com)

Goal

Turn.bargeIn triggers Voice.cancelTTS (R-018 surface wiring). Closes the loop opened in M-6.8. Harness asserts bargeIn during ttsStarted ⇒ ttsEnded(.cancelled) BEFORE turnStarted of new turn.

Scope

  • Orchestrator on bargeIn invokes Voice.cancelTTS() synchronously before starting new turn
  • Ordering: bargeIn → Voice.cancelTTS → ttsEnded(.cancelled) → turnStarted(newTurn)

Files

  • packages/AgentCore/Sources/AgentOrchestrator/AgentOrchestrator.swift
  • packages/JarvisAPI/Sources/JarvisAPI/Surfaces/Turn+Adapter.swift

Acceptance

  • bargeIn during ttsStarted triggers cancelTTS
  • ttsEnded(.cancelled) observed BEFORE turnStarted of new turn
  • R-018 closed

Test

S-TURN-018 (bargeIn-cancels-TTS event ordering).

Parent epic

#11

Source

.planning/architecture/JARVIS-API-MIGRATION-PLAN.md §2.8 (M-7.7)
.planning/architecture/REVIEW-MIGRATION-RISK.md R-018

## Goal Turn.bargeIn triggers Voice.cancelTTS (R-018 surface wiring). Closes the loop opened in M-6.8. Harness asserts bargeIn during ttsStarted ⇒ ttsEnded(.cancelled) BEFORE turnStarted of new turn. ## Scope - Orchestrator on `bargeIn` invokes `Voice.cancelTTS()` synchronously before starting new turn - Ordering: `bargeIn` → `Voice.cancelTTS` → `ttsEnded(.cancelled)` → `turnStarted(newTurn)` ## Files - `packages/AgentCore/Sources/AgentOrchestrator/AgentOrchestrator.swift` - `packages/JarvisAPI/Sources/JarvisAPI/Surfaces/Turn+Adapter.swift` ## Acceptance - [ ] bargeIn during ttsStarted triggers cancelTTS - [ ] `ttsEnded(.cancelled)` observed BEFORE `turnStarted` of new turn - [ ] R-018 closed ## Test `S-TURN-018` (bargeIn-cancels-TTS event ordering). ## Parent epic #11 ## Source `.planning/architecture/JARVIS-API-MIGRATION-PLAN.md` §2.8 (M-7.7) `.planning/architecture/REVIEW-MIGRATION-RISK.md` R-018
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/Jarvis#141