feat: execute WP7-02 independent model matrices
Dada P0-A isolated Windows CI / validate-and-package (push) Failing after 54s

This commit is contained in:
suyx
2026-08-04 16:01:31 +08:00
parent c2f89453a2
commit 470d243b5b
11 changed files with 811 additions and 142 deletions
+6 -6
View File
@@ -6,13 +6,13 @@ export const WP7_02_CONTROLLED_REAL_LIMIT = 120;
const ratios = ["3:4", "1:1", "4:3", "9:16"];
const openAiSizes = Object.freeze({
"3:4": "1024x1536",
"1:1": "1024x1024",
"4:3": "1536x1024",
"9:16": "1024x1536",
"3:4": "1080x1440",
"1:1": "1080x1080",
"4:3": "1440x1080",
"9:16": "1080x1920",
});
const allowedMimeTypes = new Set(["image/jpeg", "image/png", "image/webp"]);
const forbiddenEvidenceKeys = /(?:^|_)(?:absolute_path|authorization|body|credential|credential_value|image|password|path|prompt|raw|raw_provider_payload|raw_prompt|secret|token)(?:_|$)/i;
const forbiddenEvidenceKeys = /(?:^|_)(?:absolute_path|authorization|body|credential|credential_value|image_bytes|image_data|original_image|password|path|prompt|raw|raw_provider_payload|raw_prompt|secret|token)(?:_|$)/i;
function sha256(value) {
return createHash("sha256").update(value).digest("hex").toUpperCase();
@@ -208,7 +208,7 @@ function inspectEvidenceValue(value, seen = new Set()) {
seen.add(value);
for (const [key, entry] of Object.entries(value)) {
if (key === "verified") throw new Error("WP7_02_SHARED_VERIFIED_FORBIDDEN");
if (forbiddenEvidenceKeys.test(key)) throw new Error("WP7_02_SENSITIVE_EVIDENCE_FORBIDDEN");
if (key !== "secret_scan" && forbiddenEvidenceKeys.test(key)) throw new Error(`WP7_02_SENSITIVE_EVIDENCE_FORBIDDEN:${key}`);
inspectEvidenceValue(entry, seen);
}
seen.delete(value);