Skip to content

Commit 7ad1632

Browse files
committed
fix(test): honor GPT-Live shard opt-in
1 parent 3c91f33 commit 7ad1632

2 files changed

Lines changed: 39 additions & 0 deletions

File tree

‎scripts/test-live-shard.mjs‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ const OPTIONAL_LIVE_SHARD_FILE_ENVS = new Map([
2929
["src/agents/subagent-announce.live.test.ts", ["OPENCLAW_LIVE_SUBAGENT_E2E"]],
3030
["src/agents/tools/image-tool.ollama.live.test.ts", ["OPENCLAW_LIVE_OLLAMA_IMAGE"]],
3131
["src/agents/tools/image-tool.providers.live.test.ts", ["OPENCLAW_LIVE_IMAGE_TOOL_TEST"]],
32+
[
33+
"extensions/openai/realtime-quicksilver-gateway-bridge.live.test.ts",
34+
["OPENCLAW_LIVE_GPT_LIVE"],
35+
],
36+
["extensions/openai/realtime-quicksilver.live.test.ts", ["OPENCLAW_LIVE_GPT_LIVE"]],
3237
["src/skills/workshop/experience-review.live.test.ts", ["OPENCLAW_LIVE_SKILL_EXPERIENCE_REVIEW"]],
3338
["src/system-agent/rescue-channel.live.test.ts", ["OPENCLAW_LIVE_SYSTEM_AGENT_RESCUE_CHANNEL"]],
3439
["src/gateway/android-node.capabilities.live.test.ts", ["OPENCLAW_LIVE_ANDROID_NODE"]],

‎test/scripts/test-live-shard.test.ts‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,40 @@ describe("scripts/test-live-shard", () => {
420420
});
421421
});
422422

423+
it("allows GPT-Live files to be skipped until their shared opt-in is enabled", () => {
424+
const quicksilverFiles = [
425+
"extensions/openai/realtime-quicksilver-gateway-bridge.live.test.ts",
426+
"extensions/openai/realtime-quicksilver.live.test.ts",
427+
];
428+
const payload = {
429+
numPassedTests: 1,
430+
numTotalTests: 3,
431+
testResults: [
432+
{
433+
name: path.join(process.cwd(), "extensions/openai/openai.live.test.ts"),
434+
assertionResults: [{ status: "passed" }],
435+
},
436+
...quicksilverFiles.map((file) => ({
437+
name: path.join(process.cwd(), file),
438+
assertionResults: [{ status: "skipped" }],
439+
})),
440+
],
441+
};
442+
const expectedFiles = ["extensions/openai/openai.live.test.ts", ...quicksilverFiles];
443+
444+
expect(validateLiveShardReportPayload(payload, expectedFiles, process.cwd(), {})).toEqual({
445+
ok: true,
446+
});
447+
expect(
448+
validateLiveShardReportPayload(payload, expectedFiles, process.cwd(), {
449+
OPENCLAW_LIVE_GPT_LIVE: "1",
450+
}),
451+
).toEqual({
452+
ok: false,
453+
reason: `Vitest report selected live test files had no passing assertions: ${quicksilverFiles.join(", ")}`,
454+
});
455+
});
456+
423457
it("does not count disabled opt-in sentinel assertions as live shard proof", () => {
424458
const payload = {
425459
numPassedTests: 1,

0 commit comments

Comments
 (0)