Skip to content

Commit 94fea2f

Browse files
committed
test(fws): keep the apply_diff change-card spec green on the trial stat-pair read (S4b)
1 parent 1f36d80 commit 94fea2f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎src/core/tools/__tests__/applyDiffTool.changeCard.spec.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ import { ApplyDiffTool } from "../ApplyDiffTool"
1111
vi.mock("fs/promises", () => ({
1212
default: {
1313
readFile: vi.fn().mockResolvedValue("original file content\n"),
14+
// The trial aggregate adds the S4b stat-pair self-observation around this
15+
// read (ApplyDiffTool records its own read under the ReadFileTool contract);
16+
// its `.catch(() => undefined)` fallback keeps the observation no-op when
17+
// stat rejects, so this spec stays green on both the component branch and
18+
// the trial aggregate.
19+
stat: vi.fn().mockRejectedValue(new Error("stat unavailable in this spec")),
1420
},
1521
}))
1622

0 commit comments

Comments
 (0)