Skip to content

fix(artifacts): isolate cancelled PyInstaller parse attempts - #9961

Merged
morluto merged 1 commit into
mainfrom
codex/audit-pyinstaller-preparation
Nov 11, 2026
Merged

morluto merged 1 commit into
mainfrom
codex/audit-pyinstaller-preparation

Conversation

@morluto

@morluto morluto commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Summary

Allow a fresh or concurrent uncancelled PyInstaller inventory after another caller cancels parsing, while keeping private-image ownership and admission quotas correct.

Problem and expected behavior

The reader cached a rejected caller-owned parse Promise for its whole lifetime, so independent callers repeated that cancellation. Resetting only the Promise would reuse partial quota charges and private PYZ storage. A failed attempt must finish cleanup before reuse; unresolved cleanup must keep its exact owner.

Change and scope

Give each parse attempt its own signal, quota counters and existing private-image store. Adopt that state only after validated success. Typed cancellation joins private-image cleanup before releasing the attempt for a fresh caller. Failed cleanup remains retained and blocks rehydrating/reusing stale private images until reader close retries the exact owner. Physical failures, including I/O concurrent with caller abort, keep their original precedence and retry behavior.

Exactly two files. No generic preparation framework, new capability, target execution or unrelated reader migration. No linked issue: this defect was found during the source audit.

Validation performed

Pinned Node 24.22.1 on base main a6e02657e6c1533f6e21e728570aeb8601b78368:

  • New tests against unchanged main production: 6 failed, 1 physical-error control passed.
  • Temporary fixture routing through the production reader factory: the same 6 failures before; all 7 controls pass after. That fixture change was restored and is not in the commit.
  • Exact branch: 171 tests passed across eight PyInstaller suites, covering sequential/concurrent cancellation, private-image allocation, namespace quotas, failed cleanup retry, native error precedence and existing integrity/decode behavior.
  • Standalone npm run typecheck, npm run deps:check, scoped lint, formatting and diff checks passed. Five existing lint warnings remain.

Authored inert archive fixtures and local filesystem/compression operations only. No real packaged application execution, compiled CLI/MCP workflow, shared build or live-provider verification.

Dependencies and overlap

No unmerged prerequisite. Open PRs #8060 and #7716 touch an existing same-size-rewrite test to make timestamps observable; those hunks are separate from this correction and were not borrowed. uImage, UnityFS and wxapkg changes are excluded.

Author readiness

Human owner:

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

@morluto
morluto marked this pull request as ready for review November 11, 2026 04:56
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T04:58:03.392894Z e1d80e9 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@morluto
morluto merged commit b725586 into main Nov 11, 2026
14 of 15 checks passed
@morluto
morluto deleted the codex/audit-pyinstaller-preparation branch November 11, 2026 04:59
@morluto morluto added area: evidence Evidence, artifacts, and reconstruction bug Something isn't working labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: evidence Evidence, artifacts, and reconstruction bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant