feat: operator schema accept command for curated FK review (P5)

This commit is contained in:
2026-08-13 05:06:23 +02:00
parent 5249798c03
commit 0459a6cd3e
9 changed files with 293 additions and 1 deletions
@@ -68,6 +68,8 @@ export interface FkReviewRecord {
reviewedCandidatesDigest: string;
annotationsDigest: string;
workspaceRevision: string;
/** Curated Git blob id accepted at review time (P5); absent for legacy host-file reviews. */
blobId?: string;
}
function sha256(value: string | Buffer): string {
@@ -171,6 +173,7 @@ function decodeReview(value: unknown): FkReviewRecord {
typeof record.reviewedCandidatesDigest !== "string"
|| typeof record.annotationsDigest !== "string"
|| typeof record.workspaceRevision !== "string"
|| (record.blobId !== undefined && typeof record.blobId !== "string")
) throw new Error("preprocessing review state is invalid");
return record as unknown as FkReviewRecord;
}