Sample
globals 14.0.0: nodeBuiltin
Verified sample for npm globals 14.0.0: nodeBuiltin. The contract ran on node 22 · linux debian/x64 · docker and passed: globals.nodeBuiltin is a dictionary…
sha256:9b369e06b48a5c6057e0be848901f587ba21bcdb03f295976694f1734d7dae5a
This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured.
How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people.
MIT-0
Execution evidence
The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.
- Evidence basis
- Signed contract pass
- Verification receipts
- 1
- Signing keys that built it
- 1
Declared environment
node 22.23 linux 24 · ubuntu · glibc 2.39 x64 node 22.23 javascript npm 10
Verification-run environments
| Environment | Contract | Stages | Run |
|---|---|---|---|
| node 22 · linux debian/x64 · docker ed25519:c1973797be207ac4 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · node-typescript@1node:22@sha256:8a34c4ab3ea2… |
2026-09-05 |
Case
HOW- Goal
- verify globals.nodeBuiltin in pkg:npm/globals@14.0.0
- Packages
- Symbols
-
- globals.nodeBuiltin
- Environment
- node 22.23.2
- Created
- 2026-09-05T23:40:23Z
Contract
- globals.nodeBuiltin is a dictionary mapping Node.js built-in identifiers to boolean writeability flags
- globals.nodeBuiltin contains exactly 65 built-in identifier entries
- globals.nodeBuiltin marks all built-in identifiers as read-only with value false
- globals.nodeBuiltin includes core Node.js process and execution identifiers process, Buffer, and global as read-only
- globals.nodeBuiltin includes timer functions setTimeout, setInterval, setImmediate, clearTimeout, and clearInterval as read-only
- globals.nodeBuiltin includes standard Web APIs fetch, Request, Response, Headers, URL, and AbortController as read-only
- globals.nodeBuiltin includes streams and encoding APIs ReadableStream, WritableStream, TextEncoder, and TextDecoder as read-only
Files
- PROMPT.md
- csx.json
- package-lock.json
- package.json
- spec.json
- src/index.js
- test/contract.mjs
Source
Clean-room public code sample — generation instructions
Write a brand-new, minimal, self-contained code sample in this clean-room directory.
Do not copy, paraphrase, or reference any existing project source. Work only from this spec.
A csx.json manifest scaffold already exists. Do not recreate it from memory. Preserve its case.goal, packages and symbols; fill its empty case.contract with exact assertions and correct its environment, commands and verifierAdapter for the files you generate.
Goal: verify globals.nodeBuiltin in pkg:npm/globals@14.0.0
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:npm/globals@14.0.0
Demonstrate these symbols/APIs:
- globals.nodeBuiltin
Rules:
- One focused purpose; the smallest project that proves the goal.
- Include a contract test (test/contract.*) that runs OFFLINE and exits 0 exactly when the goal behavior works.
- Pin every dependency with a lockfile so resolution is reproducible.
- No secrets, credentials, or tokens. No real URLs (only example.com or localhost). No absolute paths.
- No personal names, emails, company names, or project identifiers of any kind.
- No binaries and no generated output (node_modules, dist, target, venv, .git, .env).
- Keep it under 200 files and 256KB packed.
{"case":{"caseId":"case:sha256:fe180275487e907681544a5fbcd2ea6c4e4fcc9c508764284c2485ce697fc5ab","contract":["globals.nodeBuiltin is a dictionary mapping Node.js built-in identifiers to boolean writeability flags","globals.nodeBuiltin contains exactly 65 built-in identifier entries","globals.nodeBuiltin marks all built-in identifiers as read-only with value false","globals.nodeBuiltin includes core Node.js process and execution identifiers process, Buffer, and global as read-only","globals.nodeBuiltin includes timer functions setTimeout, setInterval, setImmediate, clearTimeout, and clearInterval as read-only","globals.nodeBuiltin includes standard Web APIs fetch, Request, Response, Headers, URL, and AbortController as read-only","globals.nodeBuiltin includes streams and encoding APIs ReadableStream, WritableStream, TextEncoder, and TextDecoder as read-only"],"goal":"verify globals.nodeBuiltin in pkg:npm/globals@14.0.0","kind":"HOW","packages":["pkg:npm/globals@14.0.0"],"schemaVersion":1,"symbols":["globals.nodeBuiltin"]},"contractCommand":["node","test/contract.mjs"],"environment":{"arch":"x64","distro":"ubuntu","ecosystem":"npm","executionContext":"node","language":"javascript","libc":"glibc","libcVersion":"2.39","moduleSystem":"esm","os":"linux","osVersionBucket":"24","packageManager":"npm","packageManagerVersion":"10.9.8","runtime":"node","runtimeVersion":"22.23.2","schemaVersion":1},"license":"MIT-0","packages":["pkg:npm/globals@14.0.0"],"schemaVersion":1,"subject":"pkg:npm/globals@14.0.0","symbols":["globals.nodeBuiltin"],"verifierAdapter":"node-typescript@1"}
{
"name": "sample-globals-node-builtin",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "sample-globals-node-builtin",
"version": "1.0.0",
"license": "MIT-0",
"dependencies": {
"globals": "14.0.0"
}
},
"node_modules/globals": {
"version": "14.0.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz",
"integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==",
"license": "MIT",
"engines": {
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
}
}
}
{
"name": "sample-globals-node-builtin",
"version": "1.0.0",
"private": true,
"description": "Clean-room verification of globals.nodeBuiltin in globals@14.0.0",
"type": "module",
"main": "src/index.js",
"license": "MIT-0",
"dependencies": {
"globals": "14.0.0"
}
}
{
"schemaVersion": 1,
"goal": "verify globals.nodeBuiltin in pkg:npm/globals@14.0.0",
"kind": "HOW",
"packages": [
"pkg:npm/globals@14.0.0"
],
"symbols": [
"globals.nodeBuiltin"
]
}
import globals from 'globals';
/**
* Returns the dictionary of Node.js built-in global identifiers and their writeability status.
*
* @returns {Record<string, boolean>} Object mapping identifier names to boolean writeability flags.
*/
export function getNodeBuiltinGlobals() {
return globals.nodeBuiltin;
}
/**
* Checks whether a given identifier name is recognized as a Node.js built-in global.
*
* @param {string} identifier - Identifier name to check.
* @returns {boolean} True if the identifier exists in globals.nodeBuiltin.
*/
export function isNodeBuiltin(identifier) {
return Object.hasOwn(globals.nodeBuiltin, identifier);
}
/**
* Checks whether a recognized Node.js built-in global is writable (can be reassigned).
*
* @param {string} identifier - Identifier name to check.
* @returns {boolean} True if writable, false if read-only or not present.
*/
export function isNodeBuiltinWritable(identifier) {
return globals.nodeBuiltin[identifier] === true;
}
export { globals };
export default globals.nodeBuiltin;
import assert from 'node:assert/strict';
import globals, { getNodeBuiltinGlobals, isNodeBuiltin, isNodeBuiltinWritable } from '../src/index.js';
// 1. globals.nodeBuiltin is a dictionary mapping Node.js built-in identifiers to boolean writeability flags
assert.equal(typeof globals, 'object', 'globals should be an object');
assert.notEqual(globals, null, 'globals should not be null');
const builtins = getNodeBuiltinGlobals();
assert.equal(typeof builtins, 'object', 'globals.nodeBuiltin should be an object');
assert.notEqual(builtins, null, 'globals.nodeBuiltin should not be null');
for (const [identifier, isWritable] of Object.entries(builtins)) {
assert.equal(typeof identifier, 'string', `identifier ${identifier} must be a string`);
assert.equal(typeof isWritable, 'boolean', `writeability for ${identifier} must be a boolean`);
}
// 2. globals.nodeBuiltin contains exactly 65 built-in identifier entries
assert.equal(Object.keys(builtins).length, 65, 'globals.nodeBuiltin should contain exactly 65 identifiers');
// 3. globals.nodeBuiltin marks all built-in identifiers as read-only with value false
for (const [identifier, isWritable] of Object.entries(builtins)) {
assert.equal(isWritable, false, `identifier ${identifier} should be read-only (false)`);
assert.equal(isNodeBuiltinWritable(identifier), false, `${identifier} should not be writable`);
}
// 4. globals.nodeBuiltin includes core Node.js process and execution identifiers process, Buffer, and global as read-only
const coreIdentifiers = ['process', 'Buffer', 'global'];
for (const id of coreIdentifiers) {
assert.equal(isNodeBuiltin(id), true, `${id} must be recognized as a Node.js built-in`);
assert.equal(builtins[id], false, `globals.nodeBuiltin.${id} should be false`);
assert.equal(isNodeBuiltinWritable(id), false, `${id} must not be writable`);
}
// 5. globals.nodeBuiltin includes timer functions setTimeout, setInterval, setImmediate, clearTimeout, and clearInterval as read-only
const timerIdentifiers = ['setTimeout', 'setInterval', 'setImmediate', 'clearTimeout', 'clearInterval'];
for (const id of timerIdentifiers) {
assert.equal(isNodeBuiltin(id), true, `${id} must be recognized as a Node.js built-in`);
assert.equal(builtins[id], false, `globals.nodeBuiltin.${id} should be false`);
assert.equal(isNodeBuiltinWritable(id), false, `${id} must not be writable`);
}
// 6. globals.nodeBuiltin includes standard Web APIs fetch, Request, Response, Headers, URL, and AbortController as read-only
const webApiIdentifiers = ['fetch', 'Request', 'Response', 'Headers', 'URL', 'AbortController'];
for (const id of webApiIdentifiers) {
assert.equal(isNodeBuiltin(id), true, `${id} must be recognized as a Node.js built-in`);
assert.equal(builtins[id], false, `globals.nodeBuiltin.${id} should be false`);
assert.equal(isNodeBuiltinWritable(id), false, `${id} must not be writable`);
}
// 7. globals.nodeBuiltin includes streams and encoding APIs ReadableStream, WritableStream, TextEncoder, and TextDecoder as read-only
const streamAndEncodingIdentifiers = ['ReadableStream', 'WritableStream', 'TextEncoder', 'TextDecoder'];
for (const id of streamAndEncodingIdentifiers) {
assert.equal(isNodeBuiltin(id), true, `${id} must be recognized as a Node.js built-in`);
assert.equal(builtins[id], false, `globals.nodeBuiltin.${id} should be false`);
assert.equal(isNodeBuiltinWritable(id), false, `${id} must not be writable`);
}
// Ensure unknown non-builtin identifiers return false
assert.equal(isNodeBuiltin('window'), false, 'window is not a nodeBuiltin global');
assert.equal(isNodeBuiltinWritable('window'), false, 'window is not writable');
assert.equal(isNodeBuiltin('nonExistentGlobalXYZ'), false, 'non-existent identifier should return false');
console.log('Contract test passed.');
Origin Seeder
anonymous