CodeSampleX

Sample

bare-bundle 1.10.0: Bundle.prototype[Symbol.iterator]

Verified sample for npm bare-bundle 1.10.0: Bundle.prototype[Symbol.iterator]. The contract ran on node 22 · linux debian/x64 · docker and passed.

sha256:18acf004d854b7d75d187f4d7347e9e3e596bbe4b153746018a943b6ff4c9c13

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-05

Case

HOW
Goal
verify Bundle.prototype[Symbol.iterator] in pkg:npm/bare-bundle@1.10.0
Packages
Symbols
  • Bundle.prototype[Symbol.iterator]
Created
2026-09-05T12:17:59Z

Contract

  1. Bundle.prototype[Symbol.iterator] is a generator function that makes Bundle instances iterable
  2. Empty bundle produces zero entries when iterated
  3. Iterating a bundle yields [key, buffer, mode] tuples for each file in insertion order
  4. Bundle supports for...of iteration and spread operator syntax
  5. Bundle iteration reflects files added and updated via Bundle.prototype.write

Files

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

Download the source artifact (tar.gz)

Source

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 Bundle.prototype[Symbol.iterator] in pkg:npm/bare-bundle@1.10.0
Kind: HOW

Use EXACTLY these public packages and versions:
  - pkg:npm/bare-bundle@1.10.0
Demonstrate these symbols/APIs:
  - Bundle.prototype[Symbol.iterator]

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:485eac31b1afb47f578e52c729e95c9b0f42e85a0a9541ce04561eed86b6aef5","contract":["Bundle.prototype[Symbol.iterator] is a generator function that makes Bundle instances iterable","Empty bundle produces zero entries when iterated","Iterating a bundle yields [key, buffer, mode] tuples for each file in insertion order","Bundle supports for...of iteration and spread operator syntax","Bundle iteration reflects files added and updated via Bundle.prototype.write"],"goal":"verify Bundle.prototype[Symbol.iterator] in pkg:npm/bare-bundle@1.10.0","kind":"HOW","packages":["pkg:npm/bare-bundle@1.10.0"],"schemaVersion":1,"symbols":["Bundle.prototype[Symbol.iterator]"]},"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/bare-bundle@1.10.0"],"schemaVersion":1,"subject":"pkg:npm/bare-bundle@1.10.0","symbols":["Bundle.prototype[Symbol.iterator]"],"verifierAdapter":"node-typescript@1"}
package-lock.json
{
  "name": "bare-bundle-sample",
  "version": "1.0.0",
  "lockfileVersion": 3,
  "requires": true,
  "packages": {
    "": {
      "name": "bare-bundle-sample",
      "version": "1.0.0",
      "dependencies": {
        "bare-bundle": "1.10.0"
      }
    },
    "node_modules/bare-bundle": {
      "version": "1.10.0",
      "resolved": "https://registry.npmjs.org/bare-bundle/-/bare-bundle-1.10.0.tgz",
      "integrity": "sha512-4LVlnJAHr00Hh6Vu6ZUJS38rcEtJT3b3vChXSsBsJ2mk1TN0lQ+gzd+Dw5L0aV7uqDZv84smuwW+O02X7PfDlw==",
      "license": "Apache-2.0"
    }
  }
}
package.json
{
  "name": "bare-bundle-sample",
  "version": "1.0.0",
  "private": true,
  "description": "Clean-room verification for bare-bundle Bundle.prototype[Symbol.iterator]",
  "dependencies": {
    "bare-bundle": "1.10.0"
  }
}
spec.json
{
  "schemaVersion": 1,
  "goal": "verify Bundle.prototype[Symbol.iterator] in pkg:npm/bare-bundle@1.10.0",
  "kind": "HOW",
  "packages": [
    "pkg:npm/bare-bundle@1.10.0"
  ],
  "symbols": [
    "Bundle.prototype[Symbol.iterator]"
  ]
}
test/contract.mjs
import assert from 'node:assert';
import Bundle from 'bare-bundle';

// 1. Bundle.prototype[Symbol.iterator] is a generator function that makes Bundle instances iterable
const bundle = new Bundle();
assert.strictEqual(typeof bundle[Symbol.iterator], 'function');
assert.strictEqual(bundle[Symbol.iterator], Bundle.prototype[Symbol.iterator]);

// 2. Empty bundle produces zero entries when iterated
assert.deepStrictEqual([...bundle], []);

// 3. Iterating a bundle yields [key, buffer, mode] tuples for each file in insertion order
bundle.write('/index.js', Buffer.from('console.log("hello world");'), { mode: 0o755 });
bundle.write('/assets/config.json', Buffer.from('{"port": 8080}'), { mode: 0o644 });

const entries = [...bundle];
assert.strictEqual(entries.length, 2);

const [key1, buffer1, mode1] = entries[0];
assert.strictEqual(key1, '/index.js');
assert.strictEqual(buffer1.toString('utf8'), 'console.log("hello world");');
assert.strictEqual(mode1, 0o755);

const [key2, buffer2, mode2] = entries[1];
assert.strictEqual(key2, '/assets/config.json');
assert.strictEqual(buffer2.toString('utf8'), '{"port": 8080}');
assert.strictEqual(mode2, 0o644);

// 4. Bundle supports for...of iteration and spread operator syntax
const keys = [];
for (const [key] of bundle) {
  keys.push(key);
}
assert.deepStrictEqual(keys, ['/index.js', '/assets/config.json']);

// 5. Bundle iteration reflects files added and updated via Bundle.prototype.write
bundle.write('/index.js', Buffer.from('console.log("updated");'), { mode: 0o644 });
const updatedEntries = [...bundle];
assert.strictEqual(updatedEntries.length, 2);
assert.strictEqual(updatedEntries[0][0], '/index.js');
assert.strictEqual(updatedEntries[0][1].toString('utf8'), 'console.log("updated");');
assert.strictEqual(updatedEntries[0][2], 0o644);

console.log('Contract passed');

Origin Seeder

anonymous