|
1 | 1 | // Qa Lab tests cover canonical runtime-pair scenario membership metadata. |
2 | 2 | import { describe, expect, it } from "vitest"; |
3 | 3 | import { resolveQaParityPackScenarioIds } from "./agentic-parity.js"; |
| 4 | +import { resolveQaRuntimePairLaneScenarioIds } from "./runtime-pair-lane-selection.js"; |
4 | 5 | import { |
5 | 6 | QA_RUNTIME_PAIR_LANES, |
6 | 7 | readQaScenarioById, |
7 | 8 | readQaScenarioExecutionConfig, |
8 | 9 | readQaScenarioPack, |
9 | 10 | } from "./scenario-catalog.js"; |
| 11 | +import { selectQaFlowSuiteScenarios } from "./suite-planning.js"; |
10 | 12 |
|
11 | 13 | describe("QA runtime-pair scenario catalog", () => { |
12 | 14 | it("uses the canonical lanes with audited declaration counts", () => { |
@@ -82,4 +84,47 @@ describe("QA runtime-pair scenario catalog", () => { |
82 | 84 | expect(longContextFlow).toContain("env.runtimeId"); |
83 | 85 | expect(longContextFlow).not.toContain("patchConfig"); |
84 | 86 | }); |
| 87 | + |
| 88 | + it("selects the pinned gateway restart pair explicitly and implicitly at GPT-5.4", () => { |
| 89 | + const scenarioId = "gateway-restart-multi-live"; |
| 90 | + const scenario = readQaScenarioById(scenarioId); |
| 91 | + const scenarios = readQaScenarioPack().scenarios; |
| 92 | + const lane = { |
| 93 | + providerMode: "live-frontier" as const, |
| 94 | + primaryModel: "openai/gpt-5.4", |
| 95 | + }; |
| 96 | + |
| 97 | + expect(scenario.runtimePairLane).toBe("core"); |
| 98 | + expect(readQaScenarioExecutionConfig(scenarioId)).toMatchObject({ |
| 99 | + requiredProviderMode: "live-frontier", |
| 100 | + requiredProvider: "openai", |
| 101 | + requiredModel: "gpt-5.4", |
| 102 | + }); |
| 103 | + |
| 104 | + const explicitIds = selectQaFlowSuiteScenarios({ |
| 105 | + scenarios, |
| 106 | + scenarioIds: [scenarioId], |
| 107 | + ...lane, |
| 108 | + }).map((selected) => selected.id); |
| 109 | + const implicitIds = selectQaFlowSuiteScenarios({ scenarios, ...lane }).map( |
| 110 | + (selected) => selected.id, |
| 111 | + ); |
| 112 | + const runtimePairLane = resolveQaRuntimePairLaneScenarioIds({ |
| 113 | + scenarios, |
| 114 | + scenarioIds: [], |
| 115 | + runtimePairLanes: ["core"], |
| 116 | + runtimePair: true, |
| 117 | + ...lane, |
| 118 | + }); |
| 119 | + |
| 120 | + expect(explicitIds).toEqual([scenarioId]); |
| 121 | + expect(implicitIds).toContain(scenarioId); |
| 122 | + expect(runtimePairLane.scenarioIds).toContain(scenarioId); |
| 123 | + expect(runtimePairLane.excludedLaneScenarios.map((excluded) => excluded.id)).not.toContain( |
| 124 | + scenarioId, |
| 125 | + ); |
| 126 | + expect(runtimePairLane.excludedNonFlowScenarios.map((excluded) => excluded.id)).not.toContain( |
| 127 | + scenarioId, |
| 128 | + ); |
| 129 | + }); |
85 | 130 | }); |
0 commit comments