Files
openclaw/extensions/qa-lab/src/mantis/cli.runtime.ts
Kevin Lin 5656f687c1 Add Slack approval QA checkpoints (#85141)
* test: add slack approval qa checkpoints

* fix(slack): scope plugin approval session fallback

* ci(mantis): allow slack approval checkpoint dispatch

* ci(mantis): use on-demand aws slack desktops

* ci(mantis): run slack smoke from candidate checkout

* ci(mantis): pin aws ssh ingress to runner

* test(mantis): skip crabbox actions hydrate for slack desktop

* ci(mantis): use fresh pr checkout for slack desktop

* ci(mantis): start slack desktop smoke from source

* fix(mantis): use relative slack qa output dir

* test(mantis): surface slack smoke failure logs

* fix(mantis): write slack approval watcher script

* fix(mantis): accept successful slack qa metadata

* fix(mantis): tighten slack approval evidence

* fix(mantis): repair slack evidence manifest

* fix(mantis): render slack approval checkpoint proof

* fix(mantis): quote approval checkpoint renderer html

* fix(mantis): preserve slack approval failure artifacts

* fix(mantis): timeout silent slack desktop runs

* fix(mantis): keep slack desktop runs chatty

* fix(mantis): keep slack workflow harness trusted

* fix(qa-lab): make slack approval evidence robust

* fix(qa-lab): harden slack approval workflow proof

* test(qa-lab): surface slack approval diagnostics

* test(qa-lab): loosen slack approval readiness
2026-05-22 22:04:15 -07:00

115 lines
4.4 KiB
TypeScript

import {
runMantisDesktopBrowserSmoke,
type MantisDesktopBrowserSmokeOptions,
} from "./desktop-browser-smoke.runtime.js";
import { runMantisDiscordSmoke, type MantisDiscordSmokeOptions } from "./discord-smoke.runtime.js";
import { runMantisBeforeAfter, type MantisBeforeAfterOptions } from "./run.runtime.js";
import {
runMantisSlackDesktopSmoke,
type MantisSlackDesktopSmokeOptions,
} from "./slack-desktop-smoke.runtime.js";
import {
runMantisTelegramDesktopBuilder,
type MantisTelegramDesktopBuilderOptions,
} from "./telegram-desktop-builder.runtime.js";
import {
runMantisVisualDriver,
runMantisVisualTask,
type MantisVisualDriverOptions,
type MantisVisualTaskOptions,
} from "./visual-task.runtime.js";
export async function runMantisDiscordSmokeCommand(opts: MantisDiscordSmokeOptions) {
const result = await runMantisDiscordSmoke(opts);
process.stdout.write(`Mantis Discord smoke report: ${result.reportPath}\n`);
process.stdout.write(`Mantis Discord smoke summary: ${result.summaryPath}\n`);
if (result.status === "fail") {
process.exitCode = 1;
}
}
export async function runMantisBeforeAfterCommand(opts: MantisBeforeAfterOptions) {
const result = await runMantisBeforeAfter(opts);
process.stdout.write(`Mantis before/after report: ${result.reportPath}\n`);
process.stdout.write(`Mantis before/after comparison: ${result.comparisonPath}\n`);
if (result.status === "fail") {
process.exitCode = 1;
}
}
export async function runMantisDesktopBrowserSmokeCommand(opts: MantisDesktopBrowserSmokeOptions) {
const result = await runMantisDesktopBrowserSmoke(opts);
process.stdout.write(`Mantis desktop browser report: ${result.reportPath}\n`);
process.stdout.write(`Mantis desktop browser summary: ${result.summaryPath}\n`);
if (result.screenshotPath) {
process.stdout.write(`Mantis desktop browser screenshot: ${result.screenshotPath}\n`);
}
if (result.videoPath) {
process.stdout.write(`Mantis desktop browser video: ${result.videoPath}\n`);
}
if (result.status === "fail") {
process.exitCode = 1;
}
}
export async function runMantisSlackDesktopSmokeCommand(opts: MantisSlackDesktopSmokeOptions) {
const result = await runMantisSlackDesktopSmoke(opts);
process.stdout.write(`Mantis Slack desktop report: ${result.reportPath}\n`);
process.stdout.write(`Mantis Slack desktop summary: ${result.summaryPath}\n`);
if (result.screenshotPath) {
process.stdout.write(`Mantis Slack desktop screenshot: ${result.screenshotPath}\n`);
}
if (result.videoPath) {
process.stdout.write(`Mantis Slack desktop video: ${result.videoPath}\n`);
}
for (const screenshotPath of result.approvalCheckpointScreenshotPaths ?? []) {
process.stdout.write(
`Mantis Slack desktop approval checkpoint screenshot: ${screenshotPath}\n`,
);
}
if (result.status === "fail") {
process.exitCode = 1;
}
}
export async function runMantisTelegramDesktopBuilderCommand(
opts: MantisTelegramDesktopBuilderOptions,
) {
const result = await runMantisTelegramDesktopBuilder(opts);
process.stdout.write(`Mantis Telegram desktop builder report: ${result.reportPath}\n`);
process.stdout.write(`Mantis Telegram desktop builder summary: ${result.summaryPath}\n`);
if (result.screenshotPath) {
process.stdout.write(`Mantis Telegram desktop builder screenshot: ${result.screenshotPath}\n`);
}
if (result.videoPath) {
process.stdout.write(`Mantis Telegram desktop builder video: ${result.videoPath}\n`);
}
if (result.status === "fail") {
process.exitCode = 1;
}
}
export async function runMantisVisualDriverCommand(opts: MantisVisualDriverOptions) {
const result = await runMantisVisualDriver(opts);
process.stdout.write(`Mantis visual driver result: ${result.status}\n`);
process.stdout.write(`Mantis visual driver screenshot: ${result.screenshotPath}\n`);
if (result.status === "fail") {
process.exitCode = 1;
}
}
export async function runMantisVisualTaskCommand(opts: MantisVisualTaskOptions) {
const result = await runMantisVisualTask(opts);
process.stdout.write(`Mantis visual task report: ${result.reportPath}\n`);
process.stdout.write(`Mantis visual task summary: ${result.summaryPath}\n`);
if (result.screenshotPath) {
process.stdout.write(`Mantis visual task screenshot: ${result.screenshotPath}\n`);
}
if (result.videoPath) {
process.stdout.write(`Mantis visual task video: ${result.videoPath}\n`);
}
if (result.status === "fail") {
process.exitCode = 1;
}
}