Skip to content

Commit d0eca05

Browse files
committed
Merge remote-tracking branch 'origin/main' into codex/audit-continuation-20261020-refresh20
2 parents 22c84ce + 85b379c commit d0eca05

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

‎tests/boundary/filesystem/jsonOutputOwnership.test.ts‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,13 @@ it("preserves cancellation when staging cleanup also fails", async () => {
208208
if (result.ok) throw new Error("Expected cancellation");
209209
expect(result.error).toBeInstanceOf(AnalysisCancelledError);
210210
expect(result.error.cleanupIncomplete).toBe(true);
211-
expect(result.error.cause).toMatchObject({
212-
cause: expect.any(AnalysisCancelledError),
213-
owner: { directory: expect.stringContaining(".rea-write-") },
214-
});
211+
// The caller's exact abort reason stays the cause; the retained staging
212+
// directory is reported as cleanup state, not as the cancellation cause.
213+
expect(result.error.cause).toBe(controller.signal.reason);
214+
expect(result.error.cleanupPrimary).toBeInstanceOf(AnalysisCancelledError);
215+
expect(result.error.cleanupResources).toEqual([
216+
expect.stringContaining(".rea-write-"),
217+
]);
215218
await expect(fs.access(join(root, "cancelled.json"))).rejects.toThrow();
216219
const stage = requireStages(root)[0];
217220
if (stage !== undefined) await fs.rm(join(root, stage, "unexpected"));

0 commit comments

Comments
 (0)