M-6b: startVoice() surfaces audioGraphFailed if ringBuffer nil (B-04, R-007) #130

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

Goal

M-6b — startVoice() returns audioGraphFailed if ringBuffer nil after open() (B-04). NO silent log-and-degrade. Surface error rather than dormant. Mitigates R-007.

Scope

  • Voice.startVoice() -> Result<VoiceStarted, VoiceError>
  • VoiceError.audioGraphFailed(reason:) returned if AudioGraphOwner.open() returns but ringBuffer is nil
  • No silent degrade
  • Surface returns .failure; HUD displays banner

Files

  • packages/Voice/Sources/Voice/VoiceController.swift
  • packages/Voice/Sources/Voice/AudioGraphOwner.swift

Acceptance

  • startVoice() returns .audioGraphFailed when ringBuffer nil
  • B-04 gate (R-007): success ⇒ ≥10 audioLevelChanged within 500 ms
  • Banner emitted on failure
  • Closes #49 (B-04)

Test

S-VOICE-001 (B-04 gate); S-VOICE-009 (audioGraphFailed surface).

Parent epic

#10

Source

.planning/architecture/JARVIS-API-MIGRATION-PLAN.md §2.7 (M-6.5) + §5.4 Failure Mode 4
.planning/architecture/REVIEW-MIGRATION-RISK.md R-007
B-04: #49

## Goal M-6b — startVoice() returns audioGraphFailed if ringBuffer nil after open() (B-04). NO silent log-and-degrade. Surface error rather than dormant. Mitigates R-007. ## Scope - `Voice.startVoice() -> Result<VoiceStarted, VoiceError>` - `VoiceError.audioGraphFailed(reason:)` returned if `AudioGraphOwner.open()` returns but `ringBuffer` is nil - No silent degrade - Surface returns `.failure`; HUD displays banner ## Files - `packages/Voice/Sources/Voice/VoiceController.swift` - `packages/Voice/Sources/Voice/AudioGraphOwner.swift` ## Acceptance - [ ] `startVoice()` returns `.audioGraphFailed` when ringBuffer nil - [ ] **B-04 gate (R-007):** success ⇒ ≥10 `audioLevelChanged` within 500 ms - [ ] Banner emitted on failure - [ ] Closes #49 (B-04) ## Test `S-VOICE-001` (B-04 gate); `S-VOICE-009` (audioGraphFailed surface). ## Parent epic #10 ## Source `.planning/architecture/JARVIS-API-MIGRATION-PLAN.md` §2.7 (M-6.5) + §5.4 Failure Mode 4 `.planning/architecture/REVIEW-MIGRATION-RISK.md` R-007 B-04: #49
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/Jarvis#130