Skip to content

Commit 3526c27

Browse files
committed
Fix Codex mount test DIY assertions under real posix tools
Empty createPosixTools stub hid write_file/edit_file/delete_file, so the primary DIY-remains expects could never pass. Use the real mount like the update_plan e2e case.
1 parent 359e9f1 commit 3526c27

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

‎src/agent/codex-tool-mount.test.ts‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,10 @@ describe("Codex tool proxy mount", () => {
5656
});
5757

5858
test("Codex createAgentToolset strips apply_patch on primary; keeps shell/update_plan", async () => {
59+
// Unstubbed createPosixTools: write_file / edit_file / delete_file come from
60+
// the real posix + delete-file plugin mount. An empty stub would hide them
61+
// and make the DIY-remains assertion meaningless.
5962
const cwd = mkdtempSync(join(tmpdir(), "corbits-codex-mount-"));
60-
spyOn(posixModule, "createPosixTools").mockReturnValue({
61-
definitions: [],
62-
run: async () => ({ id: "x", content: "" }),
63-
dispose: async () => {},
64-
} as unknown as ReturnType<typeof posixModule.createPosixTools>);
65-
6663
const { createAgentToolset } = await import("./tools.js");
6764
const permissionGate = {
6865
check: async () => ({ allowed: true }),

0 commit comments

Comments
 (0)