Skip to content

Commit 27ae826

Browse files
committed
fix(release): accept openclaw qa runtime alias
1 parent 6cdc963 commit 27ae826

2 files changed

Lines changed: 31 additions & 3 deletions

File tree

extensions/qa-lab/src/cli.runtime.test.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,22 @@ describe("qa cli runtime", () => {
289289
});
290290
});
291291

292+
it("accepts openclaw as a runtime-pair suite alias", async () => {
293+
await runQaSuiteCommand({
294+
repoRoot: "/tmp/openclaw-repo",
295+
providerMode: "mock-openai",
296+
scenarioIds: ["approval-turn-tool-followthrough"],
297+
runtimePair: "openclaw,codex",
298+
});
299+
300+
expect(runQaSuiteFromRuntime).toHaveBeenCalledWith(
301+
expect.objectContaining({
302+
repoRoot: path.resolve("/tmp/openclaw-repo"),
303+
runtimePair: ["pi", "codex"],
304+
}),
305+
);
306+
});
307+
292308
it("drops blank suite model refs so provider defaults apply", async () => {
293309
await runQaSuiteCommand({
294310
repoRoot: "/tmp/openclaw-repo",

extensions/qa-lab/src/cli.runtime.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,16 @@ function normalizeQaOptionalModelRef(input: string | undefined) {
169169
return model && model.length > 0 ? model : undefined;
170170
}
171171

172+
function normalizeQaRuntimePairId(value: string): RuntimeId | undefined {
173+
if (value === "openclaw" || value === "pi") {
174+
return "pi";
175+
}
176+
if (value === "codex") {
177+
return "codex";
178+
}
179+
return undefined;
180+
}
181+
172182
function parseQaRuntimePair(value: string | undefined): [RuntimeId, RuntimeId] | undefined {
173183
if (!value?.trim()) {
174184
return undefined;
@@ -180,9 +190,11 @@ function parseQaRuntimePair(value: string | undefined): [RuntimeId, RuntimeId] |
180190
if (parts.length !== 2) {
181191
throw new Error('--runtime-pair must use exactly two runtimes, e.g. "pi,codex".');
182192
}
183-
const [left, right] = parts;
184-
if ((left !== "pi" && left !== "codex") || (right !== "pi" && right !== "codex")) {
185-
throw new Error('--runtime-pair only supports "pi" and "codex".');
193+
const [rawLeft, rawRight] = parts;
194+
const left = normalizeQaRuntimePairId(rawLeft);
195+
const right = normalizeQaRuntimePairId(rawRight);
196+
if (!left || !right) {
197+
throw new Error('--runtime-pair only supports "pi", "openclaw", and "codex".');
186198
}
187199
if (left === right) {
188200
throw new Error("--runtime-pair must compare two different runtimes.");

0 commit comments

Comments
 (0)