Skip to content

Ticket #74 verification — streaming ghost settlement, honest activity verbs — 2026-11-03 ​

Parent spec #66 (conversation surfaces and approval trust), child ticket #74 (fix the remaining $Name · checking the details… ghost after both turns finished/handed off). Worktree: /tmp/opencode/ensemble-worktrees/55-74-activity, branch feat/v55-74, base a15ff07 (= integration/ensemble-v5.5 tip; merged tip before reporting).

Environment ​

sh
export PATH=$HOME/.nvm/versions/node/v26.12.1/bin:$HOME/.local/bin:$PATH

($HOME is /home/tristan; the brief's literal /home/tristan/.nvm/versions/node/v26.12.1/bin does not exist — the real node lives under $HOME/.nvm/versions/node/v26.12.1/bin, v26.12.1. The worktree had no node_modules, so it symlinks the parent repo's node_modules for tsc; no repo files were touched by this.) node --version: v26.12.1. Observed host opencode --version: 2.2.5.

Command results ​

Exact commandResult
npm run checkExit 0; strict no-emit TypeScript check.
npm testExit 0; 365 passed, 0 failed, 0 skipped (9 new src/v2/tui/ticket-74.test.ts; +2 from the merged #72 bubble tests).
npm run test:live:fakeExit 0; fake live-check passed; ticket #74 pins green (live verb reads working…, no ghost checking line after completions).
npm run test:live:fake:emptyExit 0; fake empty-catalog live-check passed; no skips.
npm run test:liveExit 0; live-check passed; no skips.

Unit and live checks ran separately (unit first, then live); live results reported here, not folded into the unit count.

Reproduction evidence (red → green) ​

src/v2/tui/ticket-74.test.ts was written first against the old code and failed as required (no settleStreamMessage / mergeStreamingActivity exports; stale-clock and verb assertions against the old behavior). After the fix it passes 9/9:

  • Settling a stream always clears streaming and records the final text, even on epoch mismatch (the ghost shape: streaming: true persisted past finalize).
  • Settled streams carry a last-delta heartbeat (updatedAt).
  • Fresh task-less streams merge as honest working…, never the generic checking the details….
  • Stale orphaned streams merge to nothing (hidden, never wedged).
  • Task-backed agents never gain a duplicate streaming line.
  • Staleness follows the last delta (updatedAt), not creation: an old row with a fresh heartbeat is live; a young row with no heartbeat for the full window is an orphan.
  • A live batch review reads as reviewing, never self-Waiting for $Leader….
  • Pending completion hops attribute to the leader (queued under the leader's key, nothing live for the finisher).
  • Finisher absence: two replied turns plus two pending completion hops yield zero live lines for either finisher and zero checking verbs.

Behavior notes ​

  • finalizeStream (src/v2/service.ts) now settles through the exported pure settleStreamMessage on both epoch paths: stale content is still rejected (returns undefined), but the row is cleared (streaming: false), text-stamped, heartbeat-stamped, and persisted — no more orphaned live rows aging out over 120 s.
  • Message gains optional updatedAt (last delta/finalize write), stamped on streaming-row creation, on every delta heartbeat save, and on settle. isActivityStale runs on updatedAt ?? createdAt, so long live streams stay visible while fresh and orphaned rows expire promptly.
  • The TUI merge (src/v2/tui/app.tsx) delegates to the exported pure mergeStreamingActivity (src/v2/tui/workrows.ts): task-less streaming rows show honest working… (kind working) only while fresh, otherwise hidden; task-backed agents are never duplicated.
  • activityStateForTask: handoff.batch tasks read reviewing completions…, handoff.completion tasks read reviewing… (pending hops stay queued under the leader's key, so these verbs only display while live); the awaiting-children branch names only a different assignee and otherwise reads honest working… — self-Waiting for $Leader… is gone.
  • Untouched: #70 truthful states (approval/native waits, retrying, Asking), #71 handoff/batch/loop-guard semantics and copy, bubbles, completions, approvals, $Name/@ rules. Two live-script anchors updated to the new honest verb (· working… while live in group and DM flows); all checking absence assertions kept and extended with the post-batch finisher-absence pin.

Uncertainty ​

  • No live macOS run; live runs recorded against host 2.2.5 while typechecking pinned types 2.2.1 — no new host APIs used (text anchors only), but declaration parity is not runtime proof.
  • /tmp/opencode/v55-transcript-notes.md (named in the brief) does not exist in this environment; diagnosis used /tmp/opencode/v56-activity-hang-notes.md plus the merged code.
  • The epoch-mismatch settle path is unit-pinned through the exported settleStreamMessage helper plus the always-settle finalizeStream structure; no deterministic service-level race test exists (epoch bumps only via reset/workspace lifecycle), with the live finisher-absence pin as end-to-end cover.

Merged-tip fix-ups (integration tip arrived red) ​

Merging integration/ensemble-v5.5 (ticket #72) broke test:live:fake in two places, both reproduced on the pristine tip in a control worktree (git worktree add /tmp/opencode/control-72 640dc7e, since removed) — pre-existing, not caused by this ticket:

  • Bubble border assertion. #72 gave user bubbles a visible rounded border edge; the older text-capture assertion still assumed a borderless bubble ( {15,}fake-queue-alpha), failing deterministically. Updated to {15,}│ fake-queue-alpha, matching #72's stated design (right-aligned with a quiet but visible edge).
  • Provider fixture precedence. scripts/fake-provider.mjs served RICH_MARKDOWN whenever the prompt contained the rich trigger, but the DM session history always contains it by the time the #72 bubble block runs — so the bubble markers could never render (deterministic 20 s timeout). Precedence is now latest-trigger-wins (bubbleAt > richAt ? BUBBLE : …), which changes behavior only when the bubble trigger is present and latest.
  • Input-delivery flake + composer-reset hazard. After a heavy reply mounts, follow-up i/type bursts are silently dropped most runs (control tip included; tmux primitives verified healthy against cat, so the drop is inside the TUI/host input path). Hardened the two DM sends after heavy renders with: an empty-composer gate (Message… placeholder proves the previous send cleared — the streaming-line absence alone does not cover invoke → clearComposer), focus gated on COMPOSER, send gated on the composer echo, and bounded retries. Sharp edge discovered the hard way: a bare Escape on a closed composer falls through to opencode and navigates away from Ensemble (killing the session into the launcher) — resets are therefore applied only while COMPOSER is visible. A bare i on an open composer types a literal i; the echo gate catches that too.

Released under the MIT License.