Summary
Perry's node:constants surface is broad, but current Node exposes additional constants that are either absent from Perry's manifest and/or resolve to undefined at runtime. The missing group is mostly POSIX file-mode/open flags, libuv dirent/symlink/copyfile flags, and defaultCoreCipherList.
This is a focused metadata parity cut, not a behavior-heavy subsystem change.
Local evidence
Current manifest has 198 constants entries. Node v25.9.0 exposes these representative constants:
UV_DIRENT_FILE: number 1
UV_DIRENT_DIR: number 2
UV_DIRENT_LINK: number 3
UV_FS_SYMLINK_DIR: number 1
UV_FS_SYMLINK_JUNCTION: number 2
S_IFMT: number 61440
S_IFREG: number 32768
S_IFDIR: number 16384
S_IFLNK: number 40960
O_DIRECTORY: number 1048576
O_NOCTTY: number 131072
O_NONBLOCK: number 4
O_SYNC: number 128
O_DSYNC: number 4194304
O_SYMLINK: number 2097152
UV_FS_COPYFILE_EXCL: number 1
UV_FS_COPYFILE_FICLONE: number 2
UV_FS_COPYFILE_FICLONE_FORCE: number 4
defaultCoreCipherList: string 416
Disposable probe: test-files/tmp_constants_missing_tail_probe.ts.
Perry output:
UV_DIRENT_FILE: undefined undefined
UV_DIRENT_DIR: undefined undefined
UV_DIRENT_LINK: undefined undefined
UV_FS_SYMLINK_DIR: undefined undefined
UV_FS_SYMLINK_JUNCTION: undefined undefined
S_IFMT: undefined undefined
S_IFREG: undefined undefined
S_IFDIR: undefined undefined
S_IFLNK: undefined undefined
O_DIRECTORY: undefined undefined
O_NOCTTY: undefined undefined
O_NONBLOCK: undefined undefined
O_SYNC: undefined undefined
O_DSYNC: undefined undefined
O_SYMLINK: undefined undefined
UV_FS_COPYFILE_EXCL: undefined undefined
UV_FS_COPYFILE_FICLONE: undefined undefined
UV_FS_COPYFILE_FICLONE_FORCE: undefined undefined
defaultCoreCipherList: undefined undefined
Note: SIGINFO is not listed in the manifest diff, but a dynamic read currently returns Node-compatible 29 on this host, so this issue intentionally does not include it in the missing-runtime set.
Existing test caveat
./run_parity_tests.sh --suite node-suite --module constants is not useful evidence today because its only case fails under Node in the harness and is bucketed as node_fail. This issue is therefore based on manifest comparison plus direct Node/Perry probes.
Expected
The representative constants above should be exposed from node:constants with Node-compatible values for the supported host target, and should be added to the manifest if Perry intends to claim them.
Actual
Runtime reads for the representative missing constants return undefined in Perry.
Suggested PR cut
Implement one constants metadata cut covering:
- libuv dirent constants:
UV_DIRENT_*
- libuv symlink/copyfile constants:
UV_FS_SYMLINK_*, UV_FS_COPYFILE_*
- POSIX file type and permission aggregate masks:
S_IF*, S_IRWX*
- POSIX open flags missing on this host:
O_DIRECTORY, O_NOCTTY, O_NONBLOCK, O_SYNC, O_DSYNC, O_SYMLINK
defaultCoreCipherList
Acceptance
- Add deterministic parity coverage for representative numeric values and
typeof defaultCoreCipherList === "string".
- Runtime dynamic reads and named imports expose values rather than
undefined.
- Manifest/docs are updated for newly claimed constants.
- Avoid asserting platform constants that Node does not expose on the current supported target.
Summary
Perry's
node:constantssurface is broad, but current Node exposes additional constants that are either absent from Perry's manifest and/or resolve toundefinedat runtime. The missing group is mostly POSIX file-mode/open flags, libuv dirent/symlink/copyfile flags, anddefaultCoreCipherList.This is a focused metadata parity cut, not a behavior-heavy subsystem change.
Local evidence
Current manifest has 198
constantsentries. Node v25.9.0 exposes these representative constants:Disposable probe:
test-files/tmp_constants_missing_tail_probe.ts.Perry output:
Note:
SIGINFOis not listed in the manifest diff, but a dynamic read currently returns Node-compatible29on this host, so this issue intentionally does not include it in the missing-runtime set.Existing test caveat
./run_parity_tests.sh --suite node-suite --module constantsis not useful evidence today because its only case fails under Node in the harness and is bucketed asnode_fail. This issue is therefore based on manifest comparison plus direct Node/Perry probes.Expected
The representative constants above should be exposed from
node:constantswith Node-compatible values for the supported host target, and should be added to the manifest if Perry intends to claim them.Actual
Runtime reads for the representative missing constants return
undefinedin Perry.Suggested PR cut
Implement one constants metadata cut covering:
UV_DIRENT_*UV_FS_SYMLINK_*,UV_FS_COPYFILE_*S_IF*,S_IRWX*O_DIRECTORY,O_NOCTTY,O_NONBLOCK,O_SYNC,O_DSYNC,O_SYMLINKdefaultCoreCipherListAcceptance
typeof defaultCoreCipherList === "string".undefined.