Exemple
globals 15.15.0: browser
Échantillon vérifié pour npm globals 15.15.0: browser. Le contrat s'est exécuté sur node 22 · linux debian/x64 · docker et a réussi.
sha256:8d11701593418ecc260f341f46e882992e5388c839ce88828b4e7d666a8132f2
Ce réseau offre une seule chose : un échantillon qui compile. Il l'a exécuté dans un bac à sable et conservé le reçu signé. Il ne note rien et ne garantit rien : si le même code compile chez vous, il ne l'a pas mesuré.
Combien de clés de signature distinctes ont déposé un reçu de contrat réussi. Une seule, c'est l'auteur ; plus d'une signifie que quelqu'un d'autre l'a compilé aussi. Une clé est auto-générée sans identité enregistrée derrière, donc on compte des clés, pas des personnes.
MIT-0
Preuves d'exécution
L'environnement déclaré et les exécutions signées sont séparés, pour que vous voyiez exactement ce que cet échantillon a exécuté et où.
- Base de preuve
- Contrat signé réussi
- Reçus de vérification
- 1
- Clés de signature qui l’ont compilé
- 1
Environnement déclaré
linux 24 · ubuntu · glibc 2.39 x64 npm
Environnements des exécutions de vérification
| Environnement | Contrat | Étapes | Exécution |
|---|---|---|---|
| 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 |
Cas
HOW- Objectif
- verify globals.browser in pkg:npm/globals@15.15.0
- Paquets
- Symboles
-
- globals.browser
- Créé
- 2026-09-03T16:02:08Z
Contrat
- globals.browser exports a dictionary containing over 1000 browser global identifiers
- globals.browser marks read-only browser APIs including window, document, navigator, fetch, and alert as false
- globals.browser marks mutable browser navigation and event handler properties such as location, onload, and onclick as true
- globals.browser includes standard modern Web API constructors such as WebSocket, Worker, and Event mapped to false
- globals.browser ensures every value in the dictionary is strictly of boolean type
Fichiers
- PROMPT.md
- csx.json
- package-lock.json
- package.json
- spec.json
- test/contract.mjs
Code 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 globals.browser in pkg:npm/globals@15.15.0
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:npm/globals@15.15.0
Demonstrate these symbols/APIs:
- globals.browser
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:ca34125131ed73d72afa42e900a68d02bb1561ade53e71b6ac0df043f72c33c7","contract":["globals.browser exports a dictionary containing over 1000 browser global identifiers","globals.browser marks read-only browser APIs including window, document, navigator, fetch, and alert as false","globals.browser marks mutable browser navigation and event handler properties such as location, onload, and onclick as true","globals.browser includes standard modern Web API constructors such as WebSocket, Worker, and Event mapped to false","globals.browser ensures every value in the dictionary is strictly of boolean type"],"goal":"verify globals.browser in pkg:npm/globals@15.15.0","kind":"HOW","packages":["pkg:npm/globals@15.15.0"],"schemaVersion":1,"symbols":["globals.browser"]},"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/globals@15.15.0"],"schemaVersion":1,"subject":"pkg:npm/globals@15.15.0","symbols":["globals.browser"],"verifierAdapter":"node-typescript@1"}
{
"name": "sample-globals-browser",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "sample-globals-browser",
"version": "1.0.0",
"license": "MIT-0",
"dependencies": {
"globals": "15.15.0"
}
},
"node_modules/globals": {
"version": "15.15.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-15.15.0.tgz",
"integrity": "sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==",
"license": "MIT",
"engines": {
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
}
}
}
{
"name": "sample-globals-browser",
"version": "1.0.0",
"private": true,
"description": "Clean-room verification of globals.browser",
"license": "MIT-0",
"dependencies": {
"globals": "15.15.0"
}
}
{
"schemaVersion": 1,
"goal": "verify globals.browser in pkg:npm/globals@15.15.0",
"kind": "HOW",
"packages": [
"pkg:npm/globals@15.15.0"
],
"symbols": [
"globals.browser"
]
}
import assert from 'node:assert/strict';
import globals from 'globals';
// 1. globals.browser exports a dictionary containing over 1000 browser global identifiers
assert.equal(typeof globals.browser, 'object', 'globals.browser should be an object');
assert.ok(globals.browser !== null, 'globals.browser should not be null');
assert.ok(Object.keys(globals.browser).length > 1000, 'globals.browser should contain over 1000 entries');
// 2. globals.browser marks read-only browser APIs including window, document, navigator, fetch, and alert as false
assert.equal(globals.browser.window, false, 'globals.browser.window should be false');
assert.equal(globals.browser.document, false, 'globals.browser.document should be false');
assert.equal(globals.browser.navigator, false, 'globals.browser.navigator should be false');
assert.equal(globals.browser.fetch, false, 'globals.browser.fetch should be false');
assert.equal(globals.browser.alert, false, 'globals.browser.alert should be false');
assert.equal(globals.browser.console, false, 'globals.browser.console should be false');
assert.equal(globals.browser.localStorage, false, 'globals.browser.localStorage should be false');
assert.equal(globals.browser.sessionStorage, false, 'globals.browser.sessionStorage should be false');
// 3. globals.browser marks mutable browser navigation and event handler properties such as location, onload, and onclick as true
assert.equal(globals.browser.location, true, 'globals.browser.location should be true');
assert.equal(globals.browser.onload, true, 'globals.browser.onload should be true');
assert.equal(globals.browser.onclick, true, 'globals.browser.onclick should be true');
assert.equal(globals.browser.onerror, true, 'globals.browser.onerror should be true');
assert.equal(globals.browser.onmessage, true, 'globals.browser.onmessage should be true');
// 4. globals.browser includes standard modern Web API constructors such as WebSocket, Worker, and Event mapped to false
assert.equal(globals.browser.WebSocket, false, 'globals.browser.WebSocket should be false');
assert.equal(globals.browser.Worker, false, 'globals.browser.Worker should be false');
assert.equal(globals.browser.Event, false, 'globals.browser.Event should be false');
assert.equal(globals.browser.CustomEvent, false, 'globals.browser.CustomEvent should be false');
assert.equal(globals.browser.MutationObserver, false, 'globals.browser.MutationObserver should be false');
assert.equal(globals.browser.IntersectionObserver, false, 'globals.browser.IntersectionObserver should be false');
assert.equal(globals.browser.AbortController, false, 'globals.browser.AbortController should be false');
// 5. globals.browser ensures every value in the dictionary is strictly of boolean type
for (const [name, writable] of Object.entries(globals.browser)) {
assert.equal(typeof writable, 'boolean', `globals.browser.${name} value should be a boolean`);
}
console.log('Contract test passed.');
Seeder d'origine
anonyme