Bug on codex-cli/tests/apply-patch.test.ts L328
Resolved 💬 1 comment Opened Jun 15, 2025 by an0nym3r Closed Aug 7, 2025
What version of Codex is running?
_No response_
Which model were you using?
_No response_
What platform is your computer?
_No response_
What steps can reproduce the bug?
Seems like the test code of codex-cli/tests/apply-patch.test.ts#L328 should've initialized with {"old.txt": "old"} when calling createInMemoryFS({})
for example, the code should've updated like this:
test("apply_commit correctly performs move / rename operations", () => {
const commit = {
changes: {
"old.txt": {
type: ActionType.UPDATE,
old_content: "old",
new_content: "new",
move_path: "new.txt",
},
},
};
// PATCH
const { writeFn, removeFn, writes, removals } = createInMemoryFS({"old.txt": "old"});
apply_commit(commit, writeFn, removeFn);
expect(writes).toEqual({ "new.txt": "new" });
expect(removals).toEqual(["old.txt"]);
});
````
Without this, It'll not pass the test.
### What is the expected behavior?
_No response_
### What do you see instead?
_No response_
### Additional information
_No response_This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗