What
git_operations' diff operation fails for every repository on main:
Git command failed: error: cannot run : No such file or directory
fatal: external diff died, stopping at <file>
Root cause
hardened_git injects every entry of NEUTRALISED_CONFIG as a -c override (src/openhuman/tools/impl/filesystem/git_operations_config.rs), and one of them is:
The intent is to neutralise a repository-set external diff driver. But git -c diff.external= does not disable the driver — it sets it to the empty string, and git then tries to execute that empty string. Reproducible on a bare repo with no config of its own:
$ git init -q . && echo a > f.txt && git add f.txt && git commit -qm init && echo b >> f.txt
$ git -c diff.external= diff -- f.txt
error: cannot run : No such file or directory
fatal: external diff died, stopping at f.txt
$ git -c diff.external= diff --no-ext-diff -- f.txt
diff --git a/f.txt b/f.txt
... # correct output
Every other entry in that list happens to name a program that exists or a key git treats as inert (core.pager=cat, core.editor=false, sequence.editor=false); diff.external is the one where an empty value means "run the empty program" rather than "none".
Impact
GitOperationsTool builds its diff through hardened_git (git_operations.rs, git_args = vec!["diff", "--unified=3"]), so the agent's diff operation is broken for all users, not only in tests. log/show are affected wherever they produce a patch.
How it surfaced
The raw-coverage test tools_network_channels_raw_coverage_e2e::git_operations_cover_read_write_markdown_and_safety_rejections fails on it. It is not caught on every PR because the coverage lane derives which raw-coverage modules to run from the changed paths, so it only runs when something under src/openhuman/tools/impl/filesystem/ is in the diff. It failed on #5955 purely because that PR merged main.
Fix
diff.external cannot be neutralised by a -c value — there is no value meaning "none". Drop it from NEUTRALISED_CONFIG and pass --no-ext-diff on the subcommands that honour an external diff driver (diff, and log/show when they produce a patch). GIT_EXTERNAL_DIFF is already cleared by suppress_ambient_git_config, so the env half of the hole is closed.
Acceptance criteria
What
git_operations'diffoperation fails for every repository onmain:Root cause
hardened_gitinjects every entry ofNEUTRALISED_CONFIGas a-coverride (src/openhuman/tools/impl/filesystem/git_operations_config.rs), and one of them is:The intent is to neutralise a repository-set external diff driver. But
git -c diff.external=does not disable the driver — it sets it to the empty string, and git then tries to execute that empty string. Reproducible on a bare repo with no config of its own:Every other entry in that list happens to name a program that exists or a key git treats as inert (
core.pager=cat,core.editor=false,sequence.editor=false);diff.externalis the one where an empty value means "run the empty program" rather than "none".Impact
GitOperationsToolbuilds its diff throughhardened_git(git_operations.rs,git_args = vec!["diff", "--unified=3"]), so the agent'sdiffoperation is broken for all users, not only in tests.log/showare affected wherever they produce a patch.How it surfaced
The raw-coverage test
tools_network_channels_raw_coverage_e2e::git_operations_cover_read_write_markdown_and_safety_rejectionsfails on it. It is not caught on every PR because the coverage lane derives which raw-coverage modules to run from the changed paths, so it only runs when something undersrc/openhuman/tools/impl/filesystem/is in the diff. It failed on #5955 purely because that PR mergedmain.Fix
diff.externalcannot be neutralised by a-cvalue — there is no value meaning "none". Drop it fromNEUTRALISED_CONFIGand pass--no-ext-diffon the subcommands that honour an external diff driver (diff, andlog/showwhen they produce a patch).GIT_EXTERNAL_DIFFis already cleared bysuppress_ambient_git_config, so the env half of the hole is closed.Acceptance criteria
git_operationsdiffsucceeds on a repository with no external diff driver configureddiff.externalnaming a program is still not executed (the hardening's actual goal), with a regression test that sets one and asserts it does not runtools_network_channels_raw_coverage_e2e::git_operations_cover_read_write_markdown_and_safety_rejectionspassesNEUTRALISED_CONFIGentry whose empty value is command-valued is audited the same way