You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
require() of a builtin demotes process.nextTick below promise microtasks #9412
require("path");// <-- delete this line and perry matches nodeconsto=[];process.nextTick(()=>o.push("nextTick"));Promise.resolve().then(()=>o.push("p1"));(async()=>{awaitnull;o.push("await");})();setTimeout(()=>console.log(JSON.stringify(o)),20);// node: ["nextTick","p1","await"]// perry: ["p1","await","nextTick"]
process.nextTick callbacks must run before promise microtasks. After any require() of a builtin, perry runs them after.
Deterministic: 5/5 with the require, 3/3 matching node without it.
Why no fixture caught it
Every real bundle requires builtins, and every minimal fixture doesn't — so the ordering is correct in exactly the programs a test suite contains and wrong in exactly the programs users run.
Excluded from this report
setTimeout-vs-setImmediate ordering also differed, but node is itself nondeterministic there, so it is not filed as a bug.
Found by a differential stress-test of claude-code under perry.
Activity
fix(runtime): an Error subclass has a .stack and an [object Error] ta…
proggeramlug commentedon Sep 2, 2026
Closing: fixed on main (fragment 9412-cjs-entry-next-tick-order.md, fixtures test_gap_9412_*), landed via #9443.