@@ -3,6 +3,7 @@ import { mkdtemp, readFile, rm } from "node:fs/promises";
33import os from "node:os" ;
44import path from "node:path" ;
55import { describe , expect , it , vi } from "vitest" ;
6+ import type { QaTransportAdapterFactory } from "./qa-transport-registry.js" ;
67import { requireFlowScenario } from "./scenario-catalog.test-utils.js" ;
78import { runQaSuite } from "./suite-launch.runtime.js" ;
89import { selectQaFlowSuiteScenarios } from "./suite-planning.js" ;
@@ -76,8 +77,18 @@ describe("qa suite provider selection", () => {
7677 scenarioId : "matrix-room-block-streaming" ,
7778 channelDriver : "live" as const ,
7879 channelId : "matrix" ,
80+ adapterFactories : [
81+ {
82+ id : "matrix" ,
83+ supportsModuleFlows : true ,
84+ matches : ( { driver, channelId } ) => driver === "live" && channelId === "matrix" ,
85+ create : async ( ) => {
86+ throw new Error ( "Matrix adapter creation must remain unreachable" ) ;
87+ } ,
88+ } satisfies QaTransportAdapterFactory ,
89+ ] ,
7990 } ,
80- { scenarioId : "goal-context-next-turn" } ,
91+ { scenarioId : "goal-context-next-turn" , adapterFactories : undefined } ,
8192 ] ) ( "adopts the provider requirement for directly selected $scenarioId" , async ( selection ) => {
8293 const repoRoot = await mkdtemp ( path . join ( os . tmpdir ( ) , "qa-suite-provider-lane-" ) ) ;
8394 const startLab = vi . fn ( async ( ) => {
@@ -92,6 +103,7 @@ describe("qa suite provider selection", () => {
92103 ...( "channelDriver" in selection
93104 ? { channelDriver : selection . channelDriver , channelId : selection . channelId }
94105 : { } ) ,
106+ adapterFactories : selection . adapterFactories ,
95107 startLab,
96108 } ) ,
97109 ) . rejects . toThrow ( "selected provider lane reached lab startup" ) ;
0 commit comments