# Test 230 — OpenCode TUI sender-visible notification

date: 2026-08-02T14:00:53+00:00
bun: 1.3.1

## Layer 0 — production bundle compiles
Bundled 237 modules in 79ms

  cli.js  0.95 MB  (entry point)


## Layer 1 — native runtime notification payload
bun test v1.3.1 (89fa0f34)

src/runtime/opencode-copresence/runtime.test.ts:
(pass) OpenCode native serve+attach copresence > requires an explicit provider/model for production copresence [2.00ms]
(pass) OpenCode native serve+attach copresence > wires one token-bound CommHub MCP without reopening local tools [2.00ms]
(pass) OpenCode native serve+attach copresence > uses one authenticated loopback session for FIFO network turns and emits an owner-only attach launcher [301.01ms]
(pass) OpenCode native serve+attach copresence > shows the network sender in both the toast title and message body [189.01ms]
(pass) OpenCode native serve+attach copresence > waits for an already-busy human session before injecting a network turn [622.03ms]
(pass) OpenCode native serve+attach copresence > does not treat a missing session status and missing session record as idle [484.02ms]
(pass) OpenCode native serve+attach copresence > binds teardown authority to a detached pid, pgrp, and process start ticks [3.00ms]

 7 pass
 0 fail
 42 expect() calls
Ran 7 tests across 1 file. [1.67s]

## Layer 2 — production inbox-to-notification wiring
bun test v1.3.1 (89fa0f34)

src/runtime/opencode-copresence/inbox-wiring.test.ts:
(pass) OpenCode copresence CommHub message wiring > work and informational drains are independent lanes [6.00ms]
(pass) OpenCode copresence CommHub message wiring > new_message SSE uses a non-blocking informational lane [1.00ms]
(pass) OpenCode copresence CommHub message wiring > message is displayed as a non-replying TUI notification in the fast drain
(pass) OpenCode copresence CommHub message wiring > the task drain does not claim OpenCode copresence messages
(pass) OpenCode copresence CommHub message wiring > startup and SSE reconnect both recover pending informational messages
(pass) OpenCode copresence CommHub message wiring > runtime startup is single-flight and shutdown waits for an in-flight open
(pass) OpenCode copresence CommHub message wiring > tmux SIGHUP enters the same cleanup path as SIGTERM [1.00ms]

 7 pass
 0 fail
 27 expect() calls
Ran 7 tests across 1 file. [47.00ms]

OVERALL: PASS
