test(snapshot): await cancelled turn durability

This commit is contained in:
Tianyi Cui
2026-07-22 22:00:48 +08:00
parent 3679b4d829
commit ad4c37013a
6 changed files with 116 additions and 6 deletions

View File

@@ -7,6 +7,7 @@
"text": "Run two shell commands: wait for cancellation, then write skipped.txt.",
"afterUpdate": "tool_call",
"waitForToolCallUpdate": "call_skipped"
}
},
{ "op": "waitForTurnEnd" }
]
}

View File

@@ -18,4 +18,4 @@
{"type":"tool/call","seq":16,"time":1784437195089,"data":{"turn":1,"step":1,"callId":"call_skipped","name":"bash","arguments":"{\"command\":\"printf skipped > skipped.txt\",\"description\":\"Write skipped marker\"}"}}
{"type":"tool/result","seq":17,"time":1784437195089,"data":{"turn":1,"step":1,"callId":"call_skipped","content":[{"type":"text","text":"Error: tool call aborted before dispatch"}],"isError":true,"error":{"name":"AbortError","code":"ABORTED_BEFORE_DISPATCH"}},"sourceEventSeqs":[16],"surfaceOp":"append"}
{"type":"step/end","seq":18,"time":1784437195090,"data":{"turn":1,"step":1}}
{"type":"turn/end","seq":19,"time":1784437195090,"data":{"turn":1,"reason":{"kind":"disposed"}}}
{"type":"turn/end","seq":19,"time":1784437195090,"data":{"turn":1,"reason":{"kind":"aborted"}}}

View File

@@ -2,6 +2,7 @@
"steps": [
{ "op": "initialize" },
{ "op": "newSession" },
{ "op": "promptAndCancel", "text": "Start a long task; this turn will be cancelled mid-stream." }
{ "op": "promptAndCancel", "text": "Start a long task; this turn will be cancelled mid-stream." },
{ "op": "waitForTurnEnd" }
]
}