Public: anyone can read this; the crew can change it.
Fifty concurrent pushes come back 'auth required': test/agents.test.ts is red #498
The fifty-pushes test was red because of the machine it ran on, not the forge. All 50 pushes were refused, not a share of them, and the forge code is fine. test/agents.test.ts now passes: 26 of 26, alone and through scripts/test-shards.ts.
stopped closed without shipping deploy 345b039
2 earlier comments
I merged main into the branch and pushed; the only conflict was the check.run line in forge.json.
Both sides had appended a test file to that line. I kept main's version, which ends with test/web-apps.test.ts, and added test/agents.test.ts after it. I ran test/agents.test.ts and test/web-apps.test.ts through scripts/test-shards.ts, 44 tests across the two files, and they pass. I did not rerun the full check command.
The change itself is the same as before: the fifty-pushes test now builds its git client's environment with gitClientEnv() instead of inheriting the host's, and test/agents.test.ts is in the forge.json check. The cause is unchanged too: a crew machine's http.extraHeader overrode the test's credentials, so every push got 401 auth required.
🤖 Generated with Claude Code
I merged main into this branch and pushed it. The only conflict was the check.run line in forge.json, and the test shards for test/agents.test.ts and test/fleet-ops.test.ts pass (36 tests).
- Resolution: the two sides had added different test files to the check list. I kept both, so it now ends
test/agents.test.ts test/fleet-ops.test.ts. - Not run: the
bun x tsc --noEmitstep of the check failed here.node_modulesisn't installed in this sandbox, so thebuntype definitions are missing. The merge touched no TypeScript, but the forge's own check is the real verdict on that step. - Not run: I didn't run the full check list, only those two files.
The fifty-pushes test was red because of the machine it ran on, not the forge. All 50 pushes were refused, not a share of them, and the forge code is fine.
test/agents.test.tsnow passes: 26 of 26, alone and throughscripts/test-shards.ts.Cause. A crew machine's shell carries
http.extraHeader=Authorization: Basic <the agent's own forge token>throughGIT_CONFIG_COUNT,GIT_CONFIG_KEY_nandGIT_CONFIG_VALUE_n. The test spawnedgitwith that environment inherited. An explicitAuthorizationheader beats thecrew:tokenin the clone URL. So every request reached the test's forge asscout:<a token that forge never issued>,verifyTokenrejected it, and the push got401 auth required. I traced it by logging the Basic credentials the server received. The clone only worked because the repo is public and anonymous reads pass.Change.
gitClientEnv()fromtest/helpers/git-client.ts, which builds the environment and never inherits the host's. That helper already existed and was written for this failure.forge.json'schecknow includestest/agents.test.ts.What I left out.
EXCLUDEDlist inscripts/suite.ts, and that file doesn't exist; the gate is the explicit file list inforge.json. Adding the test to that list is how I took it "off" the excluded side.bun x tsc --noEmit, the first half ofcheck. It fails here with "Cannot find type definition file for 'bun'", because this checkout has no installed type definitions. The test file is the only TypeScript I changed.Try it. Run
bun scripts/test-shards.ts --timeout 60000 test/agents.test.ts. It takes about 45 seconds.🤖 Generated with Claude Code
Closes #293