Repository navigation
Fix Windows closed-pipe errors in Git source-pin fallback - #4686
Merged
Mister-Meeseeks merged 1 commit intoOct 22, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change and mathematical scope
When the Git
--batch -zprobe exits before its first stdin write on native Windows, CPython can raiseOSError(EINVAL)at flush and again at close. The current reader handles onlyBrokenPipeError, so the older-Git fallback aborts before reading any pinned source.Recognize this closed-stdin error only on Windows, at the request and cleanup boundaries. The existing first-request/no-response/exit-129 retry gate, exact blob validation and one-pass iterator remain intact. Other errors still propagate, and a failed legacy reader cannot trigger a third process.
Three files: the small reader fix, six behavioral tests, and a source/evidence note. Tooling only; no changed source pins, frozen packages, selected frontier or new κ.
Task and overlap
b58ad9ef4d4e861b0eaa5dba41742bdc072dca51, priority revision 7.de93ebd044d0b00a8647a9f47f86939a6b18b9aa.portable-replay, scope changed from regenerated-payload comparison to a reproduced platform failure in immutable-source verification. Picker seed and bounded question/stop rule are in the note.73406fd73ebaf8361b51674fad5e0b02a26db075, which explicitly left Windows untested.Validation
Before: the unchanged native compatibility module reports eight passes, one error and one existing CR/LF-path skip. Its exited-child test produces the real Windows errno-22 failure. The final six new tests against an exact copy of the base reader produce eight error subcases.
After, with
-W error -B, both ordinary and optimized-Oruns:The unchanged registered compatibility hook also passes metadata/pins and all 38 currently discovered Git-reader tests on Linux:
The new tests cover write/flush/close errors, binary/empty/duplicate blobs, independent object IDs, single iterator consumption, closed streams and reaped children. EIO, POSIX EINVAL, exit 0/7, post-response failure and legacy-reader failure remain rejecting controls. Only option rejection and the injected error variants are simulated; real Git supplies successful fallback bytes.
git diff --checkpasses.The shared-control planner selects all 2,480 registered packages. Its policy is unchanged; those broader scientific replays were not run locally. An initial broader Windows onboarding run hit existing fixture errors and was stopped; the sparse selected baseline also lacked its complete input closure. No complete onboarding, selected cold replay or hosted CI pass is claimed.
Credit
Nick Petalas (#2752) supplied the fallback and original tests; Douglas Colkitt the runner contracts; Arham Tahir the NUL pin batching; Woklerx the streamed-reader and cleanup lineage. Maxime Fleury's reproducibility work and the original P104/Abhinav Ramachandran reports retain their credit.
Prepared for Mihir Srivastava with substantial OpenAI Codex assistance, one agent. Apache-2.0.
Open next questions
Run the three reader modules against an actual older Git for Windows in a disposable fixture. That binary is not installed here; this repair uses the predecessor's controlled unsupported-option probe. Synchronous pipe-read deadlines and arbitrary Git/Python-version support remain separate obligations.