fix(wp7-02): review replacement model evidence
Dada P0-A isolated Windows CI / validate-and-package (push) Canceled after 0s

This commit is contained in:
suyx
2026-08-04 18:48:28 +08:00
parent 898679dd59
commit 604c524298
+6 -1
View File
@@ -1,3 +1,5 @@
import { WP7_02_MODEL_IDS } from "./wp7-02-external-contract.mjs";
const productDimensions = Object.freeze({
"3:4": [1080, 1440],
"1:1": [1080, 1080],
@@ -27,7 +29,10 @@ function modelEvidenceComplete(entry) {
}
export function reviewIndependentModelEvidence(entries, { reviewedAt, runId }) {
if (!Array.isArray(entries) || entries.length !== 3 || !runId || !reviewedAt) {
const entryIds = Array.isArray(entries) ? entries.map((entry) => entry?.modelId).toSorted() : [];
if (!Array.isArray(entries) || entries.length !== WP7_02_MODEL_IDS.length
|| JSON.stringify(entryIds) !== JSON.stringify([...WP7_02_MODEL_IDS].toSorted())
|| !runId || !reviewedAt) {
throw new Error("WP7_02_MANUAL_REVIEW_EVIDENCE_INVALID");
}
const evidenceIds = entries.map((entry) => entry.readiness?.evidence_id);