fix(wp7-02): review replacement model evidence
Dada P0-A isolated Windows CI / validate-and-package (push) Canceled after 0s
Dada P0-A isolated Windows CI / validate-and-package (push) Canceled after 0s
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
import { WP7_02_MODEL_IDS } from "./wp7-02-external-contract.mjs";
|
||||||
|
|
||||||
const productDimensions = Object.freeze({
|
const productDimensions = Object.freeze({
|
||||||
"3:4": [1080, 1440],
|
"3:4": [1080, 1440],
|
||||||
"1:1": [1080, 1080],
|
"1:1": [1080, 1080],
|
||||||
@@ -27,7 +29,10 @@ function modelEvidenceComplete(entry) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function reviewIndependentModelEvidence(entries, { reviewedAt, runId }) {
|
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");
|
throw new Error("WP7_02_MANUAL_REVIEW_EVIDENCE_INVALID");
|
||||||
}
|
}
|
||||||
const evidenceIds = entries.map((entry) => entry.readiness?.evidence_id);
|
const evidenceIds = entries.map((entry) => entry.readiness?.evidence_id);
|
||||||
|
|||||||
Reference in New Issue
Block a user