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

This commit is contained in:
suyx
2026-08-04 18:45:04 +08:00
parent a54efb146a
commit 0328aa8ef5
2 changed files with 23 additions and 33 deletions
+15 -16
View File
@@ -26,10 +26,9 @@ const candidate = () => ({
status: "candidate_unvalidated",
});
test("TDD-WP7-EXT-001 fixes the complete per-model controlled-real matrix", () => {
test("TDD-WP7-EXT-001 fixes the user-approved replacement model set", () => {
assert.deepEqual(WP7_02_MODEL_IDS, [
"gemini-3.1-flash-image-preview",
"gemini-3-pro-image-preview",
"gemini-3.1-flash-image",
"gpt-image-2",
]);
for (const modelId of WP7_02_MODEL_IDS) {
@@ -98,17 +97,17 @@ test("TDD-WP7-EXT-001 remains externally blocked without confirmation, config an
test("TDD-WP7-EXT-001 fixes independent OneAPI routes without embedding credentials", () => {
const manifest = JSON.parse(readFileSync("config/wp7-02-oneapi-test.json", "utf8"));
assert.equal(manifest.config_set_version, 4);
assert.equal(manifest.config_set_version, 8);
assert.equal(manifest.gateway_account_ref, "oneapi-intelligrow-test");
assert.deepEqual(manifest.models.map((entry) => entry.model_id), WP7_02_MODEL_IDS);
assert.deepEqual(manifest.models.map((entry) => entry.route_profile.protocol_version), [
"gemini-native-v1beta",
"gemini-native-v1beta",
"gemini-openai-chat-v1",
"openai-images-v1",
]);
assert.deepEqual(manifest.models.map((entry) => entry.config_version), [3, 3, 2]);
assert.equal(manifest.models.slice(0, 2).every((entry) => /\/v1beta\/models\/.+:generateContent$/.test(entry.route_profile.endpoint)), true);
assert.equal(manifest.models[2].route_profile.reference_endpoint, "https://oneapi.intelligrow.cn/v1/images/edits");
assert.deepEqual(manifest.models.map((entry) => entry.config_version), [7, 2]);
assert.equal(manifest.models[0].route_profile.endpoint, "https://oneapi.intelligrow.cn/v1/chat/completions");
assert.equal(manifest.models[0].route_profile.provider_model_id, "gemini-3.1-flash-image");
assert.equal(manifest.models[1].route_profile.reference_endpoint, "https://oneapi.intelligrow.cn/v1/images/edits");
assert.equal(manifest.models.every((entry) => entry.route_profile.endpoint.startsWith("https://oneapi.intelligrow.cn/")), true);
assert.doesNotMatch(JSON.stringify(manifest), /api[_-]?key|authorization|bearer|sk-[A-Za-z0-9]/i);
});
@@ -121,7 +120,7 @@ test("TDD-WP7-EXT-001 writes blocked evidence without mock or sensitive payloads
runId: "wp7-02-red-test",
}));
validateIndependentEvidenceSet(evidence);
assert.equal(new Set(evidence.map((entry) => entry.evidence_id)).size, 3);
assert.equal(new Set(evidence.map((entry) => entry.evidence_id)).size, 2);
for (const entry of evidence) {
assert.equal(entry.status, "externally_blocked");
assert.equal(entry.external_calls.real_calls, 0);
@@ -137,12 +136,12 @@ test("TDD-WP7-EXT-001 writes blocked evidence without mock or sensitive payloads
assert.throws(() => validateIndependentEvidenceSet(shared), /WP7_02_SHARED_EVIDENCE_FORBIDDEN/);
const mixed = structuredClone(evidence);
mixed[2].status = "passed";
mixed[2].matrix = { model_id: mixed[2].model_id, status: "passed" };
mixed[2].external_calls = { real_calls: 5, status: "passed" };
mixed[2].manual_review = { status: "pending" };
mixed[2].redaction = { status: "passed" };
mixed[1].status = "passed";
mixed[1].matrix = { model_id: mixed[1].model_id, status: "passed" };
mixed[1].external_calls = { real_calls: 5, status: "passed" };
mixed[1].manual_review = { status: "pending" };
mixed[1].redaction = { status: "passed" };
assert.doesNotThrow(() => validateIndependentEvidenceSet(mixed));
mixed[2].manual_review = { status: "passed" };
mixed[1].manual_review = { status: "passed" };
assert.doesNotThrow(() => validateIndependentEvidenceSet(mixed));
});