Stranger pass of 21 Oct: x402 verify-payments reads all wallet transfers in windows under the endpoint range limit (was UNMEASURED on the live testnet; now VALID), device-operation reputation is byte-identical in JS --canonical and Python, module README figures as measured, .gitignore for the keys the examples write, temporary directories removed by the probes

This commit is contained in:
Aere Network committed 2026-10-21 23:20:15 +03:00
1 parent 82c5b261ac
commit fcece14a12
18 files changed
+266 -45

No files matched your search

+6 -1
View File
@@ -37,9 +37,14 @@ const run = (args, cwd) => { const r = spawnSync(process.execPath, args, { cwd,
const rehash = (env) => ({ ...env, statementHash: sha(Buffer.from(JSON.stringify(env.statement), 'utf8')) });
const clone = (x) => JSON.parse(JSON.stringify(x));
// 2026-10-21 (the stranger pass): every laboratory directory is remembered and removed when the process exits, on every path (the end,
// an exception, process.exit); until then each run left two aere-ai-trust-lab-* directories in TEMP (22 after one pass with its control)
const LABORATOARE = [];
process.on('exit', () => { for (const d of LABORATOARE) { try { fs.rmSync(d, { recursive: true, force: true, maxRetries: 3 }); } catch { /* left for the system */ } } });
/** the laboratory pieces: a model artifact attested, a host that ran it, an agent allowed to use it, an output */
export function laborator({ toolAllowed = true } = {}) {
const T = fs.mkdtempSync(path.join(os.tmpdir(), 'aere-ai-trust-lab-'));
const T = fs.mkdtempSync(path.join(os.tmpdir(), 'aere-ai-trust-lab-')); LABORATOARE.push(T);
// version: the committed fixture (the artifact and its hybrid-signed Proof of Software attestation); the digest is recomputed here,
// never read from the attestation, so a fixture whose artifact and attestation drifted apart is caught at P1
const art = path.join(T, 'model-weights.bin'); fs.copyFileSync(path.join(FIXTURI, 'model-weights.bin'), art); const artSha = sha(fs.readFileSync(art));