Repository navigation
fix(artifacts): cancel idle .NET bundle member streams - #11065
ShuaixinHuang wants to merge 2 commits into
Conversation
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[Medium impact] The PR appears safe to merge; no actionable defects were established. SummaryUpdates
Acknowledgments: ShuaixinHuang explicitly retains non-interruptible native-read settlement. ShuaixinHuang also identifies the earlier cleanup/final-stat failure replacement as corrected and resolved; it is not reported again. Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Caller aborts] --> B{Native read pending?}
B -->|Yes| C[Descriptor reader waits for read]
C --> D[Keep read error or report cancellation]
B -->|No| E[Report cancellation]
D --> F[Close outer member stream]
E --> F
G[Generator body fails] --> H[Record failure before decoder cleanup]
H --> F
F --> I[Close input and decoder]
I --> J[Remove listeners when outer stream closes]
Reviews (1) · Last reviewed commit: "fix(artifacts): preserve .NET stream fai..." · Reviewed by Greptile |
Summary
Cancel .NET bundle member streams while consumers are idle or backpressured, preserving exact cancellation reasons and the established precedence of I/O, validation and cleanup failures.
Trigger and ownership fix
DotnetBundleArtifactReader.open(entry, signal)returnsReadable.from()over an async generator. Cancellation was checked only when that generator advanced. Aborting afteropen()or after buffering a chunk left the outer readable alive until its consumer resumed, for both stored and raw-DEFLATE members.The outer readable now observes cancellation and input/decoder failures independently of consumer demand. The existing descriptor reader retains ownership of pending native reads. Failures from the generator body are recorded before
for-awaitcloses the decoder, so cleanupAbortErrorcannot replace an already observed cancellation or size refusal. Final source validation similarly settles its I/O outcome before late cancellation; stream, signal and decoder listeners remain owned through readable closure.Iterator and event failures share one projection. Parsed manifests, resource limits, paths, artifact identity, CLI/MCP schemas, package metadata and authority remain unchanged. This is an existing static-reader correction; no maintainer scope decision or new provider, target execution, injection or network capability is involved. Related #10111 covers separate Bun/PyInstaller pump finalization. No duplicate .NET fix was found; the reproduction is contained in this PR rather than a separate issue.
Regression evidence
limitand no-published-output assertions. No duplicate module/CLI golden.9c86465d47e98306e1ee1f77e7fb25d1d737b1db: 8 failed / 47 passed, 55 tests. All eight idle-cancellation cases failed; the failure-precedence controls passed.f5d1324b4: the updated boundary file produced 2 failed / 10 passed, reproducing cleanup-error replacement and final-stat EIO replacement. Both were corrected in5e028f8bb208ecec3232392bc329365cd969abbb, explained with evidence in the thread, then resolved.limitfor 65,536 / 300,000 / 2,000,000 expanded bytes, repeated and random data. A controlled final-stat probe retainedio, the EIO code and the identical failure object.Current-head validation and limits
Pinned Node24.22.1/npm11.16.0.
npm run check:fastand the six static components (typecheck,lint,format:check,knip,metadata:checkwith their dependencies) — passed.npm run verify:architecture-guards— passed across 2,761 source files;npm run knip:production— passed, with its advisory candidates retained.npm run verify:test-discovery— all 3,495 test files discovered exactly once.git diff --checkpassed. All three public5e028f8bbblobs match the checked local inputs.node scripts/ci/static-check-report.mjs typed-lint <batch files>runs. Exact per-batch discovery, total file coverage and final input/config hashes were verified, with no duplicates, omissions or changed inputs. Resource settings:GOMAXPROCS=1 GOGC=25 GOMEMLIMIT=1536MiB NODE_OPTIONS=--max-old-space-size=1536.An initial-head monolithic
npm run checkreached its final typed-lint stage and received SIGKILL in this 8 GiB environment. A complete single invocation is not claimed to pass; current-head components and the separately partitioned full typed inventory are reported individually. Earlier superseded qualifications are kept separate, including one stopped after self-review reproduced the expansion-error regression. No GitHub CI was cancelled or retried.These are self-owned format fixtures, real descriptor/stream/zlib operations, and compiled CLI/stdio MCP workflows, with controlled descriptor failures for competing outcomes. No real
dotnet publishapphost corpus, .NET runtime, Windows runtime or target assembly execution was qualified. Native reads retain their existing non-interruptible settlement semantics.Current-head CI 43369746017, attempt 1, completed successfully on
5e028f8bb208ecec3232392bc329365cd969abbb: 17 successful jobs and 23 configured skips (40 jobs total). Configured skips are not counted as passes. Automatic code review completed on5e028f8bb208ecec3232392bc329365cd969abbbwith no findings and no unresolved threads. The original verified P1 was explained and resolved after the fix; human Author readiness remains separate.Author readiness
Human owner: @ShuaixinHuang
The owner explicitly declared this PR reviewed and ready for initial review on 2026-11-13 (Asia/Shanghai), for head
5e028f8bb208ecec3232392bc329365cd969abbb. This records initial readiness under CONTRIBUTING and does not claim review of future commits.Resubmission
Re-submitted after closing the previous PR; source branch and validated change are unchanged.