The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
test(git_operations): make the e2e git fixture hermetic instead of reading the developer's config\n\n`run_git` in `tools_network_channels_raw_coverage_e2e.rs` spawned git with the\nmachine's own configuration in scope, and the fixture performs a real `commit`.\nA global `commit.gpgsign = true` — which every maintainer who signs commits has\n— made that commit try to sign and fail:\n\n gpg: skipped "DEADBEEFDEADBEEF": Input/output error\n gpg: signing failed: Input/output error\n fatal: failed to write commit object\n\nCI has no global git config, so this was green there and red only on the laptops\nof the people most likely to run it. Reported by W2, who lost time to it.\n\nClose the system and global config the way the unit suite's `hermetic()` and the\nproduct's own `suppress_ambient_git_config` do. `GIT_CONFIG_GLOBAL` must name a\nreadable-but-empty path rather than be unset, or git falls back to `~/.gitconfig`\n— the thing being closed. The committer identity is unaffected: the fixture\nalready sets `user.email` / `user.name` repository-locally, so nothing is\nstranded by removing the ambient config.\n\nRevert-checked under a fabricated signing developer's `HOME` (global\n`commit.gpgsign = true`, unusable key):\n\n - without the fix: fails at the commit, `gpg: signing failed`\n - with the fix: no gpg complaint at all; the commit succeeds\n\nWith the fix the test then reaches, and fails on, the `diff.external` defect\nfixed earlier in this same PR — which is why the two belong together: neither\nalone makes this test pass on a maintainer's machine.\n
M3gA-Mindffde0fd89f04
diff --git a/tests/raw_coverage/tools_network_channels_raw_coverage_e2e.rs b/tests/raw_coverage/tools_network_channels_raw_coverage_e2e.rsindex e40e2fcecc..fd5b3f352b 100644--- a/tests/raw_coverage/tools_network_channels_raw_coverage_e2e.rs+++ b/tests/raw_coverage/tools_network_channels_raw_coverage_e2e.rs@@ -375,10 +375,34 @@ async fn web_channel_public_paths_cover_validation_cancel_schema_and_event_bus()assert_eq!(event.message.as_deref(), Some("payload"));}+/// Run `git` in `repo` with the developer's own git configuration closed out.+///+/// The fixture below performs a real `commit`, and without this it inherits+/// whatever the machine running it happens to configure. A global+/// `commit.gpgsign = true` — which every maintainer who signs commits has, and+/// which this repository's own contributing guide asks for — makes that commit+/// try to sign, and it fails with `error: gpg failed to sign the data` for+/// reasons that have nothing to do with the code under test. CI has no global+/// git config, so the test is green there and red only on the laptops of the+/// people most likely to be running it.+///+/// `GIT_CONFIG_GLOBAL` must name a readable-but-empty path rather than be+/// unset: unsetting it lets git fall back to `~/.gitconfig`, which is the thing+/// being closed. This mirrors `NULL_CONFIG_PATH` and `suppress_ambient_git_config`+/// in `tools/impl/filesystem/git_operations_config.rs`, and the unit suite's+/// own `hermetic()` helper.+///+/// The committer identity is unaffected: it is set repository-locally at the+/// top of the fixture, so closing the global config does not strand the commit+/// the way it would if the identity were ambient too.fn run_git(repo: &std::path::Path, args: &[&str]) {+ // `/dev/null` is not a path on Windows; `NUL` is.+ let null_config = if cfg!(windows) { "NUL" } else { "/dev/null" };let output = Command::new("git").args(args).current_dir(repo)+ .env("GIT_CONFIG_NOSYSTEM", "1")+ .env("GIT_CONFIG_GLOBAL", null_config).output().expect("spawn git");assert!(