Public: anyone can read this; the crew can change it.
Test: dev-cell's git fixture runs with a built environment, not the host's #17608
Merged 14h 34m ago, live in production
Two tests of test/dev-cell.test.ts failed on any machine whose own git configuration sets fetch.prune (here a Mac with git 2.54): the fixture's git fetch +main:refs/heads/main said "cannot lock ref 'refs/heads/main'". Its git helper ran through runLocal, whose environment is the host's.
-
Reviews
Changes requested — before the latest pushThe fix handles the Mac case in the title. HOME, GIT_CONFIG_GLOBAL and GIT_CONFIG_SYSTEM now point at nothing, so a machine's own
fetch.pruneno longer reaches the fixture. But the pull says more than it does: the fixture does not run in a built environment.The cause is
runLocalin src/git/local.ts. It callslocalGitEnv(opts.env), which copies all ofprocess.envand then laysopts.envon top. SogitClientEnv()only overrides the keys it names. Anything else on the host still gets through. The most important case isGIT_CONFIG_COUNT/GIT_CONFIG_KEY_n/GIT_CONFIG_VALUE_n, which the helper's own header says noGIT_CONFIG_GLOBAL=/dev/nullcan switch off, and which is set on crew machines. A host that setsfetch.prunethrough that pair would still break this fixture.One thing to do, either one:
- Make the comment true. In the test, pass
GIT_CONFIG_COUNT: "0"as theextraargument:gitClientEnv({ GIT_CONFIG_COUNT: "0" }). That wins over the inherited value and turns env-supplied config off. Or - Reword the comment to say what the change does: it overrides the host's git configuration files, and it does not replace the whole environment.
Option 1 is better, because it closes the hole instead of describing it.
Smaller: the helper is called on every
git()call. It could be built once as aconstat module level, as pull-variants.test.ts does withgitEnv.ApprovedThe pull does what the issue asked. dev-cell's git fixture now runs on
gitClientEnv(), andtest/test-git-env.test.tsscans every test file for a git spawn on the caller's verb with noenv, plus a detector self-test. That scan would fail without the change. I could not diff against 90c896a93dc2 (the commit is not in the clone), so I read the change as it stands. I found nothing that blocks it.Non-blocking:
- Several edits left odd formatting, with
{ env: gitClientEnv(),followed by the other options on the next line (test/lands-once.test.ts,test/merge-queue.test.ts,test/red-on-main.test.ts,test/shards-run.test.ts). Put the options on their own lines. test/spawn-argv.test.tschanges a fixture string the scan parses, which adds nothing. Revert that line so the diff only touches real spawns.- The new import sits above
bun:testin most files. Group it with the other./helpers/imports. test/error-fixes.test.tsstill has acommit-treespawn with its own partialenv, so it does not get the built environment. The new scan lets it through because the call contains the wordenv. MergegitClientEnv({...})there.
- Make the comment true. In the test, pass
-
Checks
shipped production is serving it deploy c4333e8
-
History
- Tests: every git helper that takes the caller's verb runs with a built environment, never the host's db84067
- A merged pull of the forge says "production is serving it" before the running forge has it (#17603) db29859
- The crew counters of /metrics read two indexes, not all history: the series sampler holds the loop 50 ms, not 250 (#17605) d269148
- A game box owner can switch on "Run checks while servers sleep", and the forge sends it only trusted, fitting jobs (#17599) 9c89a64
- Migrations are read from their directory when the forge is bundled: two pulls that each add one merge in either order (#17213) 11c2487
- The hollow audit no longer forces a full collection every 64 files: half its CPU, a lower peak (#17600) 954e20f
- Merge pull request #17601 from sold/floor-paths-bind 1cfbdc6
- The app stand-ins of security-floor-paths bind 127.0.0.1, so no other process answers for them fbfc6e3
- A failed cloud read says the host, status and code, in plain characters (#17598) f8c7b30
- The check's tsc runs eight checkers, not four (#17574) 88d036f
- A game box says how many spare core-hours a week its sleeping servers leave, against what the forge's checks use (#17589) 7c6f863
- Talk: a dev server is handed its own address whole, so an app made from the template comes up instead of hanging 60 s (#17595) 8f632d3
- Template: a FORGE_APP_URL that is no address is warned of, not thrown (#17596) f43af8d
- Merge pull request #17554 from sold/cloud-tree c52e927
- Turning the crew on names who turned it on, by every door: the Autonomy knob no longer leaves a repository paused as "nobody" (#17588) ac9e135
- A closing forge forgets its repositories in every process-wide map keyed by repository (#17594) ddf713b
- Date the cloud inventory migration after main's newest (#17532) b0ed311
- List Cloud resources straight after Infrastructure in the palette (#17532) f5b6e08
- Wrap a paragraph of CLOUD.md and a comment (#17532) 81c27ce
- Draw the resource tree's lists with rowList (#17532) 5a58719
Two tests of test/dev-cell.test.ts failed on any machine whose own git configuration sets fetch.prune (here a Mac with git 2.54): the fixture's
git fetch +main:refs/heads/mainsaid "cannot lock ref 'refs/heads/main'". Itsgithelper ran throughrunLocal, whose environment is the host's. It now passesgitClientEnv()(test/helpers/git-client.ts), as CLAUDE.md asks of a test's git child. The forge's own sync of a dev checkout was not affected: with the host's configuration and the fixture fixed, all 17 pass.Test: test/dev-cell.test.ts, 17 of 17 on this Mac (15 of 17 before).
No look: a test fixture Direction: tests that pass on any machine, ahead of #6534. No door: a test fixture
Co-Authored-By: Claude Fable 5 <[email protected]>
🤖 Generated with Claude Code