mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-10 12:37:55 +01:00
Merge commit '476ca3d87' into validation/runner-paid-matrix-integrity-v5
* commit '476ca3d87': fix(runner): close ACPX sidecar stdin cleanly
This commit is contained in:
commit
8c84fdf8b4
2 files changed
+16
-1
No files matched your search
@@ -29,6 +29,21 @@ afterEach(async () => {
|
||||
});
|
||||
|
||||
describe("qualified ACPX runtime sidecar", () => {
|
||||
it("shuts down without using readline after stdin closes", async () => {
|
||||
const sidecar = startSidecar();
|
||||
sidecar.write(initializeRequest(1, "codex"));
|
||||
await expect(
|
||||
sidecar.next((frame) => frame.id === 1),
|
||||
).resolves.toMatchObject({
|
||||
id: 1,
|
||||
ok: true,
|
||||
});
|
||||
|
||||
await sidecar.close();
|
||||
|
||||
expect(sidecar.stderr()).not.toContain("ERR_USE_AFTER_CLOSE");
|
||||
});
|
||||
|
||||
it("keeps session admission closed while any cleanup owner remains", () => {
|
||||
const cleanup = Promise.resolve();
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ process.once("SIGINT", () => {
|
||||
function requestShutdown(reason: string): void {
|
||||
if (shutdownRequested) return;
|
||||
shutdownRequested = true;
|
||||
lines.pause();
|
||||
if (!lines.closed) lines.pause();
|
||||
pendingInput = enqueueAcpxSidecarInput(
|
||||
pendingInput,
|
||||
() => shutdown(reason),
|
||||
|
||||
Reference in new issue
Block a user