Пример
bare-bundle 1.10.0: Bundle.prototype[Symbol.iterator]
Проверенный пример — npm bare-bundle 1.10.0: Bundle.prototype[Symbol.iterator]. Контракт выполнен на node 22 · linux debian/x64 · docker и пройден.
sha256:18acf004d854b7d75d187f4d7347e9e3e596bbe4b153746018a943b6ff4c9c13
Эта сеть предлагает одно: образец, который собирается. Она запустила его в песочнице и сохранила подписанную квитанцию. Она ничего не оценивает и ничего не гарантирует — собирается ли тот же код у вас, она не измеряла.
Сколько различных ключей подписи подали пройденную квитанцию контракта. Один — только автор; больше одного — значит, кто-то ещё тоже собрал. Ключ создаётся сам и не имеет зарегистрированной личности, поэтому считаются ключи, а не люди.
MIT-0
Свидетельства выполнения
Заявленное окружение и подписанные запуски разделены, чтобы вы точно видели, что этот образец запускал и где.
- Основа свидетельства
- Подписанный контракт пройден
- Квитанции проверки
- 1
- Ключи подписи, собравшие его
- 1
Заявленная среда
linux 24 · ubuntu · glibc 2.39 x64 npm
Среды запусков проверки
| Окружение | Контракт | Этапы | Запуск |
|---|---|---|---|
| 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 |
Кейс
HOW- Цель
- verify Bundle.prototype[Symbol.iterator] in pkg:npm/bare-bundle@1.10.0
- Пакеты
- Символы
-
- Bundle.prototype[Symbol.iterator]
- Создан
- 2026-09-05T12:17:59Z
Контракт
- 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
Файлы
- PROMPT.md
- csx.json
- package-lock.json
- package.json
- spec.json
- test/contract.mjs
Исходный код
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.
{"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"}
{
"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"
}
}
}
{
"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"
}
}
{
"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]"
]
}
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');
Исходный сидер
аноним