Repository navigation
fix(native): honor cancellation during PE alias expansion - #9063
Conversation
Advance export parsing at its cooperative checkpoints so queued cancellation is observed before publishing a complete inventory. Preserve the exact caller abort reason and the existing resource owner. Add matching checkpoints to PE name, address and alias traversal, with real-byte regression coverage for ELF symbols, GNU version records and PE tables.
Codex Review SummaryThis 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 issues were found. SummaryAdds a cancellation checkpoint every 1,024 output rows while expanding PE aliases.
Reviews (7) · Last reviewed commit: "Merge commit 'aeea7c25ede5c5e6b16198e60c..." · Reviewed by Greptile |
|
I checked how this change ( I also exercised the overlap with a sectionless GNU-hash ELF containing 8,192 exports. An abort queued during the bucket scan returned @morluto, both PRs now pass |
|
TL;DR: I ran the PR's one changed test file on Node 22.23.4, 24.22.1 and 26.12.1. All 6 tests passed on each version. With the two source files put back to the merge base, all 6 failed on each version. Edit (20 Nov): I ran the new head, c1df0d1, in a VM, and the results are here.
The test file is The PR changes 3 files against the merge base. They are the 2 source files above and the test file. The head is 178 commits behind main c78c8ae. CI on the head, read live. GitHub shows mergeable true and state clean.
Not run
Test setupCommandsnpm ci --offline
npm run test:prepare
xvfb-run -a npm run test:focused -- tests/boundary/filesystem/nativeExportsCancellation.test.ts🤖 Written and tested with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊 |
Merge current main, retain typed parser failures, and adapt cancellation regressions to reserved-symbol validation.
|
Merged All 89 related tests, scoped TypeScript checking, changed-file lint/format, discovery and diff checks passed. I also combined this head with #9083 at The author declaration now matches the repository's required wording. The description separates the current source-based checks from older validation; complete locked-install/build/workspace coverage is tracked in new-head CI. |
Use the supported compact profile in the Windows environment-spelling regression. Keep the exact environment assertion so a duplicate uppercase key still fails, and retain separate coverage rejecting the removed full profile.
|
The inherited Windows Kimi fixture blocker is fixed in Only the fixture's supported profile value and title changed in this follow-up. The cancellation implementation and its six real-byte regressions are unchanged, and the scoped Windows control still rejects a duplicate uppercase environment key. The PR description now records the completed current-head CI result. Ready for final maintainer review and merge if the change looks good. |
|
Integrated main The PR is mergeable again. Current-head CI is running; the body records the validation scope and remaining gaps. Current-head CI passed. |
Keep current main's cooperative ELF directory and provider resource owner. Consume PE name, address, and alias checkpoints through the same cooperative parser, while retaining the synchronous wrapper and all six cancellation regressions.
|
TL;DR: I ran the PR's test file on head c1df0d1. All 6 tests passed on Node 22.23.4, 24.22.1 and 26.12.1. With the parser swapped back to the merge base, 3 of 6 failed on each version. Findings
Not run
Test setupCommandsnpm ci --offline
npm run test:prepare
xvfb-run -a npm run test:focused -- tests/boundary/filesystem/nativeExportsCancellation.test.ts🤖 Written and tested with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊 |
Integrate main ca26f2a and preserve its positional PE/ELF parser. Add the remaining cooperative checkpoint to PE alias expansion and adapt the real-byte service regressions to current composition and ELF traversal boundaries.
|
Integrated current main With the main parser unchanged, the updated six-case real-byte service regression had 1 failure / 5 passing controls: the alias path visited all 4,096 aliases before observing cancellation. The candidate passes all six, and 100 tests across the complete parser and filesystem suites passed. The normal runtime/skill build, GitHub now reports the branch conflict-free. New-head CI is running. |
…063-native-alias-cancellation * commit 'aeea7c25ede5c5e6b16198e60c0eb0475ff6f5d8': (881 commits) fix(hopper): clarify publisher verification failures fix(analysis-view): keep PTX text pages on Unicode boundaries (morluto#15222) feat(mcp): advertise each tool's family in tools/list _meta (morluto#7154) perf(evidence): inspect retained records without building a bundle (morluto#15219) fix(process): report denied inspection as typed cleanup failures (morluto#9261) perf(mcp): complete retained Evidence without rebuilding bundles (morluto#15210) fix(agentenv): stop dry-run tarball reads on cancellation (morluto#15205) perf(png): reuse scanline storage in screenshot comparisons (morluto#15215) fix(javascript): respect Node HTTP path validation (morluto#9684) fix(windows): reject native addons with unusable delay-import tables (morluto#15216) feat(artifacts): inventory Android super image metadata (morluto#14928) fix(paths): reject dotted console device names for portability (morluto#15220) fix(analysis-view): return continuation for GPU pages at the byte limit (morluto#15206) fix(screenshots): report the PNG comparison memory allowance (morluto#15217) fix(process): compare Windows server paths by native realpath (morluto#15044) fix(firmware): recheck decoded member source on completion (morluto#15211) fix(artifacts): check signed BC4 and BC5 DDS payload extents (morluto#15208) fix(artifacts): bound embedded GLB images by the declared buffer length (morluto#15207) perf(ci): confirm test-only macOS selection on Linux (morluto#15203) fix(paths): reject Windows console device names (morluto#14972) ...
|
Thanks for the careful cancellation regression! Merged after the exact-head checks and canonical review passed. |
…410-windows-transport * commit '28772e67d245661b4a66ef5a09353eafda483367': (674 commits) docs: note symlink EPERM in Windows source test failures (morluto#7211) fix(javascript): scope candidate this event receivers (morluto#4656) fix(config): validate target and loader options before printing MCP registrations (morluto#9279) fix(native): honor cancellation during PE alias expansion (morluto#9063) fix(audit): preserve env shebang argument ownership (morluto#14075) feat(evtx): inventory Windows event log records offline docs(skill): replace the staged workflow with the rules it encodes (morluto#10374) fix(hopper): clarify publisher verification failures fix(analysis-view): keep PTX text pages on Unicode boundaries (morluto#15222) feat(mcp): advertise each tool's family in tools/list _meta (morluto#7154) perf(evidence): inspect retained records without building a bundle (morluto#15219) fix(process): report denied inspection as typed cleanup failures (morluto#9261) perf(mcp): complete retained Evidence without rebuilding bundles (morluto#15210) fix(agentenv): stop dry-run tarball reads on cancellation (morluto#15205) perf(png): reuse scanline storage in screenshot comparisons (morluto#15215) fix(javascript): respect Node HTTP path validation (morluto#9684) fix(windows): reject native addons with unusable delay-import tables (morluto#15216) feat(artifacts): inventory Android super image metadata (morluto#14928) fix(paths): reject dotted console device names for portability (morluto#15220) fix(analysis-view): return continuation for GPU pages at the byte limit (morluto#15206) ...
Summary
Honor cancellation while expanding thousands of PE aliases for one address-table slot. The shared
parsePeExportStepsgenerator now yields before the first alias and every 1,024 exported rows, so queued cancellation reaches the file-backed consumer promptly. Complete synchronous parsing retains the same output.Main already contains the other cancellation checkpoints from #13951. This PR adds the remaining alias-loop checkpoint and keeps the shared parser/composition owners.
Validation
ac057b23796a496431c6df24e65100e14a5cde79, integrated with pinned mainaeea7c25ede5c5e6b16198e60c0eb0475ff6f5d8.Author readiness
Human owner: @Afloat16
The author owns this contribution and requested its submission for maintainer review.