From 05c6a3f1ddbba3b85e47a4feffdbe92e723a5a34 Mon Sep 17 00:00:00 2001 From: BIackFIame <77388790+BIackFIame@users.noreply.github.com> Date: Mon, 2 Nov 2026 11:08:12 +0000 Subject: [PATCH] test: give the delivery queue test a budget that covers its wait in the queue The second task's deadline is set when it is queued, so it also covers the whole first transaction. With the fixture's 150 ms default, a few 25 ms polling ticks on a coarse Windows timer (about 15.6 ms steps) spend it, and the second Enter is not sent. This test checks ordering, not the short-deadline path, so it gets the 5 s budget the first test in this file already uses (6e36e984). The last draft is confirmed by a UserPromptSubmit so it does not sit in the acceptance loop. --- tests/prompt-delivery.test.mjs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/prompt-delivery.test.mjs b/tests/prompt-delivery.test.mjs index e7a7d4273..4cc2dfd15 100644 --- a/tests/prompt-delivery.test.mjs +++ b/tests/prompt-delivery.test.mjs @@ -165,7 +165,9 @@ test("Claude's unstyled hint requires native idle, cursor at the start and untou }); test("the queue retains the entire paste/observe/Enter transaction and supports owned paste-only drafts", async t => { - const f = fixture(t); + // The second task's deadline also covers its wait behind the first, so a 150 ms budget is + // spent by a few 25 ms polling ticks on a coarse (Windows) timer. Ordering is under test here. + const f = fixture(t, "codex", 5_000); const first = f.send("one"), second = f.send("two"); await until(() => f.writes.length === 1); f.draw("one"); @@ -187,7 +189,9 @@ test("the queue retains the entire paste/observe/Enter transaction and supports const extension = f.send(" continued"); await until(() => f.writes.length === 6); f.draw("draft continued"); - await extension; + await until(() => f.writes.length === 7); + f.manager.applyProviderSignal(f.session.id, { kind: "lifecycle", state: "working", event: "UserPromptSubmit" }); + assert.equal((await extension).receipt.acceptance, "confirmed"); assert.deepEqual(f.writes.slice(-3), ["\x1b[200~draft\x1b[201~", "\x1b[200~ continued\x1b[201~", "\r"]); });