deepseek-harness/docs/rfc/implemented/simplification
Tianyi Cui 140f818a42 refactor(events): remove the turn boundary mirror events
Complete the boundary-mirror removal begun with the step mirrors: drop
`agent/turn-start` and `agent/turn-end` from the agent event taxonomy. Turn and
step boundaries are now read exclusively off the durable `session/event` feed
(`turn/start`/`turn/end`/`step/start`/`step/end`) — there is no `agent/*` mirror
for any boundary.

- loop.ts: delete both turn emits; `closeTurn` loses its `emit` parameter and
  its now-unreachable idempotency guard (it is called exactly once per turn, on
  mutually exclusive normal/catch paths); `failTurn` loses the dead post-close
  branch that only a throwing turn-end LISTENER could reach.
- ui-stdio: render turn boundaries from `session/event`, recovering the short
  agent label from an `agent/created`→id map (the `turn/start` event carries only
  the turn number, and the session id is not reliably the agent id). ui-stdio is
  a disposable test REPL, so this migration retires the sole justification the
  event-domain-semantics RFC gave for KEEPING the turn mirrors.
- Tests: reason/turn-number collectors and the boundary-ordering test now read
  `session/event`; the throwing-turn-boundary-LISTENER tests are deleted (that
  code path no longer exists). A new test covers the outer-catch disposed branch
  via a pre-step listener that disposes-then-throws (the surviving real path).
- Docs: promote the "remove agent boundary mirror events" RFC to implemented
  (amended/narrowed — `agent/steering` is RETAINED, not a boundary mirror);
  update the event-domain-semantics + turn-enclosure RFCs, architecture.md, the
  cookbook, the ACP/agent/ui-stdio prose, and regenerate the cordis catalog.

`agent/steering` and `agent/stream-chunk` are explicitly out of scope (not
durable-boundary mirrors). ACP is unaffected — it already settles from the log's
`turn/end` + `agent/status`; snapshot goldens are byte-unchanged.
2026-07-02 03:26:45 +08:00
..
2026-06-19-drop-mutable-session-summary.md docs(rfc): classify RFCs by kind via path-encoded subdirectories 2026-06-20 22:29:45 +08:00
2026-06-20-collapse-trace-only-session-events.md fix review findings: sync stale v1/removed-event doc references 2026-06-21 11:33:41 +08:00
2026-06-20-drop-unconsumed-llm-adapter-change-event.md fix review findings: stale service prose + catalog cleanup 2026-06-21 01:41:02 +08:00
2026-06-20-drop-unconsumed-llm-assembled-surfaces.md simplify(llm): drop unconsumed adapter-change event and assembled call surfaces 2026-06-21 01:27:41 +08:00
2026-06-20-prune-dead-seam-methods.md Merge remote-tracking branch 'origin/worktree-simplify-prune-seam' into worktree-simplify-branded-ids 2026-06-21 20:15:21 +08:00
2026-06-20-public-agent-stop-surface.md fix review findings: correct whenIdle live-consumer claim in the stop-surface RFC 2026-06-21 18:36:04 +08:00
2026-06-20-remove-agent-boundary-mirror-events.md refactor(events): remove the turn boundary mirror events 2026-07-02 03:26:45 +08:00