Adds the first cut of snapshot scenarios, each asserting a normalized stdout
transcript golden and (for model turns) a re-persisted session-log golden:
- text-turn, tool-call-turn, multi-turn: RECORDED against the real API — the
committed session.jsonl is a genuine harvested log; replay derives the model
script from it and reproduces deterministically with no key. tool-call-turn
exercises the real bash executor (echo SNAPSHOT_OK → tool/call + tool/result
+ a post-tool answer step).
- error-finish, cancel: AUTHORED via a replay.override.json sidecar (the live
API can't be coaxed into a deterministic 401 or mid-stream cancel). error-
finish replays a {kind:throw} 401 → the bridge answers the prompt with a
JSON-RPC error and the log records turn/end{kind:error}; cancel replays a
{kind:hang} → stopReason:cancelled.
Two input-DSL ops support these: promptExpectError (awaits the prompt, asserts
it rejects — the editor's view of a failed turn — and swallows it) and
promptAndCancel (dispatches the prompt unawaited, waits until the client
OBSERVES the streamed agent_message_chunk, then cancels — pinning frame order
so the cancel transcript is deterministic; fixes a flake Codex caught where the
late chunk and the cancelled response could interleave either way).
Scenarios carry a `recorded` flag so test:snapshot:record only re-runs the
live-API ones. reasoning/max-tokens scenarios are deferred (hard to force
deterministically from the live model). Per docs/rfc/implemented/2026-06-19.
67 lines
9.4 KiB
JSON
67 lines
9.4 KiB
JSON
{"type":"session","version":1,"id":"c4893a53-19cb-4c09-81d2-e702a13c5123","createdAt":1781811971684,"cwd":"/tmp/acp-snap-cwd-zBZiqs"}
|
|
{"type":"turn/start","seq":0,"time":1781811971687,"data":{"turn":1,"trigger":{"kind":"message","source":{"kind":"user"}}}}
|
|
{"type":"user/message","seq":1,"time":1781811971688,"data":{"content":[{"type":"text","text":"Reply with exactly the word: ONE. No tools."}],"source":{"kind":"user"}}}
|
|
{"type":"step/start","seq":2,"time":1781811971688,"data":{"turn":1,"step":1}}
|
|
{"type":"assistant/chunk","seq":3,"time":1781811972281,"data":{"turn":1,"step":1,"chunk":{"type":"block-start","index":0,"blockType":"reasoning"}}}
|
|
{"type":"assistant/chunk","seq":4,"time":1781811972281,"data":{"turn":1,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":"The"}}}
|
|
{"type":"assistant/chunk","seq":5,"time":1781811972455,"data":{"turn":1,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":" user"}}}
|
|
{"type":"assistant/chunk","seq":6,"time":1781811972501,"data":{"turn":1,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":" wants"}}}
|
|
{"type":"assistant/chunk","seq":7,"time":1781811972502,"data":{"turn":1,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":" me"}}}
|
|
{"type":"assistant/chunk","seq":8,"time":1781811972502,"data":{"turn":1,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":" to"}}}
|
|
{"type":"assistant/chunk","seq":9,"time":1781811972503,"data":{"turn":1,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":" reply"}}}
|
|
{"type":"assistant/chunk","seq":10,"time":1781811972503,"data":{"turn":1,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":" with"}}}
|
|
{"type":"assistant/chunk","seq":11,"time":1781811972523,"data":{"turn":1,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":" exactly"}}}
|
|
{"type":"assistant/chunk","seq":12,"time":1781811972523,"data":{"turn":1,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":" the"}}}
|
|
{"type":"assistant/chunk","seq":13,"time":1781811972523,"data":{"turn":1,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":" word"}}}
|
|
{"type":"assistant/chunk","seq":14,"time":1781811972523,"data":{"turn":1,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":" \""}}}
|
|
{"type":"assistant/chunk","seq":15,"time":1781811972524,"data":{"turn":1,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":"ONE"}}}
|
|
{"type":"assistant/chunk","seq":16,"time":1781811972524,"data":{"turn":1,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":"\""}}}
|
|
{"type":"assistant/chunk","seq":17,"time":1781811972557,"data":{"turn":1,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":" and"}}}
|
|
{"type":"assistant/chunk","seq":18,"time":1781811972558,"data":{"turn":1,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":" no"}}}
|
|
{"type":"assistant/chunk","seq":19,"time":1781811972558,"data":{"turn":1,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":" tools"}}}
|
|
{"type":"assistant/chunk","seq":20,"time":1781811972558,"data":{"turn":1,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":"."}}}
|
|
{"type":"assistant/chunk","seq":21,"time":1781811972594,"data":{"turn":1,"step":1,"chunk":{"type":"block-start","index":1,"blockType":"text"}}}
|
|
{"type":"assistant/chunk","seq":22,"time":1781811972595,"data":{"turn":1,"step":1,"chunk":{"type":"text-delta","index":1,"text":"ONE"}}}
|
|
{"type":"assistant/chunk","seq":23,"time":1781811972595,"data":{"turn":1,"step":1,"chunk":{"type":"block-end","index":0,"block":{"type":"reasoning","text":"The user wants me to reply with exactly the word \"ONE\" and no tools."}}}}
|
|
{"type":"assistant/chunk","seq":24,"time":1781811972595,"data":{"turn":1,"step":1,"chunk":{"type":"block-end","index":1,"block":{"type":"text","text":"ONE"}}}}
|
|
{"type":"assistant/chunk","seq":25,"time":1781811972595,"data":{"turn":1,"step":1,"chunk":{"type":"usage","usage":{"inputTokens":113,"outputTokens":19,"cacheReadTokens":768,"reasoningTokens":17}}}}
|
|
{"type":"assistant/chunk","seq":26,"time":1781811972595,"data":{"turn":1,"step":1,"chunk":{"type":"finish","reason":{"kind":"stop"}}}}
|
|
{"type":"assistant/message","seq":27,"time":1781811972597,"data":{"turn":1,"step":1,"content":[{"type":"reasoning","text":"The user wants me to reply with exactly the word \"ONE\" and no tools."},{"type":"text","text":"ONE"}]}}
|
|
{"type":"usage","seq":28,"time":1781811972597,"data":{"turn":1,"step":1,"usage":{"inputTokens":113,"outputTokens":19,"cacheReadTokens":768,"reasoningTokens":17}}}
|
|
{"type":"step/end","seq":29,"time":1781811972597,"data":{"turn":1,"step":1}}
|
|
{"type":"turn/end","seq":30,"time":1781811972597,"data":{"turn":1,"reason":{"kind":"completed"}}}
|
|
{"type":"turn/start","seq":31,"time":1781811972603,"data":{"turn":2,"trigger":{"kind":"message","source":{"kind":"user"}}}}
|
|
{"type":"user/message","seq":32,"time":1781811972604,"data":{"content":[{"type":"text","text":"Reply with exactly the word: TWO. No tools."}],"source":{"kind":"user"}}}
|
|
{"type":"step/start","seq":33,"time":1781811972604,"data":{"turn":2,"step":1}}
|
|
{"type":"assistant/chunk","seq":34,"time":1781811973140,"data":{"turn":2,"step":1,"chunk":{"type":"block-start","index":0,"blockType":"reasoning"}}}
|
|
{"type":"assistant/chunk","seq":35,"time":1781811973140,"data":{"turn":2,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":"The"}}}
|
|
{"type":"assistant/chunk","seq":36,"time":1781811973337,"data":{"turn":2,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":" user"}}}
|
|
{"type":"assistant/chunk","seq":37,"time":1781811973371,"data":{"turn":2,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":" wants"}}}
|
|
{"type":"assistant/chunk","seq":38,"time":1781811973371,"data":{"turn":2,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":" me"}}}
|
|
{"type":"assistant/chunk","seq":39,"time":1781811973371,"data":{"turn":2,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":" to"}}}
|
|
{"type":"assistant/chunk","seq":40,"time":1781811973372,"data":{"turn":2,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":" reply"}}}
|
|
{"type":"assistant/chunk","seq":41,"time":1781811973405,"data":{"turn":2,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":" with"}}}
|
|
{"type":"assistant/chunk","seq":42,"time":1781811973406,"data":{"turn":2,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":" exactly"}}}
|
|
{"type":"assistant/chunk","seq":43,"time":1781811973406,"data":{"turn":2,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":" the"}}}
|
|
{"type":"assistant/chunk","seq":44,"time":1781811973406,"data":{"turn":2,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":" word"}}}
|
|
{"type":"assistant/chunk","seq":45,"time":1781811973406,"data":{"turn":2,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":" \""}}}
|
|
{"type":"assistant/chunk","seq":46,"time":1781811973406,"data":{"turn":2,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":"T"}}}
|
|
{"type":"assistant/chunk","seq":47,"time":1781811973439,"data":{"turn":2,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":"WO"}}}
|
|
{"type":"assistant/chunk","seq":48,"time":1781811973439,"data":{"turn":2,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":"\""}}}
|
|
{"type":"assistant/chunk","seq":49,"time":1781811973473,"data":{"turn":2,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":" and"}}}
|
|
{"type":"assistant/chunk","seq":50,"time":1781811973473,"data":{"turn":2,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":" use"}}}
|
|
{"type":"assistant/chunk","seq":51,"time":1781811973507,"data":{"turn":2,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":" no"}}}
|
|
{"type":"assistant/chunk","seq":52,"time":1781811973507,"data":{"turn":2,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":" tools"}}}
|
|
{"type":"assistant/chunk","seq":53,"time":1781811973507,"data":{"turn":2,"step":1,"chunk":{"type":"reasoning-delta","index":0,"text":"."}}}
|
|
{"type":"assistant/chunk","seq":54,"time":1781811973507,"data":{"turn":2,"step":1,"chunk":{"type":"block-start","index":1,"blockType":"text"}}}
|
|
{"type":"assistant/chunk","seq":55,"time":1781811973508,"data":{"turn":2,"step":1,"chunk":{"type":"text-delta","index":1,"text":"T"}}}
|
|
{"type":"assistant/chunk","seq":56,"time":1781811973542,"data":{"turn":2,"step":1,"chunk":{"type":"text-delta","index":1,"text":"WO"}}}
|
|
{"type":"assistant/chunk","seq":57,"time":1781811973543,"data":{"turn":2,"step":1,"chunk":{"type":"block-end","index":0,"block":{"type":"reasoning","text":"The user wants me to reply with exactly the word \"TWO\" and use no tools."}}}}
|
|
{"type":"assistant/chunk","seq":58,"time":1781811973543,"data":{"turn":2,"step":1,"chunk":{"type":"block-end","index":1,"block":{"type":"text","text":"TWO"}}}}
|
|
{"type":"assistant/chunk","seq":59,"time":1781811973543,"data":{"turn":2,"step":1,"chunk":{"type":"usage","usage":{"inputTokens":129,"outputTokens":22,"cacheReadTokens":768,"reasoningTokens":19}}}}
|
|
{"type":"assistant/chunk","seq":60,"time":1781811973543,"data":{"turn":2,"step":1,"chunk":{"type":"finish","reason":{"kind":"stop"}}}}
|
|
{"type":"assistant/message","seq":61,"time":1781811973543,"data":{"turn":2,"step":1,"content":[{"type":"reasoning","text":"The user wants me to reply with exactly the word \"TWO\" and use no tools."},{"type":"text","text":"TWO"}]}}
|
|
{"type":"usage","seq":62,"time":1781811973543,"data":{"turn":2,"step":1,"usage":{"inputTokens":129,"outputTokens":22,"cacheReadTokens":768,"reasoningTokens":19}}}
|
|
{"type":"step/end","seq":63,"time":1781811973543,"data":{"turn":2,"step":1}}
|
|
{"type":"turn/end","seq":64,"time":1781811973543,"data":{"turn":2,"reason":{"kind":"completed"}}}
|