From 3ed9fe36aebb6ea0e3a460bba53bda3f53b2cf64 Mon Sep 17 00:00:00 2001 From: turtle1999 Date: Mon, 21 Sep 2026 17:04:05 +0800 Subject: [PATCH] test(snapshot): cover same-mode blank reasons in a dedicated scenario --- apps/web/tests/diff-context.e2e.ts | 2 +- snapshots/session/fs-edit/snapshot.yml | 2 +- .../session.v4.jsonl | 25 +++++++++++-------- .../snapshot.yml | 9 +++++++ .../workspace.expected/config.txt | 2 ++ .../workspace.expected/notes.txt | 1 + .../workspace/config.txt | 2 ++ snapshots/session/fs-write/session.v4.jsonl | 22 ---------------- snapshots/session/fs-write/snapshot.yml | 2 +- snapshots/web/diff-context/snapshot.yml | 2 +- 10 files changed, 33 insertions(+), 36 deletions(-) rename snapshots/session/{fs-edit => fs-same-mode-empty-justification}/session.v4.jsonl (54%) create mode 100644 snapshots/session/fs-same-mode-empty-justification/snapshot.yml create mode 100644 snapshots/session/fs-same-mode-empty-justification/workspace.expected/config.txt create mode 100644 snapshots/session/fs-same-mode-empty-justification/workspace.expected/notes.txt create mode 100644 snapshots/session/fs-same-mode-empty-justification/workspace/config.txt delete mode 100644 snapshots/session/fs-write/session.v4.jsonl diff --git a/apps/web/tests/diff-context.e2e.ts b/apps/web/tests/diff-context.e2e.ts index ba1f4feefa..cf893ac7ec 100644 --- a/apps/web/tests/diff-context.e2e.ts +++ b/apps/web/tests/diff-context.e2e.ts @@ -13,7 +13,7 @@ const ROOT = fileURLToPath(new URL('../../../snapshots', import.meta.url)) const MODE = webSnapshotMode() const CASES = [ - { name: 'diff-context', source: 'session/fs-edit/session.v4.jsonl', totals: '+1 -1', shared: 'level=info', inventory: ['ui.expected.md'] }, + { name: 'diff-context', source: 'session/fs-edit/session.v3.jsonl', totals: '+1 -1', shared: 'level=info', inventory: ['ui.expected.md'] }, { name: 'diff-bounded', source: 'web/diff-bounded/session.v3.jsonl', totals: '+130 -130', shared: 'shared heading', inventory: ['session.v3.jsonl', 'ui.expected.md'] }, ] diff --git a/snapshots/session/fs-edit/snapshot.yml b/snapshots/session/fs-edit/snapshot.yml index d5bab42de5..68d72c3cb7 100644 --- a/snapshots/session/fs-edit/snapshot.yml +++ b/snapshots/session/fs-edit/snapshot.yml @@ -2,7 +2,7 @@ version: 1 scenario: fs-edit profile: headless composition: default -recording: authored +recording: live header: class: default workspace: diff --git a/snapshots/session/fs-edit/session.v4.jsonl b/snapshots/session/fs-same-mode-empty-justification/session.v4.jsonl similarity index 54% rename from snapshots/session/fs-edit/session.v4.jsonl rename to snapshots/session/fs-same-mode-empty-justification/session.v4.jsonl index ce07ba2f74..08d19c5240 100644 --- a/snapshots/session/fs-edit/session.v4.jsonl +++ b/snapshots/session/fs-same-mode-empty-justification/session.v4.jsonl @@ -2,26 +2,31 @@ {"type":"permission/preset","data":{"preset":"danger-full-access"}} {"type":"sandbox/mode","data":{"mode":"danger-full-access"}} {"type":"approval/policy","data":{"policy":"never"}} -{"type":"agent/inbox/spliced","data":{"target":"next-turn","start":0,"inserted":[{"content":[{"type":"text","text":"First use the read tool to read config.txt in the current directory. Then use the edit tool (NOT bash) to replace the literal text DEBUG with RELEASE in that file. Then reply with exactly the single word DONE."}],"source":{"kind":"user"},"role":"user","id":"{{message:1}}"}]}} +{"type":"agent/inbox/spliced","data":{"target":"next-turn","start":0,"inserted":[{"content":[{"type":"text","text":"First use the write tool (NOT bash) to create a file named notes.txt in the current directory containing exactly the single line: hello world. Then use the read tool to read config.txt in the current directory. Then use the edit tool (NOT bash) to replace the literal text DEBUG with RELEASE in that file. Then reply with exactly the single word DONE."}],"source":{"kind":"user"},"role":"user","id":"{{message:1}}"}]}} {"type":"turn/start","data":{"turn":1}} {"type":"agent/inbox/spliced","data":{"target":"next-turn","start":0,"removedCount":1,"inserted":[]}} {"type":"step/start","data":{"turn":1,"step":1}} {"type":"system/message","data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{message:2}}"}},"surfaceOp":"append"} -{"type":"user/message","data":{"content":[{"type":"text","text":"First use the read tool to read config.txt in the current directory. Then use the edit tool (NOT bash) to replace the literal text DEBUG with RELEASE in that file. Then reply with exactly the single word DONE."}],"source":{"kind":"user"},"role":"user","id":"{{message:1}}"},"surfaceOp":"append"} +{"type":"user/message","data":{"content":[{"type":"text","text":"First use the write tool (NOT bash) to create a file named notes.txt in the current directory containing exactly the single line: hello world. Then use the read tool to read config.txt in the current directory. Then use the edit tool (NOT bash) to replace the literal text DEBUG with RELEASE in that file. Then reply with exactly the single word DONE."}],"source":{"kind":"user"},"role":"user","id":"{{message:1}}"},"surfaceOp":"append"} {"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{message:3}}"},"surfaceOp":"append"} {"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":"{{tools}}"},"reason":"initial"}} {"type":"request/context","data":{"provider":"deepseek-official","model":"deepseek-v4-flash"}} -{"type":"session/title","data":{"title":"First use the read tool","messageSeqs":[8],"source":{"kind":"fallback"}}} -{"type":"assistant/message","data":{"turn":1,"step":1,"message":{"role":"assistant","content":[{"type":"tool-call","id":"fs-edit-read","name":"read","arguments":"{\"file_path\":\"config.txt\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:4}}"},"usage":{"inputTokens":10,"outputTokens":5},"stream":[{"type":"chunk","time":1788699361025,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":1788699361025,"index":0,"dt":[],"id":"fs-edit-read","name":"read","args":["{\"file_path\":\"config.txt\"}"]},{"type":"chunk","time":1788699361025,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"fs-edit-read","name":"read","arguments":"{\"file_path\":\"config.txt\"}"}}},{"type":"chunk","time":1788699361025,"chunk":{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}}},{"type":"chunk","time":1788699361025,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"} -{"type":"tool/call","data":{"turn":1,"step":1,"callId":"fs-edit-read","name":"read","arguments":"{\"file_path\":\"config.txt\"}"}} -{"type":"tool/result","data":{"turn":1,"step":1,"message":{"role":"tool","source":{"kind":"tool","callId":"fs-edit-read"},"toolCallId":"fs-edit-read","content":[{"type":"text","text":"{{cwd}}/config.txt\nfile\n\n1: mode=DEBUG\n2: level=info\n\n(End of file - total 2 lines)\n"}],"isError":false,"id":"{{message:5}}"},"meta":{"path":"{{cwd}}/config.txt","offset":1,"lines":[{"number":1,"text":"mode=DEBUG"},{"number":2,"text":"level=info"}],"totalLines":2}},"sourceEventSeqs":[14],"surfaceOp":"append"} +{"type":"session/title","data":{"title":"First use the write tool","messageSeqs":[8],"source":{"kind":"fallback"}}} +{"type":"assistant/message","data":{"turn":1,"step":1,"message":{"role":"assistant","content":[{"type":"reasoning","text":"The user wants me to create a file named notes.txt with the content \"hello world\" using the write tool, then reply with \"DONE\"."},{"type":"tool-call","id":"call_00_APMUCJJm9lrTSlVbg6dB0185","name":"write","arguments":"{\"file_path\": \"notes.txt\", \"content\": \"hello world\", \"sandbox_permissions\": \"danger-full-access\", \"justification\": \"\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:4}}"},"usage":{"inputTokens":2891,"outputTokens":92,"cacheReadTokens":0,"reasoningTokens":30},"stream":[{"type":"chunk","time":1788699367607,"chunk":{"type":"block-start","index":0,"blockType":"reasoning"}},{"type":"reasoning-chunks","time0":1788699367607,"index":0,"dt":[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"texts":["The"," user"," wants"," me"," to"," create"," a"," file"," named"," notes",".txt"," with"," the"," content"," \"","hello"," world","\""," using"," the"," write"," tool",","," then"," reply"," with"," \"","D","ONE","\"."]},{"type":"chunk","time":1788699367608,"chunk":{"type":"block-start","index":1,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":1788699367608,"index":1,"dt":[],"id":"call_00_APMUCJJm9lrTSlVbg6dB0185","name":"write","args":["{\"file_path\": \"notes.txt\", \"content\": \"hello world\", \"sandbox_permissions\": \"danger-full-access\", \"justification\": \"\"}"]},{"type":"chunk","time":1788699367608,"chunk":{"type":"block-end","index":0,"block":{"type":"reasoning","text":"The user wants me to create a file named notes.txt with the content \"hello world\" using the write tool, then reply with \"DONE\"."}}},{"type":"chunk","time":1788699367608,"chunk":{"type":"block-end","index":1,"block":{"type":"tool-call","id":"call_00_APMUCJJm9lrTSlVbg6dB0185","name":"write","arguments":"{\"file_path\": \"notes.txt\", \"content\": \"hello world\", \"sandbox_permissions\": \"danger-full-access\", \"justification\": \"\"}"}}},{"type":"chunk","time":1788699367608,"chunk":{"type":"usage","usage":{"inputTokens":2891,"outputTokens":92,"cacheReadTokens":0,"reasoningTokens":30}}},{"type":"chunk","time":1788699367608,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"} +{"type":"tool/call","data":{"turn":1,"step":1,"callId":"call_00_APMUCJJm9lrTSlVbg6dB0185","name":"write","arguments":"{\"file_path\": \"notes.txt\", \"content\": \"hello world\", \"sandbox_permissions\": \"danger-full-access\", \"justification\": \"\"}"}} +{"type":"tool/result","data":{"turn":1,"step":1,"message":{"role":"tool","source":{"kind":"tool","callId":"call_00_APMUCJJm9lrTSlVbg6dB0185"},"toolCallId":"call_00_APMUCJJm9lrTSlVbg6dB0185","content":[{"type":"text","text":"{{cwd}}/notes.txt\nfile\n\nCreated file\n"}],"isError":false,"id":"{{message:5}}"},"meta":{"operation":"create","diffs":[]}},"sourceEventSeqs":[14],"surfaceOp":"append"} {"type":"step/end","data":{"turn":1,"step":1}} {"type":"step/start","data":{"turn":1,"step":2}} -{"type":"assistant/message","data":{"turn":1,"step":2,"message":{"role":"assistant","content":[{"type":"tool-call","id":"fs-edit-replace","name":"edit","arguments":"{\"file_path\": \"config.txt\", \"old_string\": \"DEBUG\", \"new_string\": \"RELEASE\", \"sandbox_permissions\": \"danger-full-access\", \"justification\": \"\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:6}}"},"usage":{"inputTokens":10,"outputTokens":5},"stream":[{"type":"chunk","time":1788699361045,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":1788699361045,"index":0,"dt":[],"id":"fs-edit-replace","name":"edit","args":["{\"file_path\": \"config.txt\", \"old_string\": \"DEBUG\", \"new_string\": \"RELEASE\", \"sandbox_permissions\": \"danger-full-access\", \"justification\": \"\"}"]},{"type":"chunk","time":1788699361045,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"fs-edit-replace","name":"edit","arguments":"{\"file_path\": \"config.txt\", \"old_string\": \"DEBUG\", \"new_string\": \"RELEASE\", \"sandbox_permissions\": \"danger-full-access\", \"justification\": \"\"}"}}},{"type":"chunk","time":1788699361045,"chunk":{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}}},{"type":"chunk","time":1788699361045,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"} -{"type":"tool/call","data":{"turn":1,"step":2,"callId":"fs-edit-replace","name":"edit","arguments":"{\"file_path\": \"config.txt\", \"old_string\": \"DEBUG\", \"new_string\": \"RELEASE\", \"sandbox_permissions\": \"danger-full-access\", \"justification\": \"\"}"}} -{"type":"tool/result","data":{"turn":1,"step":2,"message":{"role":"tool","source":{"kind":"tool","callId":"fs-edit-replace"},"toolCallId":"fs-edit-replace","content":[{"type":"text","text":"The file {{cwd}}/config.txt has been updated successfully."}],"isError":false,"id":"{{message:7}}"},"meta":{"diffs":[{"path":"config.txt","oldText":"mode=DEBUG\nlevel=info","newText":"mode=RELEASE\nlevel=info"}]}},"sourceEventSeqs":[19],"surfaceOp":"append"} +{"type":"assistant/message","data":{"turn":1,"step":2,"message":{"role":"assistant","content":[{"type":"tool-call","id":"fs-edit-read","name":"read","arguments":"{\"file_path\":\"config.txt\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:6}}"},"usage":{"inputTokens":10,"outputTokens":5},"stream":[{"type":"chunk","time":1788699361025,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":1788699361025,"index":0,"dt":[],"id":"fs-edit-read","name":"read","args":["{\"file_path\":\"config.txt\"}"]},{"type":"chunk","time":1788699361025,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"fs-edit-read","name":"read","arguments":"{\"file_path\":\"config.txt\"}"}}},{"type":"chunk","time":1788699361025,"chunk":{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}}},{"type":"chunk","time":1788699361025,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"} +{"type":"tool/call","data":{"turn":1,"step":2,"callId":"fs-edit-read","name":"read","arguments":"{\"file_path\":\"config.txt\"}"}} +{"type":"tool/result","data":{"turn":1,"step":2,"message":{"role":"tool","source":{"kind":"tool","callId":"fs-edit-read"},"toolCallId":"fs-edit-read","content":[{"type":"text","text":"{{cwd}}/config.txt\nfile\n\n1: mode=DEBUG\n2: level=info\n\n(End of file - total 2 lines)\n"}],"isError":false,"id":"{{message:7}}"},"meta":{"path":"{{cwd}}/config.txt","offset":1,"lines":[{"number":1,"text":"mode=DEBUG"},{"number":2,"text":"level=info"}],"totalLines":2}},"sourceEventSeqs":[19],"surfaceOp":"append"} {"type":"step/end","data":{"turn":1,"step":2}} {"type":"step/start","data":{"turn":1,"step":3}} -{"type":"assistant/message","data":{"turn":1,"step":3,"message":{"role":"assistant","content":[{"type":"text","text":"DONE"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:8}}"},"usage":{"inputTokens":10,"outputTokens":2},"stream":[{"type":"chunk","time":1788699361070,"chunk":{"type":"block-start","index":0,"blockType":"text"}},{"type":"text-chunks","time0":1788699361070,"index":0,"dt":[],"texts":["DONE"]},{"type":"chunk","time":1788699361070,"chunk":{"type":"block-end","index":0,"block":{"type":"text","text":"DONE"}}},{"type":"chunk","time":1788699361070,"chunk":{"type":"usage","usage":{"inputTokens":10,"outputTokens":2}}},{"type":"chunk","time":1788699361070,"chunk":{"type":"finish","reason":{"kind":"stop"}}}]},"surfaceOp":"append"} +{"type":"assistant/message","data":{"turn":1,"step":3,"message":{"role":"assistant","content":[{"type":"tool-call","id":"fs-edit-replace","name":"edit","arguments":"{\"file_path\": \"config.txt\", \"old_string\": \"DEBUG\", \"new_string\": \"RELEASE\", \"sandbox_permissions\": \"danger-full-access\", \"justification\": \"\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:8}}"},"usage":{"inputTokens":10,"outputTokens":5},"stream":[{"type":"chunk","time":1788699361045,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":1788699361045,"index":0,"dt":[],"id":"fs-edit-replace","name":"edit","args":["{\"file_path\": \"config.txt\", \"old_string\": \"DEBUG\", \"new_string\": \"RELEASE\", \"sandbox_permissions\": \"danger-full-access\", \"justification\": \"\"}"]},{"type":"chunk","time":1788699361045,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"fs-edit-replace","name":"edit","arguments":"{\"file_path\": \"config.txt\", \"old_string\": \"DEBUG\", \"new_string\": \"RELEASE\", \"sandbox_permissions\": \"danger-full-access\", \"justification\": \"\"}"}}},{"type":"chunk","time":1788699361045,"chunk":{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}}},{"type":"chunk","time":1788699361045,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"} +{"type":"tool/call","data":{"turn":1,"step":3,"callId":"fs-edit-replace","name":"edit","arguments":"{\"file_path\": \"config.txt\", \"old_string\": \"DEBUG\", \"new_string\": \"RELEASE\", \"sandbox_permissions\": \"danger-full-access\", \"justification\": \"\"}"}} +{"type":"tool/result","data":{"turn":1,"step":3,"message":{"role":"tool","source":{"kind":"tool","callId":"fs-edit-replace"},"toolCallId":"fs-edit-replace","content":[{"type":"text","text":"The file {{cwd}}/config.txt has been updated successfully."}],"isError":false,"id":"{{message:9}}"},"meta":{"diffs":[{"path":"config.txt","oldText":"mode=DEBUG\nlevel=info","newText":"mode=RELEASE\nlevel=info"}]}},"sourceEventSeqs":[24],"surfaceOp":"append"} {"type":"step/end","data":{"turn":1,"step":3}} +{"type":"step/start","data":{"turn":1,"step":4}} +{"type":"assistant/message","data":{"turn":1,"step":4,"message":{"role":"assistant","content":[{"type":"text","text":"DONE"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:10}}"},"usage":{"inputTokens":10,"outputTokens":2},"stream":[{"type":"chunk","time":1788699361070,"chunk":{"type":"block-start","index":0,"blockType":"text"}},{"type":"text-chunks","time0":1788699361070,"index":0,"dt":[],"texts":["DONE"]},{"type":"chunk","time":1788699361070,"chunk":{"type":"block-end","index":0,"block":{"type":"text","text":"DONE"}}},{"type":"chunk","time":1788699361070,"chunk":{"type":"usage","usage":{"inputTokens":10,"outputTokens":2}}},{"type":"chunk","time":1788699361070,"chunk":{"type":"finish","reason":{"kind":"stop"}}}]},"surfaceOp":"append"} +{"type":"step/end","data":{"turn":1,"step":4}} {"type":"turn/end","data":{"turn":1,"reason":{"kind":"completed"}}} diff --git a/snapshots/session/fs-same-mode-empty-justification/snapshot.yml b/snapshots/session/fs-same-mode-empty-justification/snapshot.yml new file mode 100644 index 0000000000..9867ac72bd --- /dev/null +++ b/snapshots/session/fs-same-mode-empty-justification/snapshot.yml @@ -0,0 +1,9 @@ +version: 1 +scenario: fs-same-mode-empty-justification +profile: headless +composition: default +recording: authored +header: + class: default +workspace: + final: true diff --git a/snapshots/session/fs-same-mode-empty-justification/workspace.expected/config.txt b/snapshots/session/fs-same-mode-empty-justification/workspace.expected/config.txt new file mode 100644 index 0000000000..2c3e744847 --- /dev/null +++ b/snapshots/session/fs-same-mode-empty-justification/workspace.expected/config.txt @@ -0,0 +1,2 @@ +mode=RELEASE +level=info diff --git a/snapshots/session/fs-same-mode-empty-justification/workspace.expected/notes.txt b/snapshots/session/fs-same-mode-empty-justification/workspace.expected/notes.txt new file mode 100644 index 0000000000..95d09f2b10 --- /dev/null +++ b/snapshots/session/fs-same-mode-empty-justification/workspace.expected/notes.txt @@ -0,0 +1 @@ +hello world \ No newline at end of file diff --git a/snapshots/session/fs-same-mode-empty-justification/workspace/config.txt b/snapshots/session/fs-same-mode-empty-justification/workspace/config.txt new file mode 100644 index 0000000000..267876a5af --- /dev/null +++ b/snapshots/session/fs-same-mode-empty-justification/workspace/config.txt @@ -0,0 +1,2 @@ +mode=DEBUG +level=info diff --git a/snapshots/session/fs-write/session.v4.jsonl b/snapshots/session/fs-write/session.v4.jsonl deleted file mode 100644 index 511fe72bb4..0000000000 --- a/snapshots/session/fs-write/session.v4.jsonl +++ /dev/null @@ -1,22 +0,0 @@ -{"type":"session","version":4,"id":"{{session:1}}","createdAt":1783352078749,"cwd":"{{cwd}}","isSeeded":false,"delegationDepth":0} -{"type":"permission/preset","data":{"preset":"danger-full-access"}} -{"type":"sandbox/mode","data":{"mode":"danger-full-access"}} -{"type":"approval/policy","data":{"policy":"never"}} -{"type":"agent/inbox/spliced","data":{"target":"next-turn","start":0,"inserted":[{"content":[{"type":"text","text":"Use the write tool (NOT bash) to create a file named notes.txt in the current directory containing exactly the single line: hello world. Then reply with exactly the single word DONE."}],"source":{"kind":"user"},"role":"user","id":"{{message:1}}"}]}} -{"type":"turn/start","data":{"turn":1}} -{"type":"agent/inbox/spliced","data":{"target":"next-turn","start":0,"removedCount":1,"inserted":[]}} -{"type":"step/start","data":{"turn":1,"step":1}} -{"type":"system/message","data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{message:2}}"}},"surfaceOp":"append"} -{"type":"user/message","data":{"content":[{"type":"text","text":"Use the write tool (NOT bash) to create a file named notes.txt in the current directory containing exactly the single line: hello world. Then reply with exactly the single word DONE."}],"source":{"kind":"user"},"role":"user","id":"{{message:1}}"},"surfaceOp":"append"} -{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{message:3}}"},"surfaceOp":"append"} -{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":"{{tools}}"},"reason":"initial"}} -{"type":"request/context","data":{"provider":"deepseek-official","model":"deepseek-v4-flash"}} -{"type":"session/title","data":{"title":"Use the write tool (NOT","messageSeqs":[8],"source":{"kind":"fallback"}}} -{"type":"assistant/message","data":{"turn":1,"step":1,"message":{"role":"assistant","content":[{"type":"reasoning","text":"The user wants me to create a file named notes.txt with the content \"hello world\" using the write tool, then reply with \"DONE\"."},{"type":"tool-call","id":"call_00_APMUCJJm9lrTSlVbg6dB0185","name":"write","arguments":"{\"file_path\": \"notes.txt\", \"content\": \"hello world\", \"sandbox_permissions\": \"danger-full-access\", \"justification\": \"\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:4}}"},"usage":{"inputTokens":2891,"outputTokens":92,"cacheReadTokens":0,"reasoningTokens":30},"stream":[{"type":"chunk","time":1788699367607,"chunk":{"type":"block-start","index":0,"blockType":"reasoning"}},{"type":"reasoning-chunks","time0":1788699367607,"index":0,"dt":[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"texts":["The"," user"," wants"," me"," to"," create"," a"," file"," named"," notes",".txt"," with"," the"," content"," \"","hello"," world","\""," using"," the"," write"," tool",","," then"," reply"," with"," \"","D","ONE","\"."]},{"type":"chunk","time":1788699367608,"chunk":{"type":"block-start","index":1,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":1788699367608,"index":1,"dt":[],"id":"call_00_APMUCJJm9lrTSlVbg6dB0185","name":"write","args":["{\"file_path\": \"notes.txt\", \"content\": \"hello world\", \"sandbox_permissions\": \"danger-full-access\", \"justification\": \"\"}"]},{"type":"chunk","time":1788699367608,"chunk":{"type":"block-end","index":0,"block":{"type":"reasoning","text":"The user wants me to create a file named notes.txt with the content \"hello world\" using the write tool, then reply with \"DONE\"."}}},{"type":"chunk","time":1788699367608,"chunk":{"type":"block-end","index":1,"block":{"type":"tool-call","id":"call_00_APMUCJJm9lrTSlVbg6dB0185","name":"write","arguments":"{\"file_path\": \"notes.txt\", \"content\": \"hello world\", \"sandbox_permissions\": \"danger-full-access\", \"justification\": \"\"}"}}},{"type":"chunk","time":1788699367608,"chunk":{"type":"usage","usage":{"inputTokens":2891,"outputTokens":92,"cacheReadTokens":0,"reasoningTokens":30}}},{"type":"chunk","time":1788699367608,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"} -{"type":"tool/call","data":{"turn":1,"step":1,"callId":"call_00_APMUCJJm9lrTSlVbg6dB0185","name":"write","arguments":"{\"file_path\": \"notes.txt\", \"content\": \"hello world\", \"sandbox_permissions\": \"danger-full-access\", \"justification\": \"\"}"}} -{"type":"tool/result","data":{"turn":1,"step":1,"message":{"role":"tool","source":{"kind":"tool","callId":"call_00_APMUCJJm9lrTSlVbg6dB0185"},"toolCallId":"call_00_APMUCJJm9lrTSlVbg6dB0185","content":[{"type":"text","text":"{{cwd}}/notes.txt\nfile\n\nCreated file\n"}],"isError":false,"id":"{{message:5}}"},"meta":{"operation":"create","diffs":[]}},"sourceEventSeqs":[14],"surfaceOp":"append"} -{"type":"step/end","data":{"turn":1,"step":1}} -{"type":"step/start","data":{"turn":1,"step":2}} -{"type":"assistant/message","data":{"turn":1,"step":2,"message":{"role":"assistant","content":[{"type":"reasoning","text":"The file has been created. Now I just need to reply with \"DONE\"."},{"type":"text","text":"DONE"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:6}}"},"usage":{"inputTokens":214,"outputTokens":20,"cacheReadTokens":2816,"reasoningTokens":17},"stream":[{"type":"chunk","time":1788699367638,"chunk":{"type":"block-start","index":0,"blockType":"reasoning"}},{"type":"reasoning-chunks","time0":1788699367638,"index":0,"dt":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"texts":["The"," file"," has"," been"," created","."," Now"," I"," just"," need"," to"," reply"," with"," \"","D","ONE","\"."]},{"type":"chunk","time":1788699367638,"chunk":{"type":"block-start","index":1,"blockType":"text"}},{"type":"text-chunks","time0":1788699367638,"index":1,"dt":[0],"texts":["D","ONE"]},{"type":"chunk","time":1788699367638,"chunk":{"type":"block-end","index":0,"block":{"type":"reasoning","text":"The file has been created. Now I just need to reply with \"DONE\"."}}},{"type":"chunk","time":1788699367638,"chunk":{"type":"block-end","index":1,"block":{"type":"text","text":"DONE"}}},{"type":"chunk","time":1788699367638,"chunk":{"type":"usage","usage":{"inputTokens":214,"outputTokens":20,"cacheReadTokens":2816,"reasoningTokens":17}}},{"type":"chunk","time":1788699367638,"chunk":{"type":"finish","reason":{"kind":"stop"}}}]},"surfaceOp":"append"} -{"type":"step/end","data":{"turn":1,"step":2}} -{"type":"turn/end","data":{"turn":1,"reason":{"kind":"completed"}}} diff --git a/snapshots/session/fs-write/snapshot.yml b/snapshots/session/fs-write/snapshot.yml index a9cfe86e43..0a513ba7af 100644 --- a/snapshots/session/fs-write/snapshot.yml +++ b/snapshots/session/fs-write/snapshot.yml @@ -2,7 +2,7 @@ version: 1 scenario: fs-write profile: headless composition: default -recording: authored +recording: live header: class: default workspace: diff --git a/snapshots/web/diff-context/snapshot.yml b/snapshots/web/diff-context/snapshot.yml index a873709b05..bbf913c8e1 100644 --- a/snapshots/web/diff-context/snapshot.yml +++ b/snapshots/web/diff-context/snapshot.yml @@ -6,4 +6,4 @@ recording: authored header: class: default session: - source: ../../session/fs-edit/session.v4.jsonl + source: ../../session/fs-edit/session.v3.jsonl