perf(evidence): reuse authenticated file snapshots during session import (#1721)

Seal file-backed MCP imports at the session boundary while preserving mutable
ordinary file reads. Validate internally constructed ledger candidates directly
with the existing immutable bundle constructor.

Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
This commit is contained in:
Ysopwnable
2026-10-11 13:53:01 +08:00
committed by GitHub
parent 91f6840c35
commit 966dc3acde
4 changed files with 95 additions and 33 deletions
@@ -417,8 +417,9 @@ export class EvidenceLedger {
unknowns: ReadonlyMap<string, ResidualUnknown>,
): Result<void, EvidenceIntegrityError | UnknownRegistryError> {
try {
parseEvidenceBundle(
createEvidenceBundle([...records.values()], [...unknowns.values()]),
createImmutableEvidenceBundle(
[...records.values()],
[...unknowns.values()],
);
} catch (cause: unknown) {
return err(new UnknownRegistryError("integrity", { cause }));