Repository navigation
Defer island modules whose recorded load is deterministic (NI-7b/7d/7e/7f) - #1906
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…e/7f) Node islands stack, part 9 of 11 (scriptc-perf/results/islands-prs/PLAN.md). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
d99624a to
ec88372
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BSD script takes the command after the transcript file, needs a stdin that is not a socket, and echoes the EOF it forwards from /dev/null. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A member read in an export getter (a.b or a[b]) can invoke another accessor that runs code on every read, so the recorder now accepts only a bare identifier as a plain binding getter. Everything else keeps its runtime read and is not snapshotted. The mutation check that makes an earlier island module eager copied only data properties of a module value, so an object exported through a binding getter could stay stale when a later load changed it. The shape now reads binding getters the same way the snapshot does, and compares them by reading again, so those modules no longer defer. Corpus fixtures pin both: a getter that reads a member counts every read, and a later load that mutates a getter-exported object keeps both modules eager. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Addressed both remaining review threads in d061550. Binding getters ( Mutation detection ( The Validation on Linux in a sandbox: island harness 46/46, 68xx differential 133/133, Zero-cost gate (
An isolated run against this PR's parent (#1905 head a11b82d) is running so the recorder change is measured on its own; its log is 🤖 Generated with Claude Code |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Stack maintenance round; head is now CI root cause. Review threads here remain resolved (the binding-getter recorder fixes in Sandbox validation with a libnode pack built from the top branch's bridge (bridgeAbi 10): 🤖 Generated with Claude Code |
…deferral Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Restacked after 🤖 Generated with Claude Code |
Stacked on #1905. Last of the nine Node islands PRs. Its tree equals
int/islandsminus the separately upstreamed #1834–#1837.What it does
The deferral decision is the probe's load recording (
node-islands/probe-recorder.ts). For each candidate module it records:A module defers when its recorded load threw nothing, had no effects and read no inputs other than guarded ones: env keys and isTTY become boot guards, and so do files inside the module's own package (size and mtime). The soundness argument is in the file.
Attribution. A call belongs to the module whose load made it. Loader frames, wrappers from earlier modules and builtins acting for their caller are seen through. Getter reads during the snapshot are not part of the load; a member whose getter has inputs or effects starts Node.
Per-module evaluation. When every static island import defers, no deferred module mutates builtin state and nothing loads islands dynamically, components of deferred modules evaluate on the first use of their own stubs. Otherwise every deferred module evaluates when Node starts, in import order. A late evaluation sees the env values from import time.
A native package's top-level
require()of an island defers like a static import. Timers set and then cleared during a load are not an effect.os.homedir()andos.tmpdir()become HOME and TMPDIR guards.Node starts with
argv[0] = "node", so Node's warning hint and islandprocess.argv0read "node" as under Node.The differential harness has an opt-in
// @normalize-piddirective.Evidence
6843: two packages with disjoint closures, evaluated per module.6844: an env key read at load and changed before first use.6845: a native package requires an island at top level, andlibnode mapped: falseholds before the first call.6846: a package reads its own files at load. It defers, and touching a file fails the boot guard.6847: punycode DEP0040 from island code outside node_modules, none inside, and a package that warns at load stays eager.llvm-differential honors
// @normalize-pidtoo.Shortcuts
probe-recorder.ts.import()disable per-module mode.Gate results
node-island*.test.ts,npm.test.ts,packages/compiler/src/node-islands, differential68xx): plain 231/231 + diff 74/74; sanitized 231/231 + 74/74.pnpm lint,pnpm format:checkandpnpm test:ts7 --baselines-onlypass.packages/compiler/src/native/cli.ts --emit=llvm) builds.corpus/fs-extra-package(%m0.settleVoid). It differs in every gate of the stack, including Bound V8's stack scan by Node's own stack in Node islands #1898, which does not touch the compiler, so it is nondeterministic on the base.both-failcovers only the island programs, because the gate host has no libnode pack. Compile time stays within tolerance.CI on the first push found failures outside the focused island set: the ABI in
bridge.test.ts, the runtime ABI header declarations, the effect gate on the ts7 allowlist, weak collections in the compiler, the pipeline scout and the Node version line. The fixes are folded into the PRs that introduce each piece, and they are re-checked in a Sandbox on the final tree.Stack
#1898
#1899
#1900
#1901
#1902
#1903
#1904
#1905
→ #1906
#1907
#1908
🤖 Generated with Claude Code