Repository navigation
fix(map-store): bound and never-prompt the partial-clone checkout - #1428
Conversation
Sparse checkout after a filter clone is where the trees and blobs are fetched. Run those commands through networkGit so a stall fails after gitTimeoutMs and can be retried as infra. Fixes #1410.
|
Note Synthetic action dogfood receipt. This report is the final deliberately failing fixture in the action contract suite. It proves that unproven evidence is rejected; it does not certify this pull request. 🗺️ StyleProof report📊 View the side-by-side visual report →Coverage, determinism, report/diff consistency, or Change Reach ( |
|
Note Live StyleProof-on-StyleProof (advisory). This report is captured from the surfaces declared in 🗺️ StyleProof reportNothing changed, so no report was uploaded. The verdict is in the run summary. Advisory-only mode: no reviewable changes detected — the StyleProof dogfood check remains green. |
Why
Map-store checkout of a partial clone runs
git sparse-checkout setandgit checkoutthrough the plaingit()helper, which has no timeout and allows terminal prompts. On a filter clone that checkout is where the trees and blobs are actually downloaded. A stalled remote therefore hangs until the CI job timeout, instead of failing aftermapStore.gitTimeoutMsand being retried as an infra fault, asls-remoteand clone already are.Fixes #1410.
What changed
checkoutSparseSegmentnow takesgitTimeoutMsand runs both commands throughnetworkGit, which sets the timeout andGIT_TERMINAL_PROMPT=0.gitFailureMessage, so a stall surfaces asETIMEDOUT.restoreMapStoreAttemptstill classifies that asinfra, andretryBlockingretries it.ls-remote, and default timeout values are unchanged.spawnSyncwith a 37 ms timeout: both commands are asserted to be bounded and never-prompting, and a simulated stall on either command is retried twice with the timeout message preserved.Reviewer view
Proof
pnpm run build && node --test test/map-store-checkout-timeout.test.mjs— red 3 failed (timeout undefined vs 37); green 3 passed, 0 failed, about 0.6s.sparse-checkout setor the branch checkout still run throughgit()with no timeout or with prompts allowed; or if a timeout on either command is no longer retried as an infra fault.Behaviour changes
gitTimeoutMsand is retried as infra, instead of hanging until the job timeout. Successful checkouts are unchanged.Not asked for
ls-remote, default timeout values, or clone filters.Review guide
checkoutSparseSegmentinsrc/map-store/git-transport.ts.test/map-store-checkout-timeout.test.mjs.Verification summary
Commands run:
pnpm run build;pnpm exec prettier --write src/map-store/git-transport.ts test/map-store-checkout-timeout.test.mjs;node --test test/map-store-checkout-timeout.test.mjs.Results: red 3 failed; green 3 passed, 0 failed. Raw insertions versus
origin/mainafter prettier: 61/400 (src/map-store/git-transport.ts5, new test 56). CHANGELOG is excluded from that cap.Unrelated failures: none in the focused run.
Known risks or skipped checks: the tests stub
spawnSyncrather than stalling a real git transfer. Standalonepnpm run verifywas not run for this rebase; verification below records the actual hooks-on gates. One browser test was skipped by the suite; CI owns remaining verification.Hooks-on rebase push: anti-slop lint and build passed; affected unit tests 4006 passed, 0 failed, 0 skipped (300.387s); browser E2E 1267 passed, 1 skipped (9.6m). Push passed with hooks enabled. Start 2026-11-16 20:09:39 GMT; end 20:24:36 GMT (Europe/London), total 14m57s.
Rebased head:
d7cae72e7914e7087c3de790af4f63afe0f4414fonto main48dbb25d709fa3f7dcfaac76bb4d354dd56134ca; no conflicts or fixes.