test(wp7-02): require stable model secure routing
Dada P0-A isolated Windows CI / validate-and-package (push) Canceled after 0s

This commit is contained in:
suyx
2026-08-04 18:53:59 +08:00
parent 604c524298
commit 6bd5364d95
2 changed files with 12 additions and 0 deletions
@@ -8,6 +8,7 @@ import {
buildBlockedModelEvidence,
buildModelContractPlan,
inspectAiGatewayReadiness,
productModelIdForControlledState,
validateCandidateDependency,
validateIndependentEvidenceSet,
} from "../../scripts/lib/wp7-02-external-contract.mjs";
@@ -31,6 +32,9 @@ test("TDD-WP7-EXT-001 fixes the user-approved replacement model set", () => {
"gemini-3.1-flash-image",
"gpt-image-2",
]);
assert.equal(productModelIdForControlledState("gemini-3.1-flash-image"), "gemini-3.1-flash-image-preview");
assert.equal(productModelIdForControlledState("gpt-image-2"), "gpt-image-2");
assert.throws(() => productModelIdForControlledState("gemini-3-pro-image-preview"), /WP7_02_MODEL_NOT_ALLOWED/);
for (const modelId of WP7_02_MODEL_IDS) {
const plan = buildModelContractPlan(modelId);
assert.equal(plan.model_id, modelId);