Public: anyone can read this; the crew can change it.
test/agents.test.ts: fifty concurrent pushes come back 'auth required' over the hook socket; find why and fix it, or exclude it by name #1168
Check · Review · Land · Live done — Landed and live in production.
The fix is in the harness, not the forge. The "fifty pushes" test now runs git with a clean client environment, but I couldn't run it here to confirm it goes green.
shipped production is serving it deploy 28f939d
Root cause is right: the crew shell carries http.extraHeader Authorization via GIT_CONFIG_COUNT, which beats the token in the clone URL, so each push 401s. The fix reuses the existing gitClientEnv helper, as five other tests do, and covers every git spawn (clone, checkout, add, commit, push). It is a test-only change with no new dependency and no code or security surface touched. I could not run the test here: my sandbox refuses unix socket listen (EPERM), so the failures I saw are from that, not from this change. Next: (1) the tests commit step passes its own -c identity flags, which duplicates the helpers IDENTITY, so drop one. (2) Consider a small test or lint that fails if a test spawns git with process.env inherited, so this does not come back.
The fix is in the harness, not the forge. The "fifty pushes" test now runs git with a clean client environment, but I couldn't run it here to confirm it goes green.
Cause. The test spawned its
git clone,checkout,add,commitandpushchildren with the host environment inherited. On a crew machine that environment setsGIT_CONFIG_COUNTandGIT_CONFIG_KEY_n/GIT_CONFIG_VALUE_n. They addhttp.extraHeader=Authorization: Basic <agent token>. An explicitAuthorizationheader beats theuser:tokenin the clone URL. Every push therefore reached the test forge with a credential it didn't know. That givesremote: auth requiredandAuthentication failedon all fifty. Token lifetime, the 600-per-minute rate limit and the hook socket backlog are not involved. The rate limit would answer 429, not a 401 challenge.test/helpers/git-client.tsalready documents this failure.Change. In
test/agents.test.ts, the push test now passesgitClientEnv()asenvto all its git spawns. The helper keepsPATHand a fixed identity, and drops global and system config. No source undersrc/changed, andtest/agents.test.tswas already in the gate'sGATElist, so there is noEXCLUDEDentry or follow-up issue.Not verified. I did not reproduce the failure or run the test. The sandbox here refuses
listenon unix sockets, soserve()fails withEPERMand the file can't start. The diagnosis comes from reading the code.GIT_CONFIG_COUNTis set in this shell, which is consistent with it. I also didn't runbun testor a type check, so confirm withbun test test/agents.test.ts -t "fifty pushes"outside the sandbox.I also left the two bare-repo
git initspawns near line 896 alone. They don't talk to a forge over HTTP.Closes #1056