From c319f3c4d583a69545713753de5f31d0abf11aed Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Tue, 5 May 2026 21:21:43 +0100 Subject: [PATCH] fix: mark accepted Mantis remote runs --- .../src/mantis/slack-desktop-smoke.runtime.test.ts | 6 ++++++ .../src/mantis/slack-desktop-smoke.runtime.ts | 13 +++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/extensions/qa-lab/src/mantis/slack-desktop-smoke.runtime.test.ts b/extensions/qa-lab/src/mantis/slack-desktop-smoke.runtime.test.ts index 1d1837f74ed..be82fe2b650 100644 --- a/extensions/qa-lab/src/mantis/slack-desktop-smoke.runtime.test.ts +++ b/extensions/qa-lab/src/mantis/slack-desktop-smoke.runtime.test.ts @@ -472,10 +472,16 @@ describe("mantis Slack desktop smoke runtime", () => { expect(result.status).toBe("pass"); const summary = JSON.parse(await fs.readFile(result.summaryPath, "utf8")) as { status: string; + timings: { phases: { name: string; status: string }[] }; warning?: string; }; expect(summary.status).toBe("pass"); expect(summary.warning).toBeUndefined(); + expect(summary.timings.phases).toEqual( + expect.arrayContaining([ + expect.objectContaining({ name: "crabbox.remote_run", status: "accepted" }), + ]), + ); }); it("copies the screenshot before reporting a failed remote Slack QA run", async () => { diff --git a/extensions/qa-lab/src/mantis/slack-desktop-smoke.runtime.ts b/extensions/qa-lab/src/mantis/slack-desktop-smoke.runtime.ts index 6a02854cf47..fc10f5bdbfa 100644 --- a/extensions/qa-lab/src/mantis/slack-desktop-smoke.runtime.ts +++ b/extensions/qa-lab/src/mantis/slack-desktop-smoke.runtime.ts @@ -113,7 +113,7 @@ type MantisPhaseTiming = { finishedAt: string; name: string; startedAt: string; - status: "fail" | "pass"; + status: "accepted" | "fail" | "pass"; }; type MantisPhaseTimings = { @@ -203,7 +203,13 @@ function createPhaseTimer(startedAt: Date) { totalMs: now.getTime() - origin, }; } - return { recordPhase, snapshot, timePhase }; + function updatePhaseStatus(name: string, status: MantisPhaseTiming["status"]) { + const phase = phases.findLast((entry) => entry.name === name); + if (phase) { + phase.status = status; + } + } + return { recordPhase, snapshot, timePhase, updatePhaseStatus }; } function defaultOutputDir(repoRoot: string, startedAt: Date) { @@ -1034,6 +1040,9 @@ export async function runMantisSlackDesktopSmoke( } const gatewaySetupCompleted = gatewaySetup && remoteMetadata?.qaExitCode === 0 && remoteMetadata.gatewayAlive === true; + if (remoteRunError && gatewaySetupCompleted) { + timer.updatePhaseStatus("crabbox.remote_run", "accepted"); + } if (remoteRunError && !gatewaySetupCompleted) { throw remoteRunError; }