deepseek-harness/docs
Tianyi Cui c182543dd5 refactor(acp-example): derive llm-replay script from the session JSONL
Per a design revision, the per-scenario snapshot fixture becomes EXACTLY the
persisted session JSONL (<scenario>/session.jsonl) rather than a hand-authored
llm.json. The log already holds all LLM behavior (assistant/chunk carries every
StreamChunk) AND all harness behavior (tool/call, tool/result, turn/*, usage),
so one artifact drives replay and doubles as a behavioral golden.

llm-replay becomes replay-only (the record-tee is removed; recording is now
"run the real agent once and harvest the .jsonl", done by the harness in a
later commit). deriveReplayScript(events) groups assistant/chunk by (turn,step)
in log order — exact because the loop makes one ctx.llm.stream() call per step
and tags each chunk with the current (turn,step). The two failure modes the log
can't express (a thrown stream — no terminal finish; cancel/hang — timing) use
an optional replay.override.json sidecar.

Hardens against a Codex review finding: a derived group is only valid if it
ends in a `finish` chunk. A group without one is the fingerprint of a thrown
stream() and is NOT silently replayed as a clean stop — deriveReplayScript
throws, naming the (turn,step), so a missing sidecar override fails loud.

Updates the unit tests (parse/derive/load helpers, sidecar override, finish-
terminated grouping, HMR), the example README, and the RFC prose to the JSONL
format. Two goldens (stdout transcript + re-persisted JSONL) and the harness
wiring land in the next commit.
2026-06-19 02:44:33 +08:00
..
cookbook Merge remote-tracking branch 'origin/master' into feat/acp-2-bridge 2026-06-18 03:31:04 +08:00
postmortem fix(acp): address Codex review — strict ctx.get, correct fiber-ownership doc + test 2026-06-18 03:48:33 +08:00
rfc refactor(acp-example): derive llm-replay script from the session JSONL 2026-06-19 02:44:33 +08:00
AGENTS.md docs: unify ADR/RFC trees into one lifecycle-organized RFC tree 2026-06-18 02:18:24 +08:00
architecture.md Merge remote-tracking branch 'origin/master' into feat/acp-2-bridge 2026-06-18 03:31:04 +08:00
development.md Merge remote-tracking branch 'origin/master' into worktree-md-wrap-guard 2026-06-16 23:38:58 +08:00
module-graph.md feat(acp): tool-owned tool-call UI presentation (title/command/output) 2026-06-18 09:01:36 +08:00