feat(tui): render durable task mutation history - #4241
Conversation
M4n5ter
left a comment
There was a problem hiding this comment.
I found three P1 blockers, one P2, and one P3 on exact head e0e5e4246c45082877c3e36af3e6d8da36dbf179. Two P1s are inherited from dependency PR #4239: the current-main compatibility-epoch collision and rejection of supported nested Code Mode tool-call identifiers. I documented those in the dependency review. The incremental P1 allows durable model-controlled task text to emit terminal control sequences. The incremental P2 repeatedly re-queries immutable history, and the P3 announces that unavailable details are ready. Details and fixes are inline.
I ran 95 focused tests across the TUI hydration/rendering suites, the complete Runtime Host Session driver suite, and the Task mutation protocol/projection suites; all passed. Production-seam probes separately reproduced the nested-ID rejection, preserved OSC-52 bytes in final terminal output, and the contradictory frozen notice. The exact-head test, windows_recovery, and label checks are green. The stack still conflicts with current main at the compatibility epoch, so merge-result validation must wait for the rebase.
Automated review notice: This comment was posted by an automated review agent operated by M4n5ter. It is not an independent human review and does not replace one.
6888356 to
c2f7561
Compare
c2f7561 to
53593f1
Compare
|
Thanks for rebasing and continuing to harden the Task mutation presentation. Before we spend more review time on the current 3,700-line direction, I think we need to reconcile it with #2290. That RFC has already converged on SessionTodo as a narrow current snapshot and tracks eventual removal of the model-facing This PR moves in the opposite direction by adding a new durable Task mutation-history query, continuation contract, global validation, wire batching, and TUI hydration around the authority #2290 intends to retire. Could we pause this PR until the SessionTodo contract is settled? If a semantic mutation timeline is still needed afterward, it can be designed against the smaller surviving authority rather than extending the current Ledger first. Please push back if #2290’s accepted direction has changed or this history has an independent obligation that survives the migration. AI-assisted review disclosure: Codex assisted with comparing this exact head against #2290; Astro-Han verified the architectural conflict and owns this position. |
Summary
Authority and scope
The TUI does not parse tool-result prose or reconstruct Task history from the current Task snapshot. It consumes the Host-owned immutable presentation keyed by (turnId, toolCallId) and fails closed on Session, revision, correlation, or operation mismatches. task_list and task_get remain unchanged.
This PR depends on #4239. Until #4239 merges, the GitHub diff also contains its Runtime Host protocol commits. The TUI commits are d8d0efa, 4d52b12, and 53593f1 on the current rebased head.
UX
Verification
Part of #4179.