Skip to content

fix(resolve): defer inline entry package scope validation - #91

Merged
steipete merged 1 commit into
mainfrom
claude/w112-inline-package-scope
Oct 3, 2026
Merged

steipete merged 1 commit into
mainfrom
claude/w112-inline-package-scope

Conversation

@steipete

@steipete steipete commented Oct 3, 2026 •

Copy link
Copy Markdown

Stdin and eval scripts currently reject malformed ancestor package metadata before executing, so a bootstrap cannot produce its own JSON diagnostic. Fork #86 added the eager post-resolution scope check. Exempt the actual inline source path, defer runtime package-parser diagnostics, and preserve Node's CommonJS parent-scope check when require() actually resolves a request. Bun's stdin environment and PATH setup remain intact.

The regression covers explicit stdin, eval, bun run -, and implicit Node-alias stdin, including builtins, script-owned rejection, relative CJS resolution, JS imports, CJS imports, and a nearer valid package scope. All 48 cases fail on unpatched main and pass patched. The exact source programs match Node 24.21.0. Linux CLI/resolver suites pass 309 tests with zero failures; all 12 Rust targets pass with no skips.

The final Linux W96 944 metadata + 376 package-map + 14 scope cases show zero baseline changes and zero Node outcome/code/message differences. Linux OpenClaw crabbox-untrusted-bootstrap.test.ts improves from 24/25 to 25/25; Node 24 passes 25/25. Both local and committed-branch P2 reviews are scoped-clean. Exact-head fork CI: https://github.com/openclaw/bun/actions/runs/37117626781.

Upstream searches found no inline-entry fix. The correction was added to the existing Node 24 package-validation submission, oven-sh#44512, at f6d56a01d83895fd8fcf147abfdcf8bdaf83178c, preserving its concurrent built-in import fixes. That upstream build passes 337 tests and all 1,334 oracle cases without differences.

@steipete
steipete merged commit 45ad44f into main Oct 3, 2026
12 of 13 checks passed
@steipete
steipete deleted the claude/w112-inline-package-scope branch October 3, 2026 11:02
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