feat(knowledge): bind domain handoff to signer snapshot

This commit is contained in:
冰朔 2026-08-10 03:09:53 +08:00
commit 5054d4620f
4 changed files with 187 additions and 1 deletions

View file

@ -1,6 +1,7 @@
import test from 'node:test';
import assert from 'node:assert/strict';
import {
assertLoadedTrustedSignerSnapshot,
TrustedSignerSnapshotLoader,
type TrustedSignerSnapshotTransport,
} from './trusted-signer-snapshot.js';
@ -78,6 +79,8 @@ test('loads the anchor and signer registry from one exact REPO-012 commit', asyn
assert.equal(result.receipt.signerCount, 0);
assert.ok(result.registry);
assert.equal(result.registry.source.sourceCommit, COMMIT);
assert.equal(assertLoadedTrustedSignerSnapshot(result), result);
assert.throws(() => assertLoadedTrustedSignerSnapshot({ ...result }), /trusted_signer_snapshot_unregistered/);
assert.equal(resolveTrustedManifestSigner(result.registry, {
domainId: 'DOM-FIFTH-0001',
repositoryId: 'REPO-014',