Skip to content

Add opt-in Windows stream ownership for Git blob reads - #5463

Open
mihir-s-05 wants to merge 1 commit into
CrocSwap:mainfrom
mihir-s-05:research/windows-git-stream-ownership
Open

mihir-s-05 wants to merge 1 commit into
CrocSwap:mainfrom
mihir-s-05:research/windows-git-stream-ownership

Conversation

@mihir-s-05

Copy link
Copy Markdown
Contributor

A Windows Git blob reader can stay blocked after its response watchdog fires when an exited leader's descendant retains the pipe. This adds an opt-in streaming Job Object adapter, composed with the authenticated, unchanged reader from current main. In that composition, deadline and return paths stop the descendants while preserving exact binary reads, legacy fallback and consumer pauses.

This is a source-pinned implementation experiment for review. The shared production runner and selected frontier are unchanged. Production adoption remains an explicit next task.

Package, scope and reproduction · canonical claim and handoff

The adapter exposes the Popen subset used by the actual reader, reusing ywz65's isolated event gate and Job Object protocol from #2469. It assigns ownership before releasing the requested command, keeps the real stdin/stdout handles, makes watchdog kill terminate the job, and closes the job on context exit. Native structures and the gate are credited derivatives, not a newly claimed ownership mechanism.

Validation at contribution head 991da9010925914ec64a5293286edb10a7910218:

  • Native Windows 11 build 26300 / CPython 3.12.0: normal and optimized registered replays pass all 25 process scenarios each, plus assignment-denial and exact real-Git binary/duplicate controls. Running through the registered launcher also exercises nested Job Objects.
  • Four old stalled-pipe cases and four old post-return leaks are observed through retained process handles before fixture teardown. The adapter resolves the nine corresponding deadline/return/suspension cases. Separate whole-command containment controls are not credited to the reader.
  • The exported Git-free package passes the complete native optimized replay. All 13 committed files match; official export integrity and whitespace checks pass. Replay planning selects only this package.
  • Ubuntu/WSL2 / Python 3.12.3 passes six portable controls and real Git, explicitly reporting PASS_PORTABLE_CONTROLS_WINDOWS_NOT_RUN. --require-windows rejects reduced coverage. A disposable source-byte mutation rejects before fixture launch.

Normal receipt · optimized receipt · portable receipt

python -I -W error -B research/windows-git-stream-ownership/verify.py --require-windows
python -B scripts/research_package.py --package research/windows-git-stream-ownership

Limits: controlled Python producers reproduce the process/pipe boundary; no naturally stalled installed-Git incident is claimed. Other Windows/Python environments, restrictive enclosing-job policies, owner death during setup, general Popen compatibility and spawn-error diagnostic equivalence remain untested. The selected cold replay and full-history provenance preflight were not run. Hosted CI and independent review remain separate from these local receipts.

Started and refreshed against canonical main 32890bc5de034ab8fc93ac88ead7279a6a416d04, priority revision 7. Final overlap covered 332 open PRs, 4,732 Discussion records and all 7,402 tracked in-scope notes, with complete reported pagination/inventory. The two concurrent baseline-audit claims surfaced during refresh; this contribution released that duplicate scope and supplies the complementary adapter. #5461 and the published probe at 7a9a2b67e1967ba31b7330031daae186d6b87a86 retain their diagnosis credit.

Credit ywz65 (#2469/#2452), Brian / JoyboyBrian (#4738/#5185), Nick Petalas (#2752), Mihir Srivastava's Windows successors, Douglas Colkitt, Paul Romeo, yssite, Arham Tahir, Woklerx, Tekalign and the retained source lineage. Prepared for Mihir Srivastava with substantial OpenAI Codex assistance, one agent; Apache-2.0, license and notices included. No new kappa or mathematical acceptance is claimed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant