You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[lifecycle-RSK] RSK-09: Add the turn sub-machine #1800
Design doc: docs/architecture/task-lifecycle-target-architecture.md (not yet on main)
Ticket plan: docs/architecture/task-lifecycle-run-state-kernel-tickets.md (not yet on main)
Context
Five fields are within-turn bookkeeping: isWaitingForFirstChunk, didRejectTool, didAlreadyUseTool, didToolFailInCurrentTurn, didCompleteReadingStream. A turn is one request iteration of the loop. The code writes these fields before the stream starts and after it ends (Task.ts:3228-3245, 3768, 3810, 3830, 4029). So the turn sub-machine is independent of the stream region.
Developer Notes
Add a turn state with a turnStarted event. The event maps to the per-request reset block (Task.ts:3228-3245).
Model the five fields as the turn state. Do not tie the turn state to stream.tag.
Add unit tests for the turn transitions, including tool writes after the stream ends and an abort before the first chunk.
Activity
feat(run-state): add the turn sub-machine (Zoo-Code-Org#1800) (Zoo-Co…