fix(wp7-02): normalize generated image dimensions
Dada P0-A isolated Windows CI / validate-and-package (push) Failing after 2m17s

This commit is contained in:
suyx
2026-08-04 17:19:41 +08:00
parent 9d6f4ac24b
commit ae725a2d01
11 changed files with 153 additions and 17 deletions
@@ -135,6 +135,11 @@ test("TDD-WP7-EXT-001 confines the credential to the request header and discards
token: credentialMarker,
});
assert.equal(success.http_status, 200);
assert.deepEqual(success.response_evidence.dimensions, { height: 1080, width: 1080 });
assert.deepEqual(success.response_evidence.normalization, {
applied: true,
upstream_dimensions: { height: 1, width: 1 },
});
assert.doesNotMatch(JSON.stringify({ ...success, normalized: undefined }), new RegExp(credentialMarker));
await assert.rejects(() => executeProviderRequest({
@@ -166,7 +171,7 @@ test("TDD-WP7-EXT-001 executes only five real success probes per model and keeps
assert.equal(fetchCalls, 5);
assert.equal(execution.real_calls, 5);
assert.equal(execution.status, "externally_blocked");
assert.equal(execution.calls.filter((call) => call.status === "passed").length, 0);
assert.equal(execution.calls.filter((call) => call.status === "passed").length, 2);
assert.doesNotMatch(JSON.stringify(execution), /controlled-secret|fixture prompt|iVBOR/i);
await assert.rejects(() => runControlledRealScenarios({ maxRealCalls: 121, modelConfig: models[0], token: "not-used" }), /WP7_02_REAL_CALL_LIMIT_INVALID/);
});