M-3: HUD state moves to Diagnostics (F-003); delete legacy hudState emit #110

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

Goal

Move HUD state to Diagnostics surface per F-003 amendment. HudStateCoordinator becomes single writer; BusForwarder no longer emits hudState. Behavioral single-writer gate (M-0.6) is the safety net.

Scope

  • Diagnostics.hudStateChanged event + getHudState query
  • DELETE old BusOutbound.hudState emit site
  • HudStateCoordinator is sole writer reaching the bus client
  • Critical: must delete old emit, not parallel-emit (Failure Mode 1)

Files

  • packages/JarvisAPI/Sources/JarvisAPI/Surfaces/Diagnostics+Adapter.swift
  • packages/AgentCore/Sources/AgentOrchestrator/BusForwarder.swift — remove hudState emit
  • packages/HUD/... — HudStateCoordinator integration

Acceptance

  • bash scripts/check-single-writer-hudstate.sh (behavioral) green AFTER migration
  • Old BusOutbound.hudState emit DELETED
  • Exactly ONE writer reaches the bus client (harness probe)
  • getHudState returns current state from HudStateCoordinator

Test

Behavioral single-writer probe (M-0.6) green; harness asserts exactly one event.

Parent epic

#7

Source

.planning/architecture/JARVIS-API-MIGRATION-PLAN.md §2.4 (M-3.2)
.planning/architecture/JARVIS-API-DESIGN-v0.2.md F-003 amendment
.planning/architecture/REVIEW-MIGRATION-RISK.md R-004 + Failure Mode 1

## Goal Move HUD state to Diagnostics surface per F-003 amendment. HudStateCoordinator becomes single writer; BusForwarder no longer emits hudState. Behavioral single-writer gate (M-0.6) is the safety net. ## Scope - `Diagnostics.hudStateChanged` event + `getHudState` query - DELETE old `BusOutbound.hudState` emit site - `HudStateCoordinator` is sole writer reaching the bus client - Critical: must delete old emit, not parallel-emit (Failure Mode 1) ## Files - `packages/JarvisAPI/Sources/JarvisAPI/Surfaces/Diagnostics+Adapter.swift` - `packages/AgentCore/Sources/AgentOrchestrator/BusForwarder.swift` — remove hudState emit - `packages/HUD/...` — `HudStateCoordinator` integration ## Acceptance - [ ] `bash scripts/check-single-writer-hudstate.sh` (behavioral) green AFTER migration - [ ] Old `BusOutbound.hudState` emit DELETED - [ ] Exactly ONE writer reaches the bus client (harness probe) - [ ] `getHudState` returns current state from `HudStateCoordinator` ## Test Behavioral single-writer probe (M-0.6) green; harness asserts exactly one event. ## Parent epic #7 ## Source `.planning/architecture/JARVIS-API-MIGRATION-PLAN.md` §2.4 (M-3.2) `.planning/architecture/JARVIS-API-DESIGN-v0.2.md` F-003 amendment `.planning/architecture/REVIEW-MIGRATION-RISK.md` R-004 + Failure Mode 1
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/Jarvis#110