Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test(FIX-2479 s3): keep the new hold tests inside the ask-mark sweep'…
…s kept shapes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011UNkLD7mJaky2QRikkQ8Z4
  • Loading branch information
claude committed Nov 8, 2026
commit bbf41d47309689fa283f3479f48c786e688f48b6
4 changes: 2 additions & 2 deletions packages/devtool/test/task-collection-state.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ describe("waitPrompt — the task's own hold, under either marker", () => {
status: "in_progress",
holds: [
{ id: "q1", source: { kind }, ask: { kind: "question", prompt: "Which region?" } },
{ id: "q2", source: { kind }, ask: { kind: "confirm", prompt: "Ship it?" } },
{ id: "q2", source: { kind }, ask: { kind: "question", prompt: "Ship it?" } },
],
steers: [{ id: "s1", answers: "q1" }],
});
Expand All @@ -300,7 +300,7 @@ describe("waitPrompt — the task's own hold, under either marker", () => {
});

it("shows a run's stop while it is on the task, whatever answers name", () => {
const task = { id: "t", status: "in_progress", holds: [{ id: "susp_1", source: { kind: "suspension" }, ask: { kind: "input", prompt: "Which branch?" } }], steers: [{ id: "s1", answers: "susp_1" }] };
const task = { id: "t", status: "in_progress", holds: [{ id: "susp_1", source: { kind: "suspension" }, ask: { kind: "review", prompt: "Which branch?" } }], steers: [{ id: "s1", answers: "susp_1" }] };
expect(waitPrompt(task as never)).toBe("Which branch?");
});
});
27 changes: 23 additions & 4 deletions packages/orchestration/test/schema/retired-shapes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,32 @@ describe("the retired-shape read", () => {
// `"task"`; one stored under the retired `"row"` reads as `"task"` on both reads, so no
// reader downstream branches on `"row"`.
describe("a task's own hold stored under the row marker", () => {
const legacy = { id: "q1", actor: "user", openedAt: 1, source: { kind: "row", closedBy: [{ by: "answer" }] }, ask: { kind: "question", prompt: "Which region?" } };
const confirm = { ...legacy, id: "c1", ask: { kind: "confirm", prompt: "Ship it?", onNo: "cancel" } };
const stop = { id: "susp_1", actor: "user", openedAt: 1, source: { kind: "suspension", requestId: "r", suspensionId: "susp_1" }, ask: { kind: "input", prompt: "Which branch?" } };
const legacy = {
id: "q1",
actor: "user",
openedAt: 1,
source: { kind: "row", closedBy: [{ by: "answer" }] },
ask: { kind: "question", prompt: "Which region?" },
};
const confirm = {
...legacy,
id: "c1",
ask: { kind: "confirm", prompt: "Ship it?", onNo: "cancel" },
};
const stop = {
id: "susp_1",
actor: "user",
openedAt: 1,
source: { kind: "suspension", requestId: "r", suspensionId: "susp_1" },
ask: { kind: "input", prompt: "Which branch?" },
};

it("the parse path reads it as the task's own, a confirm included", () => {
expect(taskHoldSchema.parse(legacy).source).toEqual({ kind: "task", closedBy: [{ by: "answer" }] });
expect(taskHoldSchema.parse(confirm)).toMatchObject({ source: { kind: "task" }, ask: { kind: "confirm", onNo: "cancel" } });
expect(taskHoldSchema.parse(confirm)).toMatchObject({
source: { kind: "task" },
ask: { kind: "confirm", onNo: "cancel" },
});
expect(taskSchema.parse({ ...row, status: "in_progress", holds: [legacy, stop] }).holds?.map((hold) => hold.source.kind)).toEqual(["task", "suspension"]);
});

Expand Down
Loading