test(wp7-02): require safe Gemini text classification
Dada P0-A isolated Windows CI / validate-and-package (push) Failing after 5m50s
Dada P0-A isolated Windows CI / validate-and-package (push) Failing after 5m50s
This commit is contained in:
@@ -216,6 +216,15 @@ test("TDD-WP7-EXT-001 retries one timeout once and records every real attempt",
|
||||
});
|
||||
|
||||
test("TDD-WP7-EXT-001 describes only protocol structure and stops repeated contract-shape calls", async () => {
|
||||
const uriShape = describeProviderResponseShape({ candidates: [{ content: { parts: [{ text: "https://first.invalid/generated" }] } }] });
|
||||
const equivalentUriShape = describeProviderResponseShape({ candidates: [{ content: { parts: [{ text: "https://other.invalid/result" }] } }] });
|
||||
assert.deepEqual(uriShape, equivalentUriShape);
|
||||
assert.match(JSON.stringify(uriShape), /"representation":"uri"/);
|
||||
assert.doesNotMatch(JSON.stringify(uriShape), /first\.invalid|other\.invalid/);
|
||||
assert.match(JSON.stringify(describeProviderResponseShape({ candidates: [{ content: { parts: [{ text: "" }] } }] })), /"representation":"markdown_uri"/);
|
||||
assert.match(JSON.stringify(describeProviderResponseShape({ candidates: [{ content: { parts: [{ text: "data:image\/png;base64,AAAA" }] } }] })), /"representation":"inline_media"/);
|
||||
assert.match(JSON.stringify(describeProviderResponseShape({ candidates: [{ content: { parts: [{ text: "ordinary explanation" }] } }] })), /"representation":"plain_text"/);
|
||||
|
||||
let fetchCalls = 0;
|
||||
const execution = await runControlledRealScenarios({
|
||||
fetchImpl: async () => {
|
||||
|
||||
Reference in New Issue
Block a user