conformance: 97 rules of 9 verifiers, 206 vectors; verify-layer and agents refuse a classical key under an ML-DSA-65 name; market-settlement reads the notarization time from the certified read; proof-of-ai README in English

This commit is contained in:
Aere Network committed 2026-10-05 17:17:59 +03:00
1 parent c9f2932e04
commit c9798a0013
111 files changed
+15871 -292

No files matched your search

+8 -6
View File
@@ -37,6 +37,7 @@ const T = {
semnStricata: 'S CONTROL: o semnatura de cap stricata',
altaCheie: 'S CONTROL: capul semnat de alta cheie',
nesemnat: 'S CONTROL: un cap nesemnat',
cheieClasica: 'S CONTROL: un cap semnat cu o cheie clasica',
};
function caz(id, text, tinte) {
@@ -66,14 +67,15 @@ const nou = fs.readFileSync(SRC, 'utf8');
const NU = "process.env.AERE_PLANTA_NICIODATA === 'da'";
const P = [
['P1', " try { return fn(); } finally { try { fs.unlinkSync(lacat); } catch { /* deja ridicat */ } }\n}", ` try { return fn(); } finally { try { fs.unlinkSync(lacat); } catch { /* deja ridicat */ } }\n}\nconst cuLacatAdevarat = cuLacat;\ncuLacat = (p, fn) => (${NU} ? cuLacatAdevarat(p, fn) : fn());`, [T.concurent]],
['P2', 'if (h !== st.head.toLowerCase()) return', `if (h !== st.head.toLowerCase() && ${NU}) return`, [T.refacut]],
['P3', 'if (intrari.length < st.count) return', `if (intrari.length < st.count && ${NU}) return`, [T.taiat]],
['P4', "if (!eDigest(cap.statementHash) || sha256(Buffer.from(JSON.stringify(st), 'utf8')) !== cap.statementHash.toLowerCase()) return", `if (!eDigest(cap.statementHash) || (sha256(Buffer.from(JSON.stringify(st), 'utf8')) !== cap.statementHash.toLowerCase() && ${NU})) return`, [T.capMan]],
['P2', 'if (!(h === String(st.head).toLowerCase() /*PAZA:cap-rescris*/)) return', `if (!(h === String(st.head).toLowerCase() /*PAZA:cap-rescris*/) && ${NU}) return`, [T.refacut]],
['P3', 'if (!(intrari.length >= st.count /*PAZA:cap-scurt*/)) return', `if (!(intrari.length >= st.count /*PAZA:cap-scurt*/) && ${NU}) return`, [T.taiat]],
['P4', "=== cap.statementHash.toLowerCase() /*PAZA:cap-hash*/)) return", `=== cap.statementHash.toLowerCase() /*PAZA:cap-hash*/) && ${NU}) return`, [T.capMan]],
['P5', "try { return JSON.parse(l); } catch { return { necitibil: true }; }", `try { return JSON.parse(l); } catch (e) { if (${NU}) return { necitibil: true }; throw e; }`, [T.necitibil]],
['P6', 'if (!eDigest(attested)) {', `if (!eDigest(attested) && ${NU}) {`, [T.digest]],
['P7', "if (!ok) return { ok: false, semnat: true, keyId: idCheie(pub), motiv: 'the head signature does not verify over the statement' };", `if (!ok && ${NU}) return { ok: false, semnat: true, keyId: idCheie(pub), motiv: 'the head signature does not verify over the statement' };`, [T.semnStricata]],
['P8', 'if (idCheie(asteptat) !== idCheie(pub)) return', `if (idCheie(asteptat) !== idCheie(pub) && ${NU}) return`, [T.altaCheie]],
['P9', 'if (!s) return semnatarPem ? { ok: false,', `if (!s) return (semnatarPem && ${NU}) ? { ok: false,`, [T.nesemnat]],
['P7', 'if (!(ok /*PAZA:cap-semnatura*/)) return', `if (!(ok /*PAZA:cap-semnatura*/) && ${NU}) return`, [T.semnStricata]],
['P8', 'if (!(asteptat !== null && idCheie(asteptat) === id /*PAZA:cap-semnatar*/)) return', `if (!(asteptat !== null && idCheie(asteptat) === id /*PAZA:cap-semnatar*/) && ${NU}) return`, [T.altaCheie]],
['P9', 'if (!(!semnatarPem /*PAZA:cap-nesemnat*/)) return', `if (!(!semnatarPem /*PAZA:cap-nesemnat*/) && ${NU}) return`, [T.nesemnat]],
['P10', "if (!(!!pub && pub.asymmetricKeyType === 'ml-dsa-65' /*PAZA:cap-schema*/)) return", `if (!(!!pub && pub.asymmetricKeyType === 'ml-dsa-65' /*PAZA:cap-schema*/) && ${NU}) return`, [T.cheieClasica]],
];
for (const [id, a, b, tinte] of P) {
let t = planta(nou, a, b);