Repository navigation
test(core): guard boot work counts for catalog lookups, Azure clones and git spawns - #58892
Conversation
There was a problem hiding this comment.
The new test runs the same way every time and catches the regressions it guards. I ran it 12 times (some under CPU load) and the counts never changed. With #58601 and #58600 reverted locally it fails with a clear drift report (catalog lookups per step 1 → 6, Azure model edits 0 → 156) and lists every git spawn. tsc -b on core is clean.
Public API is unchanged; the change is test-only.
No blocking concerns. One note: on Linux CI, git is never looked up on PATH, so the git-lookup and resolved-path checks always pass there. Only the macOS and Windows runs exercise #58602's part, which the test's comment already says.
There was a problem hiding this comment.
The follow-up is fine. It allows one git PATH lookup, for the Windows Git Bash lookup. A regression back to a lookup on every spawn would still fail the test, since that adds about 17 lookups. The test still passes repeatedly on Linux and tsc -b on core is clean.
Public API is unchanged; the change is test-only.
No blocking concerns. Minor: the extra lookup is allowed on every platform, not only Windows, so a single new git lookup on macOS would go unnoticed.
What it does
Adds a test that counts the work done by a cold folder boot plus one session turn. It fails if a speedup from #58600, #58601 or #58602 regresses. It asserts exact counts, not timings.
How it works
TestLLM. Nothing goes over the network.ChildProcessSpawner;Model.Service;PATHlookups, through a spy onwhich.sync.Risk
Test only, no
srcchanges. A legitimate new git spawn or catalog lookup fails this test until the expected number is updated, which is the point.Proof
bun run script/test.ts test/boot-work.test.tsandbun test, with the same counts across 6 repeated runs.bun typecheck(core), oxlint and prettier are clean.