PEP-95: claude-live Stop test waits for the prompt hook (race reset auto_nudges)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
6fbf10e00e
commit
b1fe8e9a84
@ -376,6 +376,7 @@ async function turn(prompt: string, actions: Action[] | undefined, continuation
|
||||
log("prompt", { prompt });
|
||||
out(`\n> ${prompt.replace(/\n/g, "\n ")}\n`);
|
||||
await fireHook("UserPromptSubmit", { prompt });
|
||||
log("prompt_hooked", {});
|
||||
}
|
||||
lastMessage = "";
|
||||
let completed = true;
|
||||
|
||||
@ -180,7 +180,8 @@ describe("Живой Claude Code: peppa-hook на снятых payload'ах", ()
|
||||
test("Stop: стори в работе → decision block; после двух — PM", async () => {
|
||||
const p = await project({ turns: [[{ sleep: 60_000 }]] });
|
||||
const sid = await p.start();
|
||||
await p.waitLog("mock started", (e) => e.ev === "prompt");
|
||||
// The prompt hook resets auto_nudges; let it finish before the Stop hooks are counted.
|
||||
await p.waitLog("mock started", (e) => e.ev === "prompt_hooked");
|
||||
await core.updateTask(db, await core.resolveTask(db, p.taskKey), { status: "in_progress" });
|
||||
const s = await p.session(sid);
|
||||
const stop = fixture("stop");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user