Skip to content

Commit aa0203d

Browse files
test(server): cover stream_event steer acknowledgment before Stop
Add a stream_event row to the unread-steer Stop table so a regression that stops counting stream echoes as delivery is caught. Make the repro's No-Stop control use a 30s hold so the endpoint releases well before curl's 600s timeout. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 1405c02 commit aa0203d

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

‎apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.ts‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3071,6 +3071,7 @@ describe("ClaudeAdapterV2 background wake turns", () => {
30713071
title: "warns that a steer Claude never read before Stop was not delivered",
30723072
},
30733073
{ readBy: "assistant", title: "does not warn about a steer Claude read before Stop" },
3074+
{ readBy: "stream", title: "does not warn about a steer a stream event echoed before Stop" },
30743075
{
30753076
readBy: "result",
30763077
title: "does not warn about a steer only a steering result echoed before Stop",
@@ -3158,6 +3159,18 @@ describe("ClaudeAdapterV2 background wake turns", () => {
31583159
}),
31593160
);
31603161
}
3162+
if (readBy === "stream") {
3163+
yield* harness.offerAndWait(
3164+
claudeSdkFrame({
3165+
type: "stream_event",
3166+
event: { type: "message_start", message: { id: "msg_unread_steer_stream" } },
3167+
parent_tool_use_id: null,
3168+
user_message_uuids: [steerUuid],
3169+
session_id: WAKE_NATIVE_SESSION,
3170+
uuid: "00000000-0000-4000-8000-000000015705",
3171+
}),
3172+
);
3173+
}
31613174
if (readBy === "assistant") {
31623175
yield* harness.offerAndWait(
31633176
claudeSdkFrame({

‎scripts/issue-15708-repro.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Wait for the provider protocol log's `system` / `task_started` frame with `is_ba
1818
1919
Then click Stop while the foreground tool is running. Before the fix the thread silently loses the steer. After the fix a system notice quotes the steer, says delivery could not be confirmed, and asks for resend; it does not claim that Claude remembers it. Record the complete interaction, including the task-start milestone and Stop, and inspect the notice in web and native mobile (including expanded detail).
2020

21-
No-Stop control: repeat in a fresh thread, allow the endpoint to release, then ask for the codeword. Expect recall and no delivery warning. For a faster control, replace 600000 with a shorter hold and keep curl's timeout longer than the hold.
21+
No-Stop control: restart the endpoint with `30000` in place of `600000` so it releases well before curl's 600-second `--max-time`; with equal timeouts curl can expire first and the control stops testing a clean release. Repeat in a fresh thread, allow the endpoint to release, then ask for the codeword. Expect recall and no delivery warning.
2222

2323
Consumed-then-Stop control: ask Claude to run a short held curl, acknowledge the codeword, then run a second long held curl. Steer during the first curl, release it, wait for the acknowledgement and second foreground `task_started`, then Stop. Expect no unconfirmed-delivery warning for the acknowledged steer. Correlate its UUID with an assistant/stream/result prompt-UUID echo; a user echo alone is insufficient evidence.
2424

0 commit comments

Comments
 (0)