Repository navigation
fix(artifacts): preserve cancellation ownership and map source identity - #10111
ShuaixinHuang wants to merge 3 commits into
Conversation
Codex Review Summary: ✅ CompletedThis 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f2a70cd280
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
fb039eb to
9b4703f
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9b4703f40e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
9b4703f to
8c3532b
Compare
8c3532b to
bd10b79
Compare
Superseded by #10616 at the author’s explicit request. This is the same contribution rebuilt and revalidated on main; review and verification history are retained below.
A completed producer could leave unread Bun or PyInstaller member bytes alive after cancellation or reader shutdown. Separately, release audit could lose or falsely retain a distinct NFC/NFD linker-map source when JavaScript and HTML declared targets sharing a lookup key. This PR fixes the producing ownership rules, rebased onto main
653c49419.Trigger, root cause and repair
reader.close()returned while those bytes could still be read. Keep the operation and listener owned until the readable closes. Late cancellation destroys it withArtifactReaderFailure("cancelled")and the exact caller reason. PyInstaller joins both producer and retirement settlements, including failure paths. Verification/private-file cleanup still owns accepted native work; established source/inflater errors retain precedence, including before their error events forward them.The PyInstaller follow-up belongs here because it reproduces the same producer-completion/readable-retirement defect as the existing Bun change. No second PR was opened. Related reader adapters, scope ownership, private-source cleanup, prefix inspection and CLI/MCP consumers were inspected. The new 13 cases cover actual plain/compressed CArchive readers, null/object cancellation reasons, reader shutdown, completion/listener retirement, and injected source EIO and real zlib failures. Direct helper controls exercise completion and event-forwarding stages that a consuming CLI cannot reliably pause at.
Identity regressions cover early/late/repeated declarations, both map/HTML orders, separately declaring both spellings, an exact guess produced after an early HTML declaration, and a missing canonical target with two equivalent source spellings. Compiled CLI controls cover preserved source identity and removal of false exposure. Both earlier verified review findings remain addressed (initial identity finding, late exact-candidate finding). No new provider, target execution, schema, cache or dependency.
Executed validation
Linux; pinned Node 24.22.1 / npm 11.16.0, normal locked dependency installation:
653c49419, production unchangedThe 22-suite run includes all nine PyInstaller suites, PyInstaller compiled CLI and SDK MCP boundaries, release-exposure reader/Bun/graph/compiled CLI/filesystem/SDK MCP/domain/service, plus resource-scope and hash tests. The PyInstaller MCP tests use the SDK's in-memory transport; no stdio qualification is inferred from them. Real Node file handles/zlib are exercised; target programs are not executed.
All seven changed files: same-config type-aware lint 0 errors / 42 advisory warnings. Formatting,
git diff --check, normal commit/pre-push hooks and final seven-file checksums passed.npm run checkcompleted six static tasks, architecture guards and production reachability, then the whole-repository type-aware lint worker was SIGKILLed at the 8 GiB host limit; the complete command did not pass. Separately, same-configuration type-aware lint in 15 serial batches covered all 7,208 tracked JS/TS inputs: 0 errors / 4,988 advisory warnings. Batch input union/counts were verified with no omissions or duplicates. This resource-bounded qualification does not turn the failed monolithic command into a pass.Core main reproduction (copy only the final test files to the clean base first):
CI and verification limits
Current head
bd10b79459383251d9a0004b7fe0397cbcb77df6: CI 43217381581, attempt 1, completed successfully: all 40 jobs accounted for, 17 successful / 23 configured skips, no failures or cancellations. Source checkout was mergea8406b35cof this head into653c49419; both parents were verified.Deep static checks, documentation, Python producer tests, native Windows/macOS package/runtime qualification and other unselected optional lanes are not counted as passes. No older head's successful lane qualifies this head.
Historical head
8c3532ba2passed CI 43128858199 and exact-head automated review. Those results, the older 660-pass local run and earlier package/whole-corpus qualifications do not validate this follow-up head. Earlier failures and logs remain retained; no retries, deadline increases, production trust-rule changes, result filtering or test weakening were introduced.Historical lifecycle checks exposed UID-mapping and unreaped-orphan host failures; unchanged suites passed with real UID metadata and an external subreaper. That older host qualification is not rerun or claimed for the new base. Likewise, no fix is claimed for earlier cancelled HTML/SVG/Kuna or Windows registration timeouts. Already-merged fixture/Process CLI repairs, including #10147, were not replayed.
Bun and PyInstaller fixtures are inert source-owned executable/archive fixtures. No real Bun or Python target execution, native Windows/macOS or Windows Shell/ACP qualification was performed. Unicode coexistence controls skip on filesystems folding the two spellings. Optional skipped CI lanes do not count as passes.
Author readiness
Human owner: @ShuaixinHuang
The owner explicitly reviewed
4febdbed6, its evidence and limitations, and declared initial readiness on 2026-11-12 (Asia/Shanghai). On the same date, the owner explicitly confirmed review of the then-current head8c3532ba2and requested that the PR be ready for review. This records the owner's statements for those commits; the validation limits above remain documented.The human owner subsequently explicitly confirmed review and requested review readiness for the current head
bd10b79459383251d9a0004b7fe0397cbcb77df6on 2026-11-12 (Asia/Shanghai). This records that statement for this head, without attesting to future code.