Bus: sessionHistory(turns:) case has no producer and no consumer — dead-letter since 2.1.0 bump #43

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

Summary

BusOutbound.sessionHistory(turns:) is a dead-letter case. Plan 07-03 bumped BUS_PROTOCOL_VERSION 2.0.0 → 2.1.0 specifically to add it. The TS mirror tracks it. Both sides decode it. JS handler is // Plan 07-06 added the case; AppDelegate.installMemory does not yet hydrate (= WARN-INT-2). Until then we acknowledge but no-op so the exhaustiveness sentinel below remains tight. Swift side has ZERO production constructors of .sessionHistory(turns:).

Evidence

  • File: packages/Bus/Sources/Bus/Protocol.swift:14-17
  • File: packages/Bus/Sources/Bus/BusOutbound.swift:22-25
  • File: webview/packages/bus/src/protocol.ts:60
  • File: webview/packages/hud/src/bus/client.ts:153-157
  • Verified: grep -rEn 'sessionHistory\(turns' App/ packages/ --include='*.swift' returns no production matches

Recommended fix

Two options:

a) Actually wire it. AppDelegate.installMemory → WebviewBridge.send(.sessionHistory(turns: lastN)) on webview-ready + chat-panel mount. JS hydration arm replays into chat store. The chat panel currently gets state only via in-flight token stream — hydration would actually be useful (user sees empty chat on every relaunch).

b) Cut the case out. Bump 2.3.0 → 3.0.0 (MAJOR — removed field).

Option (a) lands naturally as part of #11 (M-7 Turn surface), which migrates chat hydration to listTurns query. Per the migration plan, Plan M-7.6 has "webview retires sessionHistory push, calls listTurns on connect (R-015)."

Test

  • After M-7 migration, the case is removed; BUS_PROTOCOL_VERSION = "2.4.0" strict; webview calls Turn.listTurns(limit:) on connect

Source

  • Audit: .planning/audit-2026-05-12/bus-hud-audit.md (2026-05-12) — finding S2

Cross-references

  • Closed by: #11 (M-7 Turn surface)
## Summary `BusOutbound.sessionHistory(turns:)` is a dead-letter case. Plan 07-03 bumped `BUS_PROTOCOL_VERSION` 2.0.0 → 2.1.0 specifically to add it. The TS mirror tracks it. Both sides decode it. JS handler is `// Plan 07-06 added the case; AppDelegate.installMemory does not yet hydrate (= WARN-INT-2). Until then we acknowledge but no-op so the exhaustiveness sentinel below remains tight.` Swift side has ZERO production constructors of `.sessionHistory(turns:)`. ## Evidence - File: `packages/Bus/Sources/Bus/Protocol.swift:14-17` - File: `packages/Bus/Sources/Bus/BusOutbound.swift:22-25` - File: `webview/packages/bus/src/protocol.ts:60` - File: `webview/packages/hud/src/bus/client.ts:153-157` - Verified: `grep -rEn 'sessionHistory\(turns' App/ packages/ --include='*.swift'` returns no production matches ## Recommended fix Two options: a) **Actually wire it.** `AppDelegate.installMemory` → `WebviewBridge.send(.sessionHistory(turns: lastN))` on webview-ready + chat-panel mount. JS hydration arm replays into chat store. The chat panel currently gets state only via in-flight token stream — hydration would actually be useful (user sees empty chat on every relaunch). b) **Cut the case out.** Bump 2.3.0 → 3.0.0 (MAJOR — removed field). Option (a) lands naturally as part of #11 (M-7 Turn surface), which migrates chat hydration to `listTurns` query. Per the migration plan, Plan M-7.6 has "webview retires sessionHistory push, calls `listTurns` on connect (R-015)." ## Test - After M-7 migration, the case is removed; `BUS_PROTOCOL_VERSION = "2.4.0"` strict; webview calls `Turn.listTurns(limit:)` on connect ## Source - Audit: `.planning/audit-2026-05-12/bus-hud-audit.md` (2026-05-12) — finding S2 ## Cross-references - Closed by: #11 (M-7 Turn surface)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/Jarvis#43