CodeSampleX

Sample

@esbuild/netbsd-x64 0.28.2

Verified sample for npm @esbuild/netbsd-x64 0.28.2. The contract ran on node 22 · linux alpine/x64 · docker and passed: assert package resolution locates…

sha256:8f785913e858d8e90e466870c283d08abebedb62ed19851586bc12913aa96728

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 alpine/x64 · docker ed25519:c1973797be207ac4 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · node-typescript@1node:22-alpine@sha256:c610fcdfb1d5…
2026-08-28

Case

HOW
Goal
verify pkg:npm/%40esbuild/netbsd-x64@0.28.2
Packages
Environment
node 22.23.2
Created
2026-08-28T06:31:16Z

Contract

  1. assert package resolution locates @esbuild/netbsd-x64 manifest and binary
  2. assert package manifest specifies os netbsd, cpu x64, and node >= 18
  3. assert binary header contains 64-bit little-endian ELF magic and EM_X86_64 architecture code 62
  4. assert executing netbsd x64 native binary on mismatched host fails

Files

  • .npmrc
  • PROMPT.md
  • csx.json
  • package-lock.json
  • package.json
  • spec.json
  • test/contract.cjs

Download the source artifact (tar.gz)

Source

.npmrc
force = true
PROMPT.md
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 pkg:npm/%40esbuild/netbsd-x64@0.28.2
Kind: HOW

Use EXACTLY these public packages and versions:
  - pkg:npm/%40esbuild/netbsd-x64@0.28.2
Constraints:
  - executionContext: node
Required runtime conditions:
  - ecosystem: npm
  - language: javascript
  - moduleSystem: cjs
  - packageManager: npm@10.9.8
  - runtime: node@22.23.2

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.
csx.json
{"case":{"caseId":"case:sha256:e8d3d11c1adeea712141ca64bf8001c01ac17cd1060fcdcd0be76e236d86b908","constraints":{"executionContext":"node"},"contract":["assert package resolution locates @esbuild/netbsd-x64 manifest and binary","assert package manifest specifies os netbsd, cpu x64, and node \u003e= 18","assert binary header contains 64-bit little-endian ELF magic and EM_X86_64 architecture code 62","assert executing netbsd x64 native binary on mismatched host fails"],"goal":"verify pkg:npm/%40esbuild/netbsd-x64@0.28.2","kind":"HOW","packages":["pkg:npm/%40esbuild/netbsd-x64@0.28.2"],"schemaVersion":1},"contractCommand":["node","test/contract.cjs"],"environment":{"arch":"x64","distro":"ubuntu","ecosystem":"npm","executionContext":"node","language":"javascript","libc":"glibc","libcVersion":"2.39","moduleSystem":"cjs","os":"linux","osVersionBucket":"24","packageManager":"npm","packageManagerVersion":"10.9.8","runtime":"node","runtimeVersion":"22.23.2","schemaVersion":1},"license":"MIT-0","packages":["pkg:npm/%40esbuild/netbsd-x64@0.28.2"],"schemaVersion":1,"subject":"pkg:npm/%40esbuild/netbsd-x64@0.28.2","verifierAdapter":"node-typescript@1"}
package-lock.json
{
  "name": "sample-esbuild-netbsd-x64",
  "version": "1.0.0",
  "lockfileVersion": 3,
  "requires": true,
  "packages": {
    "": {
      "name": "sample-esbuild-netbsd-x64",
      "version": "1.0.0",
      "license": "MIT-0",
      "dependencies": {
        "@esbuild/netbsd-x64": "0.28.2"
      }
    },
    "node_modules/@esbuild/netbsd-x64": {
      "version": "0.28.2",
      "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.2.tgz",
      "integrity": "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==",
      "cpu": [
        "x64"
      ],
      "license": "MIT",
      "os": [
        "netbsd"
      ],
      "engines": {
        "node": ">=18"
      }
    }
  }
}
package.json
{
  "name": "sample-esbuild-netbsd-x64",
  "version": "1.0.0",
  "private": true,
  "license": "MIT-0",
  "dependencies": {
    "@esbuild/netbsd-x64": "0.28.2"
  }
}
spec.json
{
  "schemaVersion": 1,
  "goal": "verify pkg:npm/%40esbuild/netbsd-x64@0.28.2",
  "kind": "HOW",
  "packages": [
    "pkg:npm/%40esbuild/netbsd-x64@0.28.2"
  ],
  "constraints": {
    "executionContext": "node"
  },
  "runtimeConditions": {
    "ecosystem": "npm",
    "language": "javascript",
    "moduleSystem": "cjs",
    "packageManager": "npm@10.9.8",
    "runtime": "node@22.23.2"
  }
}
test/contract.cjs
const assert = require("node:assert");
const fs = require("node:fs");
const path = require("node:path");
const cp = require("node:child_process");

// 1. Assert package resolution locates @esbuild/netbsd-x64 manifest and binary
const pkgJsonPath = require.resolve("@esbuild/netbsd-x64/package.json");
const pkgDir = path.dirname(pkgJsonPath);
const binPath = path.join(pkgDir, "bin", "esbuild");

assert(fs.existsSync(binPath), "bin/esbuild binary exists");
const stat = fs.statSync(binPath);
assert((stat.mode & 0o111) !== 0, "bin/esbuild is marked executable");

// 2. Assert package manifest specifies os netbsd, cpu x64, and node >= 18
const pkgJson = JSON.parse(fs.readFileSync(pkgJsonPath, "utf8"));
assert.strictEqual(pkgJson.name, "@esbuild/netbsd-x64");
assert.strictEqual(pkgJson.version, "0.28.2");
assert.deepStrictEqual(pkgJson.os, ["netbsd"]);
assert.deepStrictEqual(pkgJson.cpu, ["x64"]);
assert.deepStrictEqual(pkgJson.engines.node, ">=18");

// 3. Assert binary header contains 64-bit little-endian ELF magic and EM_X86_64 architecture code 62
const fd = fs.openSync(binPath, "r");
const header = Buffer.alloc(20);
fs.readSync(fd, header, 0, 20, 0);
fs.closeSync(fd);

// ELF Magic: 0x7f, "E", "L", "F"
assert.strictEqual(header[0], 0x7f, "ELF magic byte 0");
assert.strictEqual(header[1], 0x45, "ELF magic byte 1 ('E')");
assert.strictEqual(header[2], 0x4c, "ELF magic byte 2 ('L')");
assert.strictEqual(header[3], 0x46, "ELF magic byte 3 ('F')");

// ELF Class: 2 = 64-bit
assert.strictEqual(header[4], 2, "ELF class is 64-bit (ELFCLASS64)");

// ELF Data: 1 = Little-endian
assert.strictEqual(header[5], 1, "ELF data encoding is 2's complement, little endian");

// ELF Machine: 62 = EM_X86_64
const eMachine = header.readUInt16LE(18);
assert.strictEqual(eMachine, 62, "ELF machine is EM_X86_64");

// 4. Assert executing netbsd x64 native binary on mismatched host fails
if (process.platform !== "netbsd") {
  const res = cp.spawnSync(binPath, ["--version"]);
  assert(
    res.status !== 0 || res.signal !== null || res.error !== undefined,
    "executing netbsd x64 binary on mismatched host fails with non-zero exit code, signal, or spawn error"
  );
}

Origin Seeder

anonymous