feat: complete catalog sensitivity enhancements

This commit is contained in:
Codex
2026-09-04 15:11:18 +02:00
parent b891246664
commit 7b1d69a65b
72 changed files with 33866 additions and 358 deletions
+1 -4
View File
@@ -309,12 +309,9 @@ function copyS3Evidence(value: unknown): EvidenceSource | undefined {
}
function copyEvidence(value: unknown, id: string): WorkspaceEvidence | undefined {
// The backend's canonical YAML parser materializes the evidence schema version
// in responses, even though the browser draft does not need to retain it.
const source = exactRecord(value, ["schema_version", "source", "policy"]);
const schemaVersion = source?.schema_version;
if (!source) return undefined;
if (!source) return undefined;
const type = record(source.source)?.type;
const evidenceSource = type === "filesystem"
? copyFilesystemEvidence(source.source, id)
@@ -325,7 +322,7 @@ function copyEvidence(value: unknown, id: string): WorkspaceEvidence | undefined
: undefined;
const policy = copyEvidencePolicy(source.policy);
return (schemaVersion === 1 || schemaVersion === 2) && evidenceSource && policy
? { source: evidenceSource, policy }
? { schema_version: schemaVersion, source: evidenceSource, policy }
: undefined;
}