Conversation
First node-suite coverage for node:process (12 cases). The core API works and passes: process object shape, platform/arch (host enums), pid, env reads + absent-key undefined, cwd() absolute string, version 'v'-prefix + versions object, argv string-array shape, and process.nextTick(cb) ordering. Five cases pin real gaps, tracked in #1330 + test-parity/known_failures.json: - shapes/method-types + nexttick/is-function: typeof process.<method> is not 'function' (the call forms work; member-read-as-value reflection gap) - env/write: process.env.X = v doesn't persist (assignment lowering) - hrtime/tuple: process.hrtime() direct call unwired (only .bigint() exists) - props/string-props: argv0/execPath/title read as number, not string Tests use the global `process` (the primary API and the better-supported path in Perry; the default import exposes fewer members — folded into #1330). 7/12 pass.
…, argv0/execPath/title Closes the five node:process gaps surfaced by the granular node-suite (now 12/12). All changes are additive and scoped to `process`. - Method values read as functions (#1330 gap 1): route `process.cwd`/ `nextTick`/`hrtime`/`exit`/`on`/`once`/`uptime`/`memoryUsage`/ `cpuUsage`/`kill`/`chdir` reads (bare-global GlobalGet sentinel) through `js_native_module_property_by_name("process", …)` and add the pairs to `is_native_module_callable_export`, so `typeof process.cwd === "function"`. The call forms still lower to their dedicated HIR variants. - process.env writes/deletes (gap 2): `process.env.X = v` lowers to `js_setenv` (writes the real OS environment that EnvGet reads, coercing the value to a string like Node); `delete process.env.X` lowers to `js_removeenv`. Pre-fix the write hit the cached js_process_env() object EnvGet never consults, so it never round-tripped. - process.hrtime() (gap 3): new `Expr::ProcessHrtime(Box<Expr>)` + `js_process_hrtime` returning a [seconds, nanoseconds] integer tuple off the existing monotonic baseline; the diff form `process.hrtime(prev)` is non-negative. `process.hrtime.bigint()` is still intercepted earlier. - argv0/execPath/title (gap 4): exposed as string properties via get_native_module_constant("process", …). Removes the five known_failures.json entries (they flip to PASS).
This was referenced May 22, 2026
proggeramlug
added a commit
that referenced
this pull request
May 22, 2026
…, resource/memory metrics, features/config, ...) Audit follow-up to make node:process coverage exhaustive. Now 40 cases. After #1371's fixes (method typeof, env write, hrtime(), argv0/execPath/title all PASS — their known_failures entries removed), the suite is 24/40. New passing: ppid, stdout/stderr fds, stderr.write, versions.v8, nextTick returns undefined. 12 new gaps, each tracked by its own granular issue in known_failures.json: EventEmitter API on/emit/listeners (#1372), umask (#1373), abort (#1374), emitWarning (#1375), resourceUsage/getActiveResourcesInfo (#1376), availableMemory/constrainedMemory (#1377), features (#1378), config (#1379), allowedNodeEnvironmentFlags (#1380), versions sub-fields (#1381).
This was referenced May 22, 2026
proggeramlug
added a commit
that referenced
this pull request
May 23, 2026
* feat(process): implement process.abort() (#1374) `typeof process.abort` reported `"undefined"` because `process` lowers to the `GlobalGet(0)` sentinel and the value-read path had no route for the `"abort"` property. The call form fell through to the generic NativeMethodCall dispatch (no-op). Wire it up via the established pattern (mirrors how #1371 handled cwd / nextTick / exit etc. on the process-node-suite branch): - New `Expr::ProcessAbort` HIR variant; native_module.rs lowers `process.abort()` to it. - Codegen calls runtime `js_process_abort`, which raises SIGABRT (`libc::abort()` on unix, `std::process::abort()` elsewhere). - For the value-read form (`typeof process.abort`, `const f = process.abort`), PropertyGet routes the GlobalGet receiver + `"abort"` property through `js_native_module_property_by_name("process", "abort")`, and `is_native_module_callable_export` returns true so the helper hands back a bound-method closure (typeof "function"). - api-manifest gets a `method("process", "abort", ...)` entry so the compile-time typeof short-circuit and SBOM audit see the surface. - New parity case `node-suite/process/methods/abort` verifying `typeof process.abort === "function"`. * docs(api): regenerate manifest after process.abort entry
proggeramlug
added a commit
that referenced
this pull request
May 23, 2026
…e_parity.sh First exhaustive node:process suite on main: 60 granular cases (39 pass / 22 fail) covering shape, platform, env, cwd, version + versions sub-fields, argv, nextTick, hrtime + bigint, props, memory + rss + available, cpu + threadCpuUsage, uptime, stdout/stderr fds + write, global identity, release, exec-argv, exit + exit-code, events (on/emit/listeners), methods (umask/abort/emit-warning/kill/chdir/get-builtin-module/load-env-file/ source-maps-enabled/dlopen/ref-unref/exit), resource (usage + active), features, config, ipc (connected/send-disconnect), report, allowed flags, title, sub-fields, unix uid/gid, module-load-list, finalization, exception uncaught-capture, shapes ppid/debug-port/method-types/process-object/ module-load-list, exit-code, hrtime tuple form. 22 failing cases tracked in known_failures.json with granular per-gap issue references. Method-value reflection (#1343), env-write (#1344), hrtime() tuple (#1345), and argv0/execPath/title (#1346) were originally fixed in #1371 but that PR merged into the #1331 branch only — #1331 was rebased onto current main and those fixes were dropped; the issues are reopened. Adds run_module_parity.sh: thin wrapper that runs ./run_parity_tests.sh --suite node-suite --module <m> for a list of modules (default: process + perf_hooks) and prints a combined per-module + total summary.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1330. Stacked on #1331 (the granular
node:processsuite) — base will auto-retarget tomainwhen #1331 merges.Implements the five
node:processgaps the suite pinned. The process module is now 12/12 innode-suite/process; the fiveknown_failures.jsonentries are removed (they flip to PASS).Gaps fixed
Method values read as functions.
typeof process.cwd/nextTick/hrtime/exit/on/uptime/memoryUsage/cpuUsageis now"function". Bareprocesslowers to theGlobalGet(0)sentinel, soprocess.<method>reads (not calls) are routed throughjs_native_module_property_by_name("process", …)— the same machineryos/tty/perf_hooks/consoleuse — with the pairs added tois_native_module_callable_export. The closure is a real function value (also fixesconst f = process.cwd). The call forms still lower to their dedicated HIR variants and never reach this path.process.envwrites/deletes persist.process.env.X = vnow lowers tojs_setenv, which writes the real OS environment (the storeEnvGet/js_getenvreads) and coerces the value to a string like Node (process.env.N = 42→"42").delete process.env.Xlowers tojs_removeenv. Pre-fix the write hit a field on the cachedjs_process_env()object thatEnvGetnever consults, so it silently never round-tripped.process.hrtime()direct call. NewExpr::ProcessHrtime(Box<Expr>)+js_process_hrtime, returning a[seconds, nanoseconds]integer tuple off the existing monotonic baseline. The diff formprocess.hrtime(prev)is non-negative.process.hrtime.bigint()is still intercepted earlier (nested-namespace dispatch).argv0/execPath/titleare exposed as string properties viaget_native_module_constant("process", …).Validation
./run_parity_tests.sh --suite node-suite --module process→ 12/12 PASS, byte-identical tonode --experimental-strip-types.env/writeandhrtime/tupleoutputs verified equal to Node.perf_hooksstays at its known baseline (31 pass / 2 known fail: node:perf_hooks — typeof PerformanceObserver instance methods reports wrong type (native-class member read lowers as a call) #1320, node:perf_hooks — globalThis.performance is not identical to the node:perf_hooks named import #1327) — the suite that sharesnative_module.rsmost heavily — confirming the additive"process"arms don't disturb other modules. Remainingos/consolenode-suite failures are pre-existing (namespace-identity semantics and console error/[cause]formatting), unrelated to this change.cargo fmt --all --checkclean;cargo build --release -p perry-runtime -p perry-stdlib -p perrygreen.Notes
cpuUsagehas no call lowering yet — the read still correctly reports"function"; calling the captured value is a separate (pre-existing) limitation.