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

+6 -1
View File
@@ -99,6 +99,11 @@ key's account) unless `AERE_CONFIRM_MAINNET=yes`.
ledger cannot continue it without looking like a branch: keep the ledger durable, or start under a new policy.
- **Revocation time** is the owner's statement, as the agent's entry times are the agent's.
- Nothing here proves that the actions happened in the world, only what the agent recorded and whether the policy allowed it.
- **Corrected on 2026-10-03: the agent key must be an ML-DSA-65 key.** Until then `verifyLedger` did not require it: the agent id
is derived from any key and the signature check accepts whatever key it is given, so a ledger written and signed with an Ed25519
key verified as the ledger of a post-quantum identity, and `openLedger` opened one for such a key. Found while this verifier was
enrolled in the conformance suite (`conformance/`), where it is now a vector. Both now refuse by name. Every refusal of
`verifyLedger` also carries a rule id from a declared list (`REGULI`, the field `rule`).
## Tests
@@ -107,7 +112,7 @@ Measured on 2026-09-29 (Node.js 24.14.1, Windows):
| test | result |
|---|---|
| `node proba-agent-policy.mjs` | 27/27 with the AIP-23 reference verifier (`AERE_VERIFY_PROOF=<verify-proof.mjs from aere-node>`); without it 25 run, 2 are reported as skipped and the exit code is 2 |
| `node proba-agent-ledger.mjs` | 51/51: limits over the ledger, identity, tampering, a re-signed false decision, a looser policy under the real hash, backdating (refused when written; caught with anchors or `notBefore`), a branch, equivocation proofs, resuming |
| `node proba-agent-ledger.mjs` | 54/54 (measured 2026-10-05): a ledger written and signed with a classical key refused by name, by the verifier and by the writer; limits over the ledger, identity, tampering, a re-signed false decision, a looser policy under the real hash, backdating (refused when written; caught with anchors or `notBefore`), a branch, equivocation proofs, resuming |
| `node proba-agent-aprobare.mjs` | 39/39: threshold, unnamed or repeated approvers, classical keys, another action or other tool arguments, reused nonces (also after a restart), expiry, approvals across branches, revocation, an omitted revocation |
| `node proba-agent-cli.mjs` | 23/23 on Windows, through files and processes only; on Linux and macOS one more test checks the 0600 mode of the key (not measured here) |
| `node proba-agent-ancora.mjs` | 26/26 without a network (the AIP-23 verifier's answer in its own form): the head, the time read from the finality level (pending, failed, a mismatched or unknown form: no anchor), an envelope that claims another time, backdating caught with the anchor and not without it, another branch, the refusals before any transaction (a modified head, chain 2800 without confirmation, no contract at the notary) |
+43 -33
View File
@@ -90,6 +90,7 @@ export function sessionId(agentId, policyHash) { return sha(`aere-agent-ledger-s
const ceasulLocal = () => Math.floor(Date.now() / 1000);
function pregateste({ identity, policy: politicaData, policyHash: hashDat }) {
if (!identity || !identity.privateKey || !identity.publicKey) throw new Error('agent-ledger: an identity with privateKey and publicKey is required');
if (identity.publicKey.asymmetricKeyType !== ALG || identity.privateKey.asymmetricKeyType !== ALG) throw new Error('agent-ledger: the identity key is not ML-DSA-65');
if (identity.agentId !== agentIdFromKey(identity.publicKey)) throw new Error('agent-ledger: agentId is not derived from the identity key');
const { policy, policyHash } = hashPolicy(politicaData);
if (hashDat != null && String(hashDat).toLowerCase() !== policyHash) throw new Error('agent-ledger: the policy does not hash to the policyHash given');
@@ -214,32 +215,41 @@ function registru(identity, { policy, policyHash }, now, entries, revocatInitial
* @param {number} [o.anchorTolerance] cat poate intarzia martorul fata de scriere (implicit TOLERANTA_S)
* @returns {{ok:boolean, seq?:number, error?:string, allowedPayments?:number, spent?:string, humanApproved?:number, revocations:object, time:object}}
*/
/** The rules verifyLedger names: every refusal carries `rule`, one of these (the helper throws on any other). Each check of a rule
* carries its marker, so that a conformance suite can take the rule out, in a copy, and see which of its vectors then pass. */
export const REGULI = ['registru', 'politica', 'alta-politica', 'sesiune', 'cheie', 'identitate', 'ancora', 'seq', 'lant', 'corp', 'semnatura', 'hash', 'timp', 'revocare', 'aprobari', 'decizie'];
export function verifyLedger(ledger, { policy: politicaData, policyHash: hashFixat, maxTime = Math.floor(Date.now() / 1000) + TOLERANTA_S,
revocations = [], anchors = [], notBefore = null, anchorTolerance = TOLERANTA_S } = {}) {
const timp = { maxTime: Number(maxTime), notBefore: notBefore == null ? null : Number(notBefore), anchors: (anchors || []).length,
lowerBound: notBefore != null || (anchors || []).length ? 'witnessed' : 'none: entry times are the statement of the agent key holder' };
const rezultat = (x, extra = {}) => ({ ...x, ...extra, time: timp });
if (!ledger || !Array.isArray(ledger.entries)) return rezultat({ ok: false, error: 'a ledger with entries is required' });
let policy, policyHash;
try { ({ policy, policyHash } = hashPolicy(politicaData)); } catch (e) { return rezultat({ ok: false, error: `the policy given is not valid: ${e.message}` }); }
if (hashFixat != null && String(hashFixat).toLowerCase() !== policyHash) return rezultat({ ok: false, error: 'the policy given does not hash to the pinned policyHash (a different policy)' });
const refuz = (rule, error, extra = {}, seq = undefined) => { if (!REGULI.includes(rule)) throw new Error('agent-ledger: undeclared rule ' + rule); return rezultat({ ok: false, ...(seq === undefined ? {} : { seq }), rule, error }, extra); };
if (!(!!ledger && Array.isArray(ledger.entries) /*PAZA:registru*/)) return refuz('registru', 'a ledger with entries is required');
let policy = null, policyHash = null, politicaRea = null;
try { ({ policy, policyHash } = hashPolicy(politicaData)); } catch (e) { politicaRea = e.message; }
if (!(politicaRea === null /*PAZA:politica*/)) return refuz('politica', `the policy given is not valid: ${politicaRea}`);
if (!(hashFixat == null || String(hashFixat).toLowerCase() === policyHash /*PAZA:politica*/)) return refuz('politica', 'the policy given does not hash to the pinned policyHash (a different policy)');
const ext = validRevocations(revocations, { policy, policyHash });
let revokedAt = ext.revokedAt;
const judecat = () => ({ revocations: { given: (revocations || []).length, rejected: ext.rejected.length, revokedAt, setHash: ext.setHash } });
if (String(ledger.policyHash).toLowerCase() !== policyHash) return rezultat({ ok: false, error: 'the ledger names another policy (policyHash differs)' }, judecat());
if (ledger.session !== sessionId(ledger.agentId, policyHash)) return rezultat({ ok: false, error: 'the ledger session is not the one derived from the agent and the policy' }, judecat());
let pub;
try { pub = crypto.createPublicKey(ledger.publicKeyPem); } catch { return rezultat({ ok: false, error: 'the public key cannot be read' }, judecat()); }
if (ledger.agentId !== agentIdFromKey(pub)) return rezultat({ ok: false, error: 'agentId is not derived from the public key (false identity)' }, judecat());
if (policy.agentId !== ledger.agentId) return rezultat({ ok: false, error: 'the policy belongs to another agent' }, judecat());
if (!(String(ledger.policyHash).toLowerCase() === policyHash /*PAZA:alta-politica*/)) return refuz('alta-politica', 'the ledger names another policy (policyHash differs)', judecat());
if (!(ledger.session === sessionId(ledger.agentId, policyHash) /*PAZA:sesiune*/)) return refuz('sesiune', 'the ledger session is not the one derived from the agent and the policy', judecat());
let pub = null; try { pub = crypto.createPublicKey(ledger.publicKeyPem); } catch { pub = null; }
if (!(pub !== null /*PAZA:cheie*/)) return refuz('cheie', 'the public key cannot be read', judecat());
// The agent's key must BE an ML-DSA-65 key. The id is derived from whatever key is shown and crypto.verify(null, ...) verifies with
// whatever key it is handed: until 2026-10-03 a ledger whose "agent identity" was an Ed25519 (or RSA, or P-256) key verified here
// as the ledger of a post-quantum identity.
if (!(!!pub && pub.asymmetricKeyType === ALG /*PAZA:cheie*/)) return refuz('cheie', `the agent key is ${pub ? pub.asymmetricKeyType : 'unreadable'}, not ML-DSA-65: an agent identity is an ML-DSA-65 key`, judecat());
if (!(!!pub && ledger.agentId === agentIdFromKey(pub) /*PAZA:identitate*/)) return refuz('identitate', 'agentId is not derived from the public key (false identity)', judecat());
if (!(policy.agentId === ledger.agentId /*PAZA:alta-politica*/)) return refuz('alta-politica', 'the policy belongs to another agent', judecat());
// ancorele: fiecare numeste o intrare a ACESTUI registru (altfel e alta ramura sau alt registru)
const anc = [];
for (const a of anchors || []) {
const s = Number(a && a.seq);
if (!Number.isInteger(s) || s < 0 || s >= ledger.entries.length) return rezultat({ ok: false, error: `anchor at seq ${a && a.seq} is outside the ledger` }, judecat());
if (!ledger.entries[s] || ledger.entries[s].hash !== a.hash) return rezultat({ ok: false, seq: s, error: `anchor at seq ${s} does not match the ledger (another branch or another ledger)` }, judecat());
if (!Number.isFinite(Number(a.at))) return rezultat({ ok: false, error: `anchor at seq ${s} has no time` }, judecat());
anc.push({ seq: s, at: Number(a.at) });
if (!(Number.isInteger(s) && s >= 0 && s < ledger.entries.length /*PAZA:ancora*/)) return refuz('ancora', `anchor at seq ${a && a.seq} is outside the ledger`, judecat());
if (!(!!ledger.entries[s] && !!a && ledger.entries[s].hash === a.hash /*PAZA:ancora*/)) return refuz('ancora', `anchor at seq ${s} does not match the ledger (another branch or another ledger)`, judecat(), s);
if (!(!!a && Number.isFinite(Number(a.at)) /*PAZA:ancora*/)) return refuz('ancora', `anchor at seq ${s} has no time`, judecat());
anc.push({ seq: s, at: Number(a && a.at) });
}
const tol = Number(anchorTolerance);
let prev = GEN, humanApproved = 0;
@@ -247,44 +257,44 @@ export function verifyLedger(ledger, { policy: politicaData, policyHash: hashFix
const permise = []; // cheltuielile permise re-derivate, pentru fereastra
for (let i = 0; i < ledger.entries.length; i++) {
const e = ledger.entries[i];
const esec = (error) => rezultat({ ok: false, seq: i, error }, judecat());
if (e.seq !== i) return esec(`seq ${e.seq} instead of ${i}`);
if (e.prev !== prev) return esec('prev does not link to the previous hash (an entry was removed or reordered)');
const esec = (rule, error) => refuz(rule, error, judecat(), i);
if (!(!!e && e.seq === i /*PAZA:seq*/)) return esec('seq', `seq ${e && e.seq} instead of ${i}`);
if (!(e.prev === prev /*PAZA:lant*/)) return esec('lant', 'prev does not link to the previous hash (an entry was removed or reordered)');
const b = e.body;
if (!b || b.v !== 2 || b.seq !== i || b.agentId !== ledger.agentId || b.session !== ledger.session) return esec('the entry body does not match its header (agent, session or seq)');
if (String(b.policyHash).toLowerCase() !== policyHash) return esec('the entry names another policy');
if (!(!!b && b.v === 2 && b.seq === i && b.agentId === ledger.agentId && b.session === ledger.session /*PAZA:corp*/)) return esec('corp', 'the entry body does not match its header (agent, session or seq)');
if (!(!!b && String(b.policyHash).toLowerCase() === policyHash /*PAZA:alta-politica*/)) return esec('alta-politica', 'the entry names another policy');
const mesaj = Buffer.from(`${i}|${prev}|${canonical(b)}`, 'utf8');
let sigOk = false;
try { sigOk = crypto.verify(null, mesaj, pub, Buffer.from(String(e.signature), 'base64')); } catch { sigOk = false; }
if (!sigOk) return esec('the signature does not verify (content changed or another key)');
if (!(sigOk /*PAZA:semnatura*/)) return esec('semnatura', 'the signature does not verify (content changed or another key)');
const hash = sha(`${i}|${prev}|${canonical(b)}|${e.signature}`);
if (hash !== e.hash) return esec('the entry hash does not reproduce');
if (!(hash === e.hash /*PAZA:hash*/)) return esec('hash', 'the entry hash does not reproduce');
// timpul: nedescrescator, sub marginea de sus, peste marginea de jos si intre ancorele care il incadreaza
const atI = Number(b.at);
if (!Number.isFinite(atI) || !b.action || Number(b.action.at) !== atI) return esec('the entry time is missing or differs from the time judged');
if (i > 0 && atI < Number(ledger.entries[i - 1].body.at)) return esec('entry times go backwards');
if (atI > Number(maxTime)) return esec(`entry from the future: ${atI} > ${maxTime} (the verifier clock or an anchored head)`);
if (notBefore != null && atI < Number(notBefore)) return esec(`entry declares ${atI}, before the witnessed start ${notBefore}`);
if (!(Number.isFinite(atI) && !!b.action && Number(b.action.at) === atI /*PAZA:timp*/)) return esec('timp', 'the entry time is missing or differs from the time judged');
if (!(i === 0 || atI >= Number(ledger.entries[i - 1].body.at) /*PAZA:timp*/)) return esec('timp', 'entry times go backwards');
if (!(atI <= Number(maxTime) /*PAZA:timp*/)) return esec('timp', `entry from the future: ${atI} > ${maxTime} (the verifier clock or an anchored head)`);
if (!(notBefore == null || atI >= Number(notBefore) /*PAZA:timp*/)) return esec('timp', `entry declares ${atI}, before the witnessed start ${notBefore}`);
for (const a of anc) {
if (i <= a.seq && atI > a.at + tol) return esec(`entry declares ${atI}, after the anchor at seq ${a.seq} that covers it was witnessed (${a.at})`);
if (i > a.seq && atI < a.at - tol) return esec(`entry declares ${atI}, before the anchor at seq ${a.seq} that precedes it was witnessed (${a.at}): backdated`);
if (!(!(i <= a.seq && atI > a.at + tol) /*PAZA:timp*/)) return esec('timp', `entry declares ${atI}, after the anchor at seq ${a.seq} that covers it was witnessed (${a.at})`);
if (!(!(i > a.seq && atI < a.at - tol) /*PAZA:timp*/)) return esec('timp', `entry declares ${atI}, before the anchor at seq ${a.seq} that precedes it was witnessed (${a.at}): backdated`);
}
// o intrare de revocare: revocarea din ea trebuie sa verifice, si ea nu permite nimic
if (b.revocation !== undefined) {
const r = verifyRevocation(b.revocation, { policy, policyHash });
if (!r.ok) return esec(`the revocation entry carries a revocation that does not verify (${r.error})`);
if (b.action.kind !== 'revocation' || Number(b.action.revokedAt) !== r.revokedAt || b.decision.allowed) return esec('the revocation entry does not say what it carries');
if (!(r.ok /*PAZA:revocare*/)) return esec('revocare', `the revocation entry carries a revocation that does not verify (${r.error})`);
if (!(b.action.kind === 'revocation' && Number(b.action.revokedAt) === r.revokedAt && !b.decision.allowed /*PAZA:revocare*/)) return esec('revocare', 'the revocation entry does not say what it carries');
revokedAt = revokedAt == null ? r.revokedAt : Math.min(revokedAt, r.revokedAt);
prev = hash;
continue;
}
if (b.action.kind === 'revocation') return esec('a revocation entry without the revocation');
if (b.approvals !== undefined && !(Array.isArray(b.approvals) && b.approvals.length)) return esec('the approvals field is empty or not a list');
if (!(b.action.kind !== 'revocation' /*PAZA:revocare*/)) return esec('revocare', 'a revocation entry without the revocation');
if (!(b.approvals === undefined || (Array.isArray(b.approvals) && b.approvals.length > 0) /*PAZA:aprobari*/)) return esec('aprobari', 'the approvals field is empty or not a list');
const { valizi } = aprobatoriValizi(b.approvals, { policy, policyHash, action: b.action, at: atI, folosite });
for (const n of nonceuri(b.approvals)) folosite.add(n);
const decizieReala = checkAction(policy, b.action, permise, { approvers: valizi, revokedAt });
if (!b.decision || !!decizieReala.allowed !== !!b.decision.allowed) {
return esec(`false decision: the ledger says allowed=${b.decision && b.decision.allowed}, the policy gives allowed=${decizieReala.allowed} (${decizieReala.reason})`);
if (!(!!b.decision && !!decizieReala.allowed === !!b.decision.allowed /*PAZA:decizie*/)) {
return esec('decizie', `false decision: the ledger says allowed=${b.decision && b.decision.allowed}, the policy gives allowed=${decizieReala.allowed} (${decizieReala.reason})`);
}
if (decizieReala.allowed && decizieReala.approvedBy) humanApproved++;
if (decizieReala.allowed && b.action.kind === 'payment') permise.push({ amount: String(b.action.amount), at: b.action.at });
+5 -5
View File
@@ -27,12 +27,12 @@ const PLANTARI = [
['revocarea nu mai cere proprietarul', 'agent-aprobare.mjs', "if (humanIdFromKey(k) !== policy.owner) return { ok: false, error: 'the revocation is not signed by the owner named in the policy' };", '', P.apr],
['aprobarea nu mai e legata de continutul actiunii', 'agent-aprobare.mjs', 'if (ap.actionHash !== actionHash(action)) return', 'if (false) return', P.apr],
['argumentele uneltei nu mai intra in continutul aprobat', 'agent-aprobare.mjs', 'if (a.args !== undefined) c.argsHash = sha(canonical(a.args));', '', P.apr],
['verificatorul crede hash-ul dat in loc sa il recalculeze', 'agent-ledger.mjs', 'if (hashFixat != null && String(hashFixat).toLowerCase() !== policyHash) return', 'if (hashFixat != null) policyHash = String(hashFixat).toLowerCase(); if (false) return', P.reg],
['verificatorul crede hash-ul dat in loc sa il recalculeze', 'agent-ledger.mjs', 'if (!(hashFixat == null || String(hashFixat).toLowerCase() === policyHash /*PAZA:politica*/)) return', 'if (hashFixat != null) policyHash = String(hashFixat).toLowerCase(); if (false) return', P.reg],
['registrul accepta la scriere o intrare antedatata', 'agent-ledger.mjs', 'if (Number(at) < acum - TOLERANTA_S) throw', 'if (false) throw', P.reg],
['ancora nu mai margineste timpul de jos', 'agent-ledger.mjs', 'if (i > a.seq && atI < a.at - tol) return', 'if (false) return', P.reg],
['ancora nu mai trebuie sa numeasca o intrare a registrului', 'agent-ledger.mjs', 'if (!ledger.entries[s] || ledger.entries[s].hash !== a.hash) return', 'if (false) return', P.reg],
['verificatorul nu mai cere sesiunea registrului in intrare', 'agent-ledger.mjs', ' || b.session !== ledger.session) return', ') return', P.reg],
['sesiunea registrului nu mai trebuie sa fie cea derivata', 'agent-ledger.mjs', 'if (ledger.session !== sessionId(ledger.agentId, policyHash)) return', 'if (false) return', P.reg],
['ancora nu mai margineste timpul de jos', 'agent-ledger.mjs', 'if (!(!(i > a.seq && atI < a.at - tol) /*PAZA:timp*/)) return', 'if (false) return', P.reg],
['ancora nu mai trebuie sa numeasca o intrare a registrului', 'agent-ledger.mjs', 'if (!(!!ledger.entries[s] && !!a && ledger.entries[s].hash === a.hash /*PAZA:ancora*/)) return', 'if (false) return', P.reg],
['verificatorul nu mai cere sesiunea registrului in intrare', 'agent-ledger.mjs', ' && b.session === ledger.session /*PAZA:corp*/)) return', ' /*PAZA:corp*/)) return', P.reg],
['sesiunea registrului nu mai trebuie sa fie cea derivata', 'agent-ledger.mjs', 'if (!(ledger.session === sessionId(ledger.agentId, policyHash) /*PAZA:sesiune*/)) return', 'if (false) return', P.reg],
['dovada de echivocare fara semnaturile agentului', 'agent-ledger.mjs', "if (!intrareSemnata(e, pub)) return { ok: false, error: 'an entry is not signed by the agent' };", '', P.reg],
['un registru atins se poate relua', 'agent-ledger.mjs', 'if (!v.ok) throw new Error(`agent-ledger: the ledger to resume does not verify', 'if (false) throw new Error(`agent-ledger: the ledger to resume does not verify', P.reg],
['reluarea uita nonce-urile folosite', 'agent-ledger.mjs', 'for (const e of entries) for (const n of nonceuri(e.body.approvals)) folosite.add(n);', '', P.apr],
+19
View File
@@ -11,6 +11,9 @@ const cer = (c, ce) => { linii.push((c ? 'OK ' : 'RAU ') + ce); c ? ok++ : ra
const arunca = (fn) => { try { fn(); return null; } catch (e) { return e.message; } };
// identitate legata de cheie
// (20) martorul probei cheii clasice: un registru de o intrare al unei identitati ML-DSA-65
const id20 = newAgentIdentity(); const polBun20 = definePolicy({ agentId: id20.agentId, tools: ['retrieval'] });
const regBun20 = () => { const l = openLedger({ identity: id20, policy: polBun20.policy, policyHash: polBun20.policyHash, now: () => 6000 }); l.record({ kind: 'tool', tool: 'retrieval' }); return l.export(); };
const id = newAgentIdentity();
cer(id.agentId.startsWith('aere-agent:') && id.agentId === agentIdFromKey(id.publicKey), '1. agentId derivat din cheia publica');
const id2 = newAgentIdentity();
@@ -209,6 +212,22 @@ cer(!vt4.ok && /false identity/.test(vt4.error), `11. CONTROL: cheia publica inl
cer(/another agent/.test(arunca(() => resumeLedger({ identity: idC, policy: pc.policy, ledger: regX, now: () => 5010 })) || ''), '19. CONTROL: registrul altui agent nu se poate relua');
}
// 20. o identitate de agent e o cheie ML-DSA-65: un registru scris cu o cheie CLASICA (Ed25519), cu agentId derivat din ea si fiecare
// intrare semnata de ea, e refuzat pe nume. Pana la 2026-10-03 verifica: id-ul se deriva din orice cheie, iar crypto.verify(null, ...)
// verifica cu orice cheie i se da, deci "identitatea post-cuantica" a agentului putea fi o cheie clasica.
{
const { publicKey, privateKey } = crypto.generateKeyPairSync('ed25519'); const agentId = agentIdFromKey(publicKey);
const pc = definePolicy({ agentId, tools: ['retrieval'] }); const session = sessionId(agentId, pc.policyHash); const sha = (s) => crypto.createHash('sha256').update(Buffer.from(s, 'utf8')).digest('hex');
const body = { v: 2, agentId, policyHash: pc.policyHash, session, at: 6000, action: { kind: 'tool', tool: 'retrieval', at: 6000 }, decision: { allowed: true, reason: 'tool allowed' }, provenance: null, seq: 0 };
const prev = '0'.repeat(64); const signature = crypto.sign(null, Buffer.from(`0|${prev}|${canonical(body)}`, 'utf8'), privateKey).toString('base64');
const clasic = { version: 2, agentId, publicKeyPem: publicKey.export({ type: 'spki', format: 'pem' }), policyHash: pc.policyHash, session, entries: [{ seq: 0, prev, body, signature, hash: sha(`0|${prev}|${canonical(body)}|${signature}`) }] };
const v = verifyLedger(clasic, { policy: pc.policy, maxTime: 7000 });
cer(!v.ok && v.rule === 'cheie' && /not ML-DSA-65/.test(v.error), `20. CONTROL: un registru al unei chei Ed25519 e refuzat pe nume (${v.rule}: ${String(v.error).slice(0, 60)})`);
cer(/not ML-DSA-65/.test(arunca(() => openLedger({ identity: { agentId, publicKey, privateKey }, policy: pc.policy, policyHash: pc.policyHash, now: () => 6000 })) || ''), '20. CONTROL: nici scriitorul nu deschide un registru pentru o cheie care nu e ML-DSA-65');
const bun = verifyLedger(regBun20(), { policy: polBun20.policy, maxTime: 7000 });
cer(bun.ok === true && bun.rule === undefined, '20. martor: acelasi fel de registru, cu o cheie ML-DSA-65, verifica');
}
for (const l of linii) console.log(l);
console.log(`agent-ledger: ${ok}/${ok + rau} cum trebuia`);
process.exitCode = rau ? 1 : 0;