cursor: a continued Run that goes quiet after the caller's results ends (#364)

Test only. #364's tests covered the pause at a sealed batch but not the
resume after the submit: with resume() leaving the Run paused, every
test passed and a retained Run that went quiet on its second model call
would wait for lifetime again. This one is red with that break (times
out at 5 s) and green at cf1873e.

Run: packages/cursor native-e2e.test.mjs, Bun 1.4.2, sandbox HOME:
131 pass, 0 fail.
This commit is contained in:
yetone
2026-10-24 20:35:20 +08:00
parent cf1873e292
commit c9a0215f31
+12
View File
@@ -1572,3 +1572,15 @@ test("native: a Run parked for the caller's results longer than idle still conti
expect(second.diagnostic).toMatch(/^same-run/)
expect(a.runs).toHaveLength(1)
})
test("native: a continued Run that goes quiet after the caller's results ends within idle (#2672)", async () => {
NATIVE_LIMITS.idle = 150
const a = await agent({ finalAfterFirst: true, stallFinal: true }), account = auth(), chat = initial()
const first = await a.ask(account, chat)
expect(first.status).toBe(200)
expect(first.diagnostic).toMatch(/^same-run/)
const second = await a.ask(account, continueWith(chat, first.body, ["after the tool"]))
expect(second.status).toBe(502)
expect(second.body.error.message).toContain("Cursor went quiet: no message for")
expect(a.runs).toHaveLength(1)
})