Sample
node-releases 2.0.56: slice
Verified sample for npm node-releases 2.0.56: slice. The contract ran on node 22 · linux debian/x64 · docker and passed: slice(start, end) returns a…
sha256:a41244075c6755dc7ac3ed4a93e3ecd507d19df493a70f4bfaba7e7b2e43ae8c
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 linux 24 · ubuntu · glibc 2.39 x64 node javascript npm
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-10-17 |
Case
HOW- Goal
- verify node-releases.slice in pkg:npm/node-releases@2.0.56
- Packages
- Symbols
-
- node-releases.slice
- Environment
- node
- Created
- 2026-10-17T02:03:10Z
Contract
- slice(start, end) returns a contiguous sub-range of release entries without mutating envs
- slice(-n) extracts the latest n release entries from the tail of the dataset
- slice(start, -endOffset) combines positive start and negative end index
- slice() with no arguments returns a distinct shallow copy of all release entries
- slice with start >= length or start >= end returns an empty array
- CommonJS require of envs.json supports identical slice semantics
Files
- PROMPT.md
- csx.json
- package-lock.json
- package.json
- spec.json
- 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 node-releases.slice in pkg:npm/node-releases@2.0.56
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:npm/node-releases@2.0.56
Demonstrate these symbols/APIs:
- node-releases.slice
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:32cf9a9b67a9dc2626653f7cb4a3a0d5b41ab301098920d4c74a4024256a27c9","contract":["slice(start, end) returns a contiguous sub-range of release entries without mutating envs","slice(-n) extracts the latest n release entries from the tail of the dataset","slice(start, -endOffset) combines positive start and negative end index","slice() with no arguments returns a distinct shallow copy of all release entries","slice with start \u003e= length or start \u003e= end returns an empty array","CommonJS require of envs.json supports identical slice semantics"],"goal":"verify node-releases.slice in pkg:npm/node-releases@2.0.56","kind":"HOW","packages":["pkg:npm/node-releases@2.0.56"],"schemaVersion":1,"symbols":["node-releases.slice"]},"contractCommand":["node","test/contract.mjs"],"environment":{"arch":"x64","distro":"ubuntu","ecosystem":"npm","executionContext":"node","language":"javascript","libc":"glibc","libcVersion":"2.39","os":"linux","osVersionBucket":"24","packageManager":"npm","runtime":"node","schemaVersion":1},"license":"MIT-0","packages":["pkg:npm/node-releases@2.0.56"],"schemaVersion":1,"subject":"pkg:npm/node-releases@2.0.56","symbols":["node-releases.slice"],"verifierAdapter":"node-typescript@1"}
{
"name": "verify-node-releases-slice",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "verify-node-releases-slice",
"version": "1.0.0",
"dependencies": {
"node-releases": "2.0.56"
}
},
"node_modules/node-releases": {
"version": "2.0.56",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.56.tgz",
"integrity": "sha512-x0InOIyzgdk+eyaWaRJFH5snEtiImgBgblZ2CyPrLmqqcuMQkEvcDPHbzqbD8eDsSeJbVOjn+crzyzHaM4D+/A==",
"license": "MIT",
"engines": {
"node": ">=18"
}
}
}
}
{
"name": "verify-node-releases-slice",
"version": "1.0.0",
"private": true,
"type": "module",
"scripts": {
"test": "node test/contract.mjs"
},
"dependencies": {
"node-releases": "2.0.56"
}
}
{
"schemaVersion": 1,
"goal": "verify node-releases.slice in pkg:npm/node-releases@2.0.56",
"kind": "HOW",
"packages": [
"pkg:npm/node-releases@2.0.56"
],
"symbols": [
"node-releases.slice"
]
}
import assert from 'node:assert/strict';
import { createRequire } from 'node:module';
import envs from 'node-releases/data/processed/envs.json' with { type: 'json' };
const require = createRequire(import.meta.url);
const cjsEnvs = require('node-releases/data/processed/envs.json');
// Verify baseline envs dataset
assert.ok(Array.isArray(envs), 'processed envs.json must export an array');
const totalCount = envs.length;
assert.ok(totalCount > 10, 'envs dataset must contain multiple release entries');
// 1. slice(start, end) returns a contiguous sub-range of release entries without mutating envs
const subRange = envs.slice(2, 7);
assert.equal(subRange.length, 5);
assert.equal(envs.length, totalCount);
for (let i = 0; i < 5; i++) {
assert.deepEqual(subRange[i], envs[2 + i]);
assert.equal(typeof subRange[i].version, 'string');
assert.equal(typeof subRange[i].date, 'string');
}
// 2. slice(-n) extracts the latest n release entries from the tail of the dataset
const latestThree = envs.slice(-3);
assert.equal(latestThree.length, 3);
assert.deepEqual(latestThree[0], envs[totalCount - 3]);
assert.deepEqual(latestThree[2], envs[totalCount - 1]);
// 3. slice(start, -endOffset) combines positive start and negative end index
const trimmed = envs.slice(1, -1);
assert.equal(trimmed.length, totalCount - 2);
assert.deepEqual(trimmed[0], envs[1]);
assert.deepEqual(trimmed[trimmed.length - 1], envs[totalCount - 2]);
// 4. slice() with no arguments returns a distinct shallow copy of all release entries
const cloned = envs.slice();
assert.notEqual(cloned, envs);
assert.equal(cloned.length, totalCount);
assert.deepEqual(cloned[0], envs[0]);
assert.deepEqual(cloned[totalCount - 1], envs[totalCount - 1]);
// 5. slice with start >= length or start >= end returns an empty array
assert.deepEqual(envs.slice(totalCount), []);
assert.deepEqual(envs.slice(5, 2), []);
// 6. CommonJS require of envs.json supports identical slice semantics
const cjsHead = cjsEnvs.slice(0, 4);
assert.equal(cjsHead.length, 4);
assert.deepEqual(cjsHead, envs.slice(0, 4));
Origin Seeder
anonymous