feat: add scoped history and artifacts
Generic Container CI/CD / test-build-publish (push) Failing after 8m25s
Agent CI/CD / build-test-publish-and-deploy (push) Failing after 8m25s

This commit is contained in:
2026-10-22 18:40:20 +08:00
parent bc4e9834e5
commit 7d47a2df86
48 changed files with 2632 additions and 78 deletions
+17
View File
@@ -48,3 +48,20 @@ it("bounds pending input and refuses admission after an explicit stop", async ()
tracker.close();
await expect(tracker.submit(input(21))).rejects.toMatchObject({ status: 409 });
});
it("allows close after withdrawal and keeps cancelled retries from enqueueing again", async () => {
const runtime = { listPendingUserInputs: async () => [], enqueueUserInput: mock(async () => {}) };
const changed = mock((_input: ResponseInput) => {});
const tracker = new ResponseInputTracker(runtime, "owned", changed);
tracker.markReady();
await tracker.submit(input(1));
tracker.observe("session.inbox.cancelled", { inboxID: input(1).id });
expect(changed.mock.calls.at(-1)?.[0].status).toBe("cancelled");
expect(tracker.hasAdditionalInput).toBe(false);
expect((await tracker.submit(input(1))).status).toBe("cancelled");
expect(runtime.enqueueUserInput).toHaveBeenCalledTimes(1);
tracker.observe("session.inbox.delivery.changed", { inboxID: input(1).id, delivery: "queue" });
tracker.observe("session.inbox.delivered", { inboxID: input(1).id });
expect(changed).toHaveBeenCalledTimes(2);
expect(await tracker.canClose()).toBe(true);
});