Sample
statuses 2.0.1: empty
Verified sample for npm statuses 2.0.1: empty. The contract ran on node 22 · linux debian/x64 · docker and passed: status.empty is an object mapping HTTP…
sha256:751f5cc4ff87a7350d00cd12c415a704be1c8ebc28cb3c0b3fe09288aa4c2407
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
linux 24 · ubuntu · glibc 2.39 x64 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-09-03 |
Case
HOW- Goal
- verify statuses.empty in pkg:npm/statuses@2.0.1
- Packages
- Symbols
-
- statuses.empty
- Created
- 2026-09-03T13:58:53Z
Contract
- status.empty is an object mapping HTTP status codes with empty bodies to true
- status.empty[204] is true for 204 No Content
- status.empty[205] is true for 205 Reset Content
- status.empty[304] is true for 304 Not Modified
- status.empty yields undefined for status codes that carry response bodies (e.g. 200, 404, 500)
- isEmptyResponseBody(codeOrMessage) returns true only for status codes or messages with empty bodies
- getEmptyStatusCodes() returns the array of numeric status codes that require empty bodies
Files
- PROMPT.md
- csx.json
- package-lock.json
- package.json
- spec.json
- src/index.mjs
- 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 statuses.empty in pkg:npm/statuses@2.0.1
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:npm/statuses@2.0.1
Demonstrate these symbols/APIs:
- statuses.empty
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:16703acc012d4a96e587ee6fda89e28c7bad345a89a7d9dbdeaa2bda219fcae0","contract":["status.empty is an object mapping HTTP status codes with empty bodies to true","status.empty[204] is true for 204 No Content","status.empty[205] is true for 205 Reset Content","status.empty[304] is true for 304 Not Modified","status.empty yields undefined for status codes that carry response bodies (e.g. 200, 404, 500)","isEmptyResponseBody(codeOrMessage) returns true only for status codes or messages with empty bodies","getEmptyStatusCodes() returns the array of numeric status codes that require empty bodies"],"goal":"verify statuses.empty in pkg:npm/statuses@2.0.1","kind":"HOW","packages":["pkg:npm/statuses@2.0.1"],"schemaVersion":1,"symbols":["statuses.empty"]},"contractCommand":["node","test/contract.mjs"],"environment":{"arch":"x64","distro":"ubuntu","ecosystem":"npm","libc":"glibc","libcVersion":"2.39","os":"linux","osVersionBucket":"24","packageManager":"npm","schemaVersion":1},"license":"MIT-0","packages":["pkg:npm/statuses@2.0.1"],"schemaVersion":1,"subject":"pkg:npm/statuses@2.0.1","symbols":["statuses.empty"],"verifierAdapter":"node-typescript@1"}
{
"name": "verify-statuses-empty",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "verify-statuses-empty",
"version": "1.0.0",
"dependencies": {
"statuses": "2.0.1"
}
},
"node_modules/statuses": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
"integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
"license": "MIT",
"engines": {
"node": ">= 0.8"
}
}
}
}
{
"name": "verify-statuses-empty",
"version": "1.0.0",
"type": "module",
"dependencies": {
"statuses": "2.0.1"
}
}
{
"schemaVersion": 1,
"goal": "verify statuses.empty in pkg:npm/statuses@2.0.1",
"kind": "HOW",
"packages": [
"pkg:npm/statuses@2.0.1"
],
"symbols": [
"statuses.empty"
]
}
import status from 'statuses';
export function isEmptyResponseBody(codeOrMessage) {
const code = typeof codeOrMessage === 'number' ? codeOrMessage : status(codeOrMessage);
return Boolean(status.empty[code]);
}
export function getEmptyStatusCodes() {
return Object.keys(status.empty).map(Number);
}
export default status;
import assert from 'node:assert';
import status, { isEmptyResponseBody, getEmptyStatusCodes } from '../src/index.mjs';
// 1. statuses.empty structure
assert.strictEqual(typeof status.empty, 'object');
assert.notStrictEqual(status.empty, null);
// 2. Exact empty status codes mapping to true
assert.strictEqual(status.empty[204], true);
assert.strictEqual(status.empty[205], true);
assert.strictEqual(status.empty[304], true);
// 3. Status codes with response bodies map to undefined
assert.strictEqual(status.empty[200], undefined);
assert.strictEqual(status.empty[201], undefined);
assert.strictEqual(status.empty[400], undefined);
assert.strictEqual(status.empty[404], undefined);
assert.strictEqual(status.empty[500], undefined);
// 4. Helper function isEmptyResponseBody with code and message
assert.strictEqual(isEmptyResponseBody(204), true);
assert.strictEqual(isEmptyResponseBody(205), true);
assert.strictEqual(isEmptyResponseBody(304), true);
assert.strictEqual(isEmptyResponseBody('no content'), true);
assert.strictEqual(isEmptyResponseBody('reset content'), true);
assert.strictEqual(isEmptyResponseBody('not modified'), true);
assert.strictEqual(isEmptyResponseBody(200), false);
assert.strictEqual(isEmptyResponseBody('ok'), false);
assert.strictEqual(isEmptyResponseBody(404), false);
assert.strictEqual(isEmptyResponseBody('not found'), false);
// 5. getEmptyStatusCodes returns [204, 205, 304]
const emptyCodes = getEmptyStatusCodes();
assert.deepStrictEqual(emptyCodes.sort((a, b) => a - b), [204, 205, 304]);
console.log('Contract test passed.');
Origin Seeder
anonymous