Repository navigation
Description
Summary
A preserved Node→Node diagnostic through Codex's execution tool recorded two distinct failures:
- Async spawn: 12 input bytes requested, zero stdout bytes received, no recorded process/stream/callback error, exit 0 and close 0.
- spawnSync: zero stdout bytes, error.code=EPERM, errno=-1, status=0 and signal=null.
This blocks qualification of a local application's stdio transport. The diagnostic launched only fictitious Node children, not a real Codex application client or model turn. No private project code is required to understand the reproduction.
The evidence dates to 2026-10-26. This report was prepared and reviewed offline; its publication template and future recipe were not executed. Exact session times and unnecessary process identifiers are omitted.
Environment and attribution limits
| Item | Observation |
|---|---|
| Node | v22.23.2; binary SHA-256 3517c2df0b2f8cd7f422b4b8450ef81c6889f08eb03e281d6de9079b15e6a327 |
| Supervisor | Python 3.12.3 |
| Launch context | Codex execution tool with default sandbox and restricted networking as the requested context; not proof of the loaded kernel policy |
| Distribution / kernel | Not preserved in the evidence used here; UNVERIFIED |
| Later helper inspection | Subsequent invocation on the same date, not the diagnostic invocation |
| Helper identity | argv[0]=codex-linux-sandbox; package metadata 0.153.4, x86_64-unknown-linux-musl |
| Helper binary SHA-256 | 56ef98ab4032d317ab26e9b5e5a175650717351edb16ed9cde0cb6d1734d62da |
| Helper flags | --apply-seccomp-then-exec present; --allow-network-for-proxy and --use-legacy-landlock absent |
| Later visible ancestry | inspection process → shell → namespace PID 1 helper, whose outer parent is not visible |
| Later restriction metadata | NoNewPrivs=1, Seccomp=2, one seccomp filter in the visible ancestry |
The later helper executable was resolved through /proc/1/exe and hashed; its role was identified from argv[0] and the listed flags, rather than merely from command lookup. No complete argv or ambient environment is attached. It is a sandbox helper role, not an application-client launch.
UNVERIFIED: outer app-server identity/build, loaded BPF instructions, effective Restricted mode, exact helper/filter during the diagnostic, and reproducible correspondence between the binary and public source commit. Seccomp=2 does not identify a filter or prove which operation caused EPERM.
Observed and expected behavior
Input is PUBLIC-ECHO\n (12 bytes); expected stdout is READY\nPUBLIC-ECHO\n (18 bytes).
| Result | Async | Sync |
|---|---|---|
| stdout bytes | 0 | 0 |
| stderr | empty | empty |
| Error | none recorded | EPERM, errno -1 |
| Child completion | exit 0; close 0; signal null | status 0; signal null |
| Verdict | FAIL | FAIL |
Both child receipts show stdinType=Readable, stdoutType=Writable, socket-type fstat mode 49663 on descriptors 0/1/2, and zero input bytes. Each READY write callback had no error. Their bytesWritten=6 is a requested-write counter, not evidence of delivered bytes.
The error.syscall string spawnSync <NODE_BIN> is a Node error label, not a measured kernel syscall. Successful exit status does not establish working stdio.
The preserved supervisor observed the parent closed with exit 0 and no captured output. Own child groups were observed absent, without a guarantee about the whole process tree. The recorded session remained within its 600-second budget. No new timing or cleanup test was run.
Included reproduction material and its limits
All proposed attachment text is embedded below, so this issue does not depend on private links, a separate repository, uploads or local Markdown links.
- parent.mjs and child.mjs are the exact executed bytes, verified against the retained manifest. Their scripts contain no fixed user paths or session identifiers.
- supervisor.template.py is adapted, not exact: the private Node path is replaced with /path/to/node-v22.23.2 and the historical timestamp is replaced with the expired sentinel start=0.0. It will stop before launching until explicitly adapted. It has not been executed.
- JSON blocks are minimized extracts, not original byte-identical receipts. Actual PIDs, process-birth ticks, exact timestamps, private receipt fingerprints and unnecessary machine details are omitted; error/stdio options and results are retained.
- The inherited environment is deliberately limited to PATH=/usr/bin:/bin, LANG=C.UTF-8, and scratch HOME/TMPDIR beneath the reproduction directory. The receipts do not dump a personal environment.
- No runtime binary or installation is included. The supervisor retains its assertion for the recorded Node binary hash. A verified public download URL matching that exact hash has not been established in this report. A same-version runtime with a different hash is a different build; if the exact runtime is unavailable, this strict template cannot be run as-is. We do not recommend silently removing that assertion.
The Python supervisor is part of the preserved harness. It does not replace the tested Node→Node stdio path. Receipt files are observation side effects; the test payload must travel through child_process stdio pipes. parent.mjs uses process.execPath, detached=true, shell=false and stdio=['pipe','pipe','pipe']. Its sync branch is skipped on an async EPERM/EACCES; the recorded async branch had no such error.
Future reproduction recipe — NOT RUN
Only for a separately approved reproduction under the intended Codex execution-tool sandbox. First save the embedded parent.mjs, child.mjs and supervisor.template.py blocks into a local folder named blocks. With an already permitted, matching Node binary, the following would create a fresh disposable copy and adapt the two explicit sentinels:
NODE_BIN=/absolute/path/to/node-v22.23.2
REPRO_DIR=$(mktemp -d /tmp/codex-stdio-repro.XXXXXXXX)
cp blocks/parent.mjs blocks/child.mjs "$REPRO_DIR/"
cp blocks/supervisor.template.py "$REPRO_DIR/supervisor.py"
python3 - "$REPRO_DIR/supervisor.py" "$NODE_BIN" <<'PY'
from pathlib import Path
import sys
p = Path(sys.argv[1])
text = p.read_text()
assert text.count("node='/path/to/node-v22.23.2'") == 1
assert text.count("start=0.0;") == 1
text = text.replace("node='/path/to/node-v22.23.2'", "node=" + repr(sys.argv[2]))
text = text.replace("start=0.0;", "start=time.time();")
p.write_text(text)
PY
python3 "$REPRO_DIR/supervisor.py"This is a documented adaptation, not a verified replay. If a control rejects it, stop without a different launch route, escalation or policy change. Preserve a failure; no automatic retry is proposed. Future generated receipts contain the maintainer's runtime paths and process metadata and need their own review before sharing.
The original harness uses wall-clock deadlines: a 600-second session budget with 60 seconds reserved for cleanup, per-branch bounds up to 10 seconds and a supervisor communicate bound up to 45 seconds. These are source-code properties, not a new validation of timeout guarantees. Detached children and whole-tree cleanup require maintainer review before execution. Inspect NODE-RESULT.json, both CHILD receipts, SUPERVISOR.json and CLEANUP.json; exit 0 alone is insufficient.
Static explanation to investigate
These exact-version sources explain plausible paths, not established local causality:
- Node v22.23.2 process.c creates socketpair for UV_CREATE_PIPE; the SO_RCVBUF/SO_SNDBUF adjustment return values in that branch are ignored.
- libuv uv_guess_handle queries getsockname and getsockopt(SOL_SOCKET, SO_TYPE) for socket descriptors; failure can yield UV_UNKNOWN_HANDLE.
- Node writable bootstrap and stdin bootstrap use an output sink and empty input for unknown handles.
- libuv stream.c calls shutdown(fd, SHUT_WR). spawn_sync.cc retains pipe errors separately from child exit status.
- Codex rust-v0.153.4 landlock.rs permits AF_UNIX socket/socketpair creation in Restricted while unconditionally rejecting getsockname, getsockopt, shutdown and setsockopt with EPERM.
This could explain empty streams and a separate sync pipe error. We have no local syscall trace, loaded-filter dump, or proof of a shared cause. Rejected socket-buffer tuning alone would not establish result.error.
The published rust-v0.153.4 tag resolves to commit 3d2ee51; the local binary-to-source mapping remains unverified.
Related report and dated upstream review
Issue #54765 is related, not a confirmed duplicate. Its Git stdout arrived despite EPERM/status 0; our async Node stdout did not. That issue's launcher-build and tracing limitations do not establish our cause.
A scoped read-only review on 2026-10-26 found no verified official fix. The preserved seccomp.rs at beb34ce8d09779e1e4ed69069fce1c989a6c332e still contains the relevant denials. This is a dated source observation, not an exhaustive or current-release guarantee. It was not rechecked online while reviewing this publication draft.
Conditional correction for maintainer review
Target: linux-sandbox, install_network_seccomp_filter_on_current_thread, Restricted.
Please evaluate the minimum operations needed to classify and close existing stdio sockets:
- getsockname: assess the descriptor-boundary implications before permitting the query.
- getsockopt: consider only SOL_SOCKET / SO_TYPE while retaining other denials.
- shutdown: consider only SHUT_WR while retaining other how-value denials.
- Keep setsockopt and getpeername denied absent separate evidence of necessity.
This would be a security-policy change requiring maintainer review, not a safe, tested or installable patch. Classic seccomp cannot infer a socket's family merely from its FD argument. These exceptions would not automatically be AF_UNIX-only. Review inherited stdio/control descriptors, duplication, closure and SCM_RIGHTS transfer paths; if their boundary is unproven, do not adopt this proposal.
Preserve file-access restrictions and namespace isolation, connection/listening restrictions, rejection of AF_INET/AF_INET6/AF_VSOCK creation, and io_uring/ptrace/process_vm restrictions. We are not asking for general Unix-socket access, external networking, elevated Node, disabled sandboxing, ignored errors, proxy routing or alternate PTY/file/socket transports.
Questions and regression request
- Can these restrictions cause the two recorded failure modes, and what missing evidence is needed to connect the denied operation to the actual helper/filter?
- Is there a supported correction preserving filesystem and external-network isolation, including the inherited-FD boundary?
- Could a regression cover exact public-byte exchange for async and sync, errors distinct from exit status, bounded closure, and negative file/network checks?
Any future source/policy validation and fictitious-process regression need separate reviewed scope. A successful echo is not proof of isolation. This report has not performed or authorized that work.
Public evidence blocks
The index lists exact UTF-8 block sizes and SHA-256 values. Only these public blocks accompany this issue body. Internal review notes, original receipt hashes, precise session metadata, disk-capacity records and prior manifests are excluded. No credentials, personal configuration, private repository/code or runtime binaries are included.
Public block index
{
"publicationTarget": "openai/codex issue",
"mode": "Paste title and self-contained Markdown body; no separate upload required or performed",
"blocks": [
{
"file": "blocks/CHILD-async.public.json",
"bytes": 696,
"sha256": "7f44fa86cb4eca58d8508060581429e519b35c267951537d12a3043d75707bfc",
"status": "Minimized historical observation; identifiers and precise timestamps omitted; NOT a new run"
},
{
"file": "blocks/CHILD-sync.public.json",
"bytes": 695,
"sha256": "e8d98262534781bbb6e43b0bc4867ed3e007dd298696aba6af4edfff04a6d23a",
"status": "Minimized historical observation; identifiers and precise timestamps omitted; NOT a new run"
},
{
"file": "blocks/CLOSURE.excerpt.json",
"bytes": 273,
"sha256": "f048d1ac882fef6311915ff2dfae812828c2fba39be0d8bc008e76522325d893",
"status": "Minimized historical observation; identifiers and precise timestamps omitted; NOT a new run"
},
{
"file": "blocks/HELPER-IDENTITY.public.json",
"bytes": 1461,
"sha256": "166dedd6eb5632a1cc16545db94e0ff98ee0aaf5b164362e13911db18bacb57a",
"status": "Minimized historical observation; identifiers and precise timestamps omitted; NOT a new run"
},
{
"file": "blocks/NODE-RESULT.public.json",
"bytes": 3153,
"sha256": "f5de24085a2cd45881a4c98a954712feaf281bba39130c6ef153ca2ed7216c87",
"status": "Minimized historical observation; identifiers and precise timestamps omitted; NOT a new run"
},
{
"file": "blocks/SESSION.public.json",
"bytes": 645,
"sha256": "e72fb18e3856053538a72d85c3eed9bb918aaf5df2a478c587d31db5e0d9ff38",
"status": "Minimized historical observation; identifiers and precise timestamps omitted; NOT a new run"
},
{
"file": "blocks/SOURCE-REFERENCES.json",
"bytes": 3190,
"sha256": "a179d8a62962a1eb9481e31d92e21d89e8fd828262bc0fcb2c5221b50e7c96ed",
"status": "Public source URLs and snapshot hashes; no original private receipt hashes"
},
{
"file": "blocks/SUPERVISOR.public.json",
"bytes": 112,
"sha256": "4915aa9af337b44bb1fc01fe9c8d2a5f50f73fc0b30c204383b8fe715c71540e",
"status": "Minimized historical observation; identifiers and precise timestamps omitted; NOT a new run"
},
{
"file": "blocks/child.mjs",
"bytes": 1618,
"sha256": "75b8ec86c3ce0359d8d54eb284b589c9e9ad6afbf4377d5156c6ead39a6e137f",
"status": "Exact executed bytes; no fixed private paths or identifiers"
},
{
"file": "blocks/parent.mjs",
"bytes": 5056,
"sha256": "6c2ea6eff83ef23aca530b63f093307ffe11f9f4ff767ee04fb16769d7d4ff1a",
"status": "Exact executed bytes; no fixed private paths or identifiers"
},
{
"file": "blocks/supervisor.template.py",
"bytes": 2993,
"sha256": "5141b58cedd2f80c1668424c35b41c9e5492b90cda08acd868e80ff087cd7cd6",
"status": "Adapted: runtime path placeholder and expired start=0.0 sentinel; NOT RUN"
}
],
"excluded": "internal directory, original private receipt fingerprints, precise session timing/process identity, storage measurements, prior artifacts, credentials/configuration, private project code and runtimes"
}blocks/CHILD-async.public.json
Minimized historical observation; identifiers and precise timestamps omitted; NOT a new run
{
"schema": 1,
"version": "v22.23.2",
"argv": [
"<NODE_BIN>",
"<REPRO_DIR>/child.mjs",
"<REPRO_DIR>/CHILD-async.json"
],
"cwd": "<REPRO_DIR>",
"events": [
{
"type": "ready-callback",
"error": null
},
{
"type": "stdin-end"
},
{
"type": "stdin-close"
},
{
"type": "beforeExit",
"code": 0
},
{
"type": "exit",
"code": 0
}
],
"bytesReceived": 0,
"bytesWritten": 6,
"stdio": [
{
"fd": 0,
"mode": 49663
},
{
"fd": 1,
"mode": 49663
},
{
"fd": 2,
"mode": 49663
}
],
"stdinType": "Readable",
"stdoutType": "Writable"
}blocks/CHILD-sync.public.json
Minimized historical observation; identifiers and precise timestamps omitted; NOT a new run
{
"schema": 1,
"version": "v22.23.2",
"argv": [
"<NODE_BIN>",
"<REPRO_DIR>/child.mjs",
"<REPRO_DIR>/CHILD-sync.json"
],
"cwd": "<REPRO_DIR>",
"events": [
{
"type": "ready-callback",
"error": null
},
{
"type": "stdin-end"
},
{
"type": "stdin-close"
},
{
"type": "beforeExit",
"code": 0
},
{
"type": "exit",
"code": 0
}
],
"bytesReceived": 0,
"bytesWritten": 6,
"stdio": [
{
"fd": 0,
"mode": 49663
},
{
"fd": 1,
"mode": 49663
},
{
"fd": 2,
"mode": 49663
}
],
"stdinType": "Readable",
"stdoutType": "Writable"
}blocks/CLOSURE.excerpt.json
Minimized historical observation; identifiers and precise timestamps omitted; NOT a new run
{
"within600Seconds": true,
"fictitiousChildren": 2,
"instrumentationProcessesIncludingSupervisors": 4,
"asyncPassed": false,
"syncPassed": false,
"ownChildGroupsAbsentObserved": true,
"wholeTreeGuaranteed": false,
"preservedEvidenceHashesVerified": true
}blocks/HELPER-IDENTITY.public.json
Minimized historical observation; identifiers and precise timestamps omitted; NOT a new run
{
"scope": "subsequent tool inspection; not the historical diagnostic namespace",
"ancestors": [
{
"Name": "python3",
"NoNewPrivs": "1",
"Seccomp": "2",
"Seccomp_filters": "1",
"exe": "/usr/bin/python3.12"
},
{
"Name": "bash",
"NoNewPrivs": "1",
"Seccomp": "2",
"Seccomp_filters": "1",
"exe": "/usr/bin/bash"
},
{
"Name": "codex",
"NoNewPrivs": "1",
"Seccomp": "2",
"Seccomp_filters": "1",
"exe": "<CODEX_PACKAGE>/bin/codex"
}
],
"helperExe": "<CODEX_PACKAGE>/bin/codex",
"helperSHA256": "56ef98ab4032d317ab26e9b5e5a175650717351edb16ed9cde0cb6d1734d62da",
"argv0Basename": "codex-linux-sandbox",
"roleFlagPresence": {
"--apply-seccomp-then-exec": true,
"--allow-network-for-proxy": false,
"--use-legacy-landlock": false,
"--no-proc": false
},
"package": {
"layoutVersion": 1,
"version": "0.153.4",
"target": "x86_64-unknown-linux-musl",
"variant": "codex",
"entrypoint": "bin/codex",
"resourcesDir": "codex-resources",
"pathDir": "codex-path"
},
"outerAppServerIdentity": "UNVERIFIED: not visible above namespace PID 1",
"loadedBpfProgram": "UNVERIFIED: no filter dump or trace",
"binaryToSourceCommitAttestation": "UNVERIFIED",
"observationDate": "2026-10-26",
"visibleAncestry": "inspection Python -> shell -> namespace PID 1 helper (PPid 0); outer parent not visible"
}blocks/NODE-RESULT.public.json
Minimized historical observation; identifiers and precise timestamps omitted; NOT a new run
{
"schema": 1,
"node": "v22.23.2",
"argv": [
"<NODE_BIN>",
"<REPRO_DIR>/parent.mjs"
],
"cwd": "<REPRO_DIR>",
"env": {
"PATH": "/usr/bin:/bin",
"LANG": "C.UTF-8",
"HOME": "<REPRO_DIR>/scratch/home",
"TMPDIR": "<REPRO_DIR>/scratch/tmp"
},
"securityFlagsChanged": false,
"expected": {
"stdout": "READY\nPUBLIC-ECHO\n",
"exitCode": 0,
"error": null
},
"attempts": [
{
"mode": "async",
"invocation": {
"file": "<NODE_BIN>",
"args": [
"<REPRO_DIR>/child.mjs",
"<REPRO_DIR>/CHILD-async.json"
],
"cwd": "<REPRO_DIR>",
"env": {
"PATH": "/usr/bin:/bin",
"LANG": "C.UTF-8",
"HOME": "<REPRO_DIR>/scratch/home",
"TMPDIR": "<REPRO_DIR>/scratch/tmp"
},
"detached": true,
"stdio": [
"pipe",
"pipe",
"pipe"
],
"shell": false
},
"events": [
{
"type": "spawn"
},
{
"type": "write-callback",
"error": null
},
{
"type": "end-callback",
"error": null
},
{
"type": "stdin-close"
},
{
"type": "stderr-end"
},
{
"type": "stdout-end"
},
{
"type": "stdout-close"
},
{
"type": "stderr-close"
},
{
"type": "exit",
"code": 0,
"signal": null
},
{
"type": "close",
"code": 0,
"signal": null
}
],
"signals": [],
"bytesSent": 12,
"bytesReceived": 0,
"stdout": "[UNEXPECTED_OR_EMPTY:0 bytes]",
"stderr": "",
"errors": [],
"closed": {
"code": 0,
"signal": null
},
"groupAbsentObserved": true,
"passed": false
},
{
"mode": "sync",
"invocation": {
"file": "<NODE_BIN>",
"args": [
"<REPRO_DIR>/child.mjs",
"<REPRO_DIR>/CHILD-sync.json"
],
"cwd": "<REPRO_DIR>",
"env": {
"PATH": "/usr/bin:/bin",
"LANG": "C.UTF-8",
"HOME": "<REPRO_DIR>/scratch/home",
"TMPDIR": "<REPRO_DIR>/scratch/tmp"
},
"detached": true,
"stdio": [
"pipe",
"pipe",
"pipe"
],
"shell": false,
"encoding": "utf8",
"timeout": 10000
},
"bytesSent": 12,
"status": 0,
"signal": null,
"error": {
"name": "Error",
"code": "EPERM",
"errno": -1,
"syscall": "spawnSync <NODE_BIN>",
"path": "<NODE_BIN>",
"spawnargs": [
"<REPRO_DIR>/child.mjs",
"<REPRO_DIR>/CHILD-sync.json"
],
"message": "spawnSync <NODE_BIN> EPERM"
},
"bytesReceived": 0,
"stdout": "[UNEXPECTED_OR_EMPTY:0 bytes]",
"stderr": "",
"groupAbsentObserved": true,
"passed": false
}
],
"realClients": 0,
"models": 0,
"wholeTreeGuaranteed": false
}blocks/SESSION.public.json
Minimized historical observation; identifiers and precise timestamps omitted; NOT a new run
{
"cleanupReservedSeconds": 60,
"criterion": "READY + exact PUBLIC-ECHO, exit/close 0 and no error; exit 0 alone is FAIL",
"plannedChildLaunches": 2,
"nodeSha256": "3517c2df0b2f8cd7f422b4b8450ef81c6889f08eb03e281d6de9079b15e6a327",
"pythonVersion": "3.12.3",
"pythonExecutable": "/usr/bin/python3",
"command": [
"<NODE_BIN>",
"<REPRO_DIR>/parent.mjs"
],
"cwd": "<REPRO_DIR>",
"env": {
"PATH": "/usr/bin:/bin",
"LANG": "C.UTF-8",
"HOME": "<REPRO_DIR>/scratch/home",
"TMPDIR": "<REPRO_DIR>/scratch/tmp"
},
"observationDate": "2026-10-26",
"sessionBudgetSeconds": 600,
"workBudgetSeconds": 540
}blocks/SOURCE-REFERENCES.json
Public source URLs and snapshot hashes; no original private receipt hashes
[
{
"snapshot": "codex-0.153.4-landlock.rs",
"url": "https://raw.githubusercontent.com/openai/codex/rust-v0.153.4/codex-rs/linux-sandbox/src/landlock.rs",
"snapshotSha256": "eb59313c7cfdb7d003df3c1e3d766ad66e414061ef5065d89546a74c1dd658ed",
"bytes": 12331,
"retrievedInPriorPreparation": "2026-10-26",
"copiedIntoThisReport": false
},
{
"snapshot": "codex-0.153.4-linux_run_main.rs",
"url": "https://raw.githubusercontent.com/openai/codex/rust-v0.153.4/codex-rs/linux-sandbox/src/linux_run_main.rs",
"snapshotSha256": "04a2baae6c245ff18c23369252b5244431da7563cb5ece2726d0f8272dbc51c9",
"bytes": 55151,
"retrievedInPriorPreparation": "2026-10-26",
"copiedIntoThisReport": false
},
{
"snapshot": "codex-0.153.4-README.md",
"url": "https://raw.githubusercontent.com/openai/codex/rust-v0.153.4/codex-rs/linux-sandbox/README.md",
"snapshotSha256": "6aded54850dbd728ac2eb9e8ebdcf82c5ff794f5dfbef8aab711b6eb650cb007",
"bytes": 5185,
"retrievedInPriorPreparation": "2026-10-26",
"copiedIntoThisReport": false
},
{
"snapshot": "codex-current-seccomp.rs",
"url": "https://raw.githubusercontent.com/openai/codex/beb34ce8d09779e1e4ed69069fce1c989a6c332e/codex-rs/linux-sandbox/src/seccomp.rs",
"snapshotSha256": "d93f82501f9d9a0f25e198e47c2e1247b889546b37d9e2dab16210b541a2f41b",
"bytes": 11834,
"retrievedInPriorPreparation": "2026-10-26",
"copiedIntoThisReport": false
},
{
"snapshot": "node-22.23.2-tty.c",
"url": "https://raw.githubusercontent.com/nodejs/node/v22.23.2/deps/uv/src/unix/tty.c",
"snapshotSha256": "65b98df1215c32ddd87e7b89e2d8d78c7e79a02e2bf4a53e1860f61d00bf431a",
"bytes": 14299,
"retrievedInPriorPreparation": "2026-10-26",
"copiedIntoThisReport": false
},
{
"snapshot": "node-22.23.2-stream.c",
"url": "https://raw.githubusercontent.com/nodejs/node/v22.23.2/deps/uv/src/unix/stream.c",
"snapshotSha256": "dac76e73caef1d01c7122f5d42f5e2d0a06b6a60bf4d83d26849d03aec805733",
"bytes": 41252,
"retrievedInPriorPreparation": "2026-10-26",
"copiedIntoThisReport": false
},
{
"snapshot": "node-22.23.2-is_main_thread.js",
"url": "https://raw.githubusercontent.com/nodejs/node/v22.23.2/lib/internal/bootstrap/switches/is_main_thread.js",
"snapshotSha256": "44f135420f29c701af74ac03355a54830151401e1dbf8a913b4f919bfeda312d",
"bytes": 8694,
"retrievedInPriorPreparation": "2026-10-26",
"copiedIntoThisReport": false
},
{
"snapshot": "node-22.23.2-spawn_sync.cc",
"url": "https://raw.githubusercontent.com/nodejs/node/v22.23.2/src/spawn_sync.cc",
"snapshotSha256": "f8319b83d25a0bebdd2e0143f919c2a4b1a87766b92806528807e61594f28081",
"bytes": 34620,
"retrievedInPriorPreparation": "2026-10-26",
"copiedIntoThisReport": false
},
{
"snapshot": "node-22.23.2-process.c",
"url": "https://raw.githubusercontent.com/nodejs/node/v22.23.2/deps/uv/src/unix/process.c",
"snapshotSha256": "cedc79cb473c0dde5c270ff2ee7b7956cbdfe0b3aceba19597b9a75a21e119f0",
"bytes": 31333,
"retrievedInPriorPreparation": "2026-10-26",
"copiedIntoThisReport": false
}
]blocks/SUPERVISOR.public.json
Minimized historical observation; identifiers and precise timestamps omitted; NOT a new run
{
"exitCode": 0,
"stdoutBytes": 0,
"stderrBytes": 0,
"childScriptLaunches": 2,
"parentClosed": true
}blocks/child.mjs
Exact executed bytes; no fixed private paths or identifiers
import fs from 'node:fs';
const file=process.argv[2];const report={schema:1,pid:process.pid,ppid:process.ppid,version:process.version,argv:process.argv,cwd:process.cwd(),events:[],bytesReceived:0,bytesWritten:0};
function save(){fs.writeFileSync(file,JSON.stringify(report,null,2));}
function safe(e){return e?{name:String(e.name).slice(0,40),code:typeof e.code==='string'?e.code:null,errno:typeof e.errno==='number'?e.errno:null,syscall:typeof e.syscall==='string'?e.syscall.slice(0,120):null,message:'child stream error '+String(e.code??e.name)}:null;}
function event(type,detail={}){report.events.push({type,...detail});save();}
report.stdio=[0,1,2].map(fd=>({fd,mode:fs.fstatSync(fd).mode}));report.stdinType=process.stdin.constructor.name;report.stdoutType=process.stdout.constructor.name;save();
process.stdout.on('error',e=>event('stdout-error',{error:safe(e)}));process.stderr.on('error',e=>event('stderr-error',{error:safe(e)}));
const ready=Buffer.from('READY\n');report.bytesWritten+=ready.length;process.stdout.write(ready,e=>event('ready-callback',{error:safe(e)}));
process.stdin.on('data',data=>{report.bytesReceived+=data.length;event('data',{bytes:data.length,expectedPublicPayload:data.equals(Buffer.from('PUBLIC-ECHO\n'))});report.bytesWritten+=data.length;process.stdout.write(data,e=>event('echo-callback',{error:safe(e)}));});
process.stdin.on('error',e=>event('stdin-error',{error:safe(e)}));process.stdin.on('end',()=>event('stdin-end'));process.stdin.on('close',()=>event('stdin-close'));process.on('beforeExit',code=>event('beforeExit',{code}));process.on('exit',code=>event('exit',{code}));blocks/parent.mjs
Exact executed bytes; no fixed private paths or identifiers
import fs from 'node:fs';import path from 'node:path';import {spawn,spawnSync} from 'node:child_process';
const root=import.meta.dirname,clock=JSON.parse(fs.readFileSync(root+'/SESSION.json'));const workUntil=clock.workDeadlineUnixMs;
const env={PATH:'/usr/bin:/bin',LANG:'C.UTF-8',HOME:root+'/scratch/home',TMPDIR:root+'/scratch/tmp'};const input=Buffer.from('PUBLIC-ECHO\n');const expected='READY\nPUBLIC-ECHO\n';
const report={schema:1,node:process.version,pid:process.pid,argv:process.argv,cwd:process.cwd(),env,securityFlagsChanged:false,startedUnixMs:Date.now(),expected:{stdout:expected,exitCode:0,error:null},attempts:[]};
const save=()=>fs.writeFileSync(root+'/NODE-RESULT.json',JSON.stringify(report,null,2));
function redact(s){return String(s).replace(/[^\x20-\x7e]/g,'?').replace(/\/(?:[^\s:'"]+)/g,p=>p.startsWith(root)||p===process.execPath?p:'[REDACTED_PATH]').slice(0,600);}
function safe(e){return e?{name:redact(e.name),code:typeof e.code==='string'?redact(e.code):null,errno:typeof e.errno==='number'?e.errno:null,syscall:typeof e.syscall==='string'?redact(e.syscall):null,path:typeof e.path==='string'?redact(e.path):null,spawnargs:Array.isArray(e.spawnargs)?e.spawnargs.map(redact):null,message:redact(e.message)}:null;}
function birth(pid){try{const s=fs.readFileSync('/proc/'+pid+'/stat','utf8');const a=s.slice(s.lastIndexOf(')')+2).split(' ');return {pid,group:Number(a[2]),session:Number(a[3]),start:a[19],uid:fs.statSync('/proc/'+pid).uid};}catch{return null;}}
function absent(pid){try{process.kill(-pid,0);return false;}catch(e){return e.code==='ESRCH';}}
function terminate(a){const b=a.birth,n=b&&birth(b.pid);if(n&&n.start===b.start&&n.uid===b.uid&&n.pid===n.group&&n.pid===n.session){process.kill(-n.pid,'SIGTERM');a.signals.push('SIGTERM');save();}}
save();
if(Date.now()>=workUntil)throw Error('SESSION_WORK_DEADLINE');
{
const mode='async',args=[root+'/child.mjs',root+'/CHILD-async.json'];const a={mode,invocation:{file:process.execPath,args,cwd:root,env,detached:true,stdio:['pipe','pipe','pipe'],shell:false},events:[],signals:[],bytesSent:input.length,bytesReceived:0,stdout:'',stderr:'',errors:[]};report.attempts.push(a);save();
const child=spawn(process.execPath,args,{cwd:root,env,detached:true,stdio:['pipe','pipe','pipe'],shell:false});a.pid=child.pid;
const event=(type,v={})=>{a.events.push({type,...v});save();};
child.on('spawn',()=>{a.birth=birth(child.pid);event('spawn');child.stdin.write(input,e=>{const error=safe(e);if(error)a.errors.push(error);event('write-callback',{error});});child.stdin.end(e=>{const error=safe(e);if(error)a.errors.push(error);event('end-callback',{error});});});
child.on('error',e=>{const error=safe(e);a.errors.push(error);event('process-error',{error});});
child.on('exit',(code,signal)=>event('exit',{code,signal}));
for(const [name,stream] of [['stdin',child.stdin],['stdout',child.stdout],['stderr',child.stderr]]){stream.on('error',e=>{const error=safe(e);a.errors.push(error);event(name+'-error',{error});});stream.on('end',()=>event(name+'-end'));stream.on('close',()=>event(name+'-close'));}
child.stdout.on('data',d=>{a.bytesReceived+=d.length;a.stdout+=d.toString('utf8');event('stdout-data',{bytes:d.length});});child.stderr.on('data',d=>{a.stderr+=d.toString('utf8');event('stderr-data',{bytes:d.length});});
const timer=setTimeout(()=>terminate(a),Math.max(1,Math.min(10000,workUntil-Date.now())));
a.closed=await new Promise(resolve=>child.once('close',(code,signal)=>{event('close',{code,signal});resolve({code,signal});}));clearTimeout(timer);a.groupAbsentObserved=Number.isInteger(a.pid)&&absent(a.pid);a.passed=a.stdout===expected&&a.stderr===''&&a.closed.code===0&&a.closed.signal===null&&a.errors.length===0;a.stdout=a.stdout===expected?a.stdout:'[UNEXPECTED_OR_EMPTY:'+a.bytesReceived+' bytes]';a.stderr=a.stderr===''?'':'[UNEXPECTED_STDERR]';save();
}
if(report.attempts[0].errors.some(e=>['EPERM','EACCES'].includes(e.code))){report.syncSkipped='PERMISSION_ERROR_STOP';}
else if(Date.now()>=workUntil){report.syncSkipped='SESSION_WORK_DEADLINE';}
else{
const mode='sync',args=[root+'/child.mjs',root+'/CHILD-sync.json'];const a={mode,invocation:{file:process.execPath,args,cwd:root,env,detached:true,stdio:['pipe','pipe','pipe'],shell:false,encoding:'utf8',timeout:Math.min(10000,workUntil-Date.now())},bytesSent:input.length};report.attempts.push(a);save();const x=spawnSync(process.execPath,args,{cwd:root,env,detached:true,stdio:['pipe','pipe','pipe'],shell:false,encoding:'utf8',timeout:a.invocation.timeout,input});a.pid=x.pid;a.status=x.status;a.signal=x.signal;a.error=safe(x.error);a.bytesReceived=Buffer.byteLength(x.stdout??'');a.stdout=x.stdout===expected?x.stdout:'[UNEXPECTED_OR_EMPTY:'+a.bytesReceived+' bytes]';a.stderr=x.stderr===''?'':'[UNEXPECTED_STDERR]';a.groupAbsentObserved=Number.isInteger(x.pid)&&absent(x.pid);a.passed=x.stdout===expected&&x.stderr===''&&x.status===0&&x.signal===null&&!x.error;save();
}
report.endedUnixMs=Date.now();report.realClients=0;report.models=0;report.wholeTreeGuaranteed=false;save();blocks/supervisor.template.py
Adapted: runtime path placeholder and expired start=0.0 sentinel; NOT RUN
import os,sys,time,json,hashlib,subprocess,shutil,signal
from pathlib import Path
r=Path(__file__).parent;start=0.0;finish=start+600;work=finish-60
node='/path/to/node-v22.23.2'
assert time.time()<work,'SESSION_WORK_DEADLINE'
for p in [r/'scratch',r/'scratch/home',r/'scratch/tmp']:p.mkdir()
def sha(p):
h=hashlib.sha256()
with open(p,'rb') as f:
while b:=f.read(1048576):h.update(b)
return h.hexdigest()
env={'PATH':'/usr/bin:/bin','LANG':'C.UTF-8','HOME':str(r/'scratch/home'),'TMPDIR':str(r/'scratch/tmp')}
clock={'startedUnixMs':int(start*1000),'workDeadlineUnixMs':int(work*1000),'finishDeadlineUnixMs':int(finish*1000),'cleanupReservedSeconds':60,'diskFreeBefore':shutil.disk_usage(r).free,'criterion':'READY + exact PUBLIC-ECHO, exit/close 0 and no error; exit 0 alone is FAIL','plannedChildLaunches':2,'nodeSha256':sha(node),'pythonVersion':sys.version.split()[0],'pythonExecutable':sys.executable,'pythonSha256':sha(sys.executable),'command':[node,str(r/'parent.mjs')],'cwd':str(r),'env':env}
(r/'SESSION.json').write_text(json.dumps(clock,indent=2));assert clock['nodeSha256']=='3517c2df0b2f8cd7f422b4b8450ef81c6889f08eb03e281d6de9079b15e6a327'
p=None
try:
assert time.time()<work
p=subprocess.Popen(clock['command'],cwd=r,env=env,stdin=subprocess.DEVNULL,stdout=subprocess.PIPE,stderr=subprocess.PIPE,start_new_session=True)
stdout,stderr=p.communicate(timeout=min(45,max(1,work-time.time())))
# Parent emits only structured files, not arbitrary stdout/stderr.
(r/'SUPERVISOR.json').write_text(json.dumps({'parentPid':p.pid,'exitCode':p.returncode,'stdoutBytes':len(stdout),'stderrBytes':len(stderr),'childScriptLaunches':len(json.loads((r/'NODE-RESULT.json').read_text()).get('attempts',[])) if (r/'NODE-RESULT.json').exists() else None,'parentClosed':True},indent=2))
except subprocess.TimeoutExpired:
# No relaunch. Terminate only the still-owned supervisor child group.
if p is not None and p.poll() is None:
os.killpg(p.pid,signal.SIGTERM)
try:p.wait(timeout=2)
except subprocess.TimeoutExpired:os.killpg(p.pid,signal.SIGKILL);p.wait(timeout=2)
(r/'SUPERVISOR.json').write_text(json.dumps({'parentPid':p.pid,'timeout':True,'parentClosed':p.poll() is not None},indent=2))
finally:
# Retain all diagnostic scripts/receipts. Only empty new scratch directories retire.
removed=[]
for f in [r/'scratch/home',r/'scratch/tmp',r/'scratch']:
if f.exists() and not any(f.iterdir()):f.rmdir();removed.append(str(f.relative_to(r)))
hashes={f.name:sha(f) for f in r.iterdir() if f.is_file() and f.name not in ['HASHES.json','CLEANUP.json']};(r/'HASHES.json').write_text(json.dumps(hashes,indent=2))
result={'totalSecondsIncludingPreservationAndCleanup':time.time()-start,'within600Seconds':time.time()<finish,'removedOnlyNewEmptyDirectories':removed,'diskFreeAfter':shutil.disk_usage(r).free,'realClients':0,'modelTurns':0,'wholeTreeGuaranteed':False,'evidenceDirectory':str(r)};(r/'CLEANUP.json').write_text(json.dumps(result,indent=2));print(json.dumps(result))
Activity