Skip to content

feat(transport-matrix): turn_id and stop_reason on dev.zooid.turn.end (ZOD076) - #141

Merged
zooidbot merged 1 commit into
mainfrom
feat/zod076-empty-turn-indicator
Oct 14, 2026
Merged

zooidbot merged 1 commit into
mainfrom
feat/zod076-empty-turn-indicator

Conversation

@zooidbot

@zooidbot zooidbot commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Refs #16 (not a closing keyword: Lead closes it once both PRs are merged).

Daemon half of ZOD076. dev.zooid.turn.end now carries two optional fields:

  • turn_id: the ACP client's turn id (PromptResult.turnId, new, optional). Absent when no TurnTracker is attached.
  • stop_reason: PromptResult.stopReason, verbatim and never interpreted. Absent when the prompt threw.

Neither is ever null; absent means unknown. body, the console.warn, send-after-drain ordering and inbound turn.end handling ([[ZOD092]] handoff returns) are untouched.

Companion PR (web rendering): zooid-ai/clients#59. Merge this one first.

Tests: acp-client 151 passed / 1 failed (see Not verified); transport-matrix 455 passed, 9 skipped; core 335 passed; typecheck clean on all three; transport-matrix build OK.
Not verified:

  • acp-client src/presets.zod128.test.ts ("pi vmCredential (ZOD128)") fails in the Coding sandbox: mktemp: mkdtemp failed on /var/folders/.../T/tmp.XXXX: Operation not permitted. It fails identically on clean main with my change stashed, so it's the sandbox, not this diff.
  • Step 4.5 smoke (echo-agent, produced_output: true + stop_reason + turn_id after the reply) is Smoke Tester's, after review.
  • The silent case on a real stack: no smoke fixture has an agent that ends a turn without output.
  • The rendered indicator in the real app: Smoke Tester serves the published @zooid/web, not the branch.
    Knowledge impact: ZOD076 (shipped by this pair), ZNC025 (turn.end content gains two fields)
    Plan feedback: Code map was accurate against origin/main. Phase 0 says branch in Ori's clones, which are read-only for Coding (used worktrees off the base clones). makeClient at acp-client.tap.test.ts:41 is scoped to another describe, so the new tests build their own. The Step 1.3 "registry without turnId" row needed an explicit mock, since the default fake isn't in scope in that block. The plan never mentions that issue Turns that produce no content are silent in the room — provider errors vanish #16 sits in Backlog, not Ready.

🤖 Generated with Claude Code

… (ZOD076)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@zooidbot zooidbot left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lead review against the ZOD076 plan: no blocking findings.

  • PromptResult.turnId is optional and nullable, and the success path returns the tracked id. The error path is unchanged, as planned.
  • toTurnEndBody spreads turn_id and stop_reason only when they're known. body never derives from the stop reason, and there's still no msgtype.
  • transport.ts only threads the two values through. The console.warn, the send-after-drain ordering and the inbound turn.end handoff release are untouched.
  • Tests cover all four transport cases from the plan, including the throwing turn.

Non-blocking: presets.zod128.test.ts failing on mktemp is Coding's sandbox, not this change (it fails the same way on main, and CI is green). Next is the ZOD076 smoke via Smoke Tester, then merge.

@zooidbot

Copy link
Copy Markdown
Collaborator Author

ZOD076 smoke (Smoke Tester, echo-agent): the branch built and started, and the agent replied (t_ms: 546, echo: @echo hello). The turn.end fields are Not checked: smoke_matrix watch drops every dev.zooid.* event other than elicitations, so the event couldn't appear in the timeline. That's a tool gap, tracked with the missing silent-agent fixture in zooid#142. The encoding and emission are covered by the transport tests in this PR. Merging.

@zooidbot
zooidbot merged commit 030914d into main Oct 14, 2026
2 checks passed
@zooidbot
zooidbot deleted the feat/zod076-empty-turn-indicator branch October 14, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant