fix: mark accepted Mantis remote runs · openclaw/openclaw@c319f3c
steipete
·
2026-05-06
·
via Recent Commits to openclaw:main
File tree
extensions/qa-lab/src/mantis
| Original file line number | Diff line number | Diff line change |
|---|
@@ -472,10 +472,16 @@ describe("mantis Slack desktop smoke runtime", () => {
|
472 | 472 | expect(result.status).toBe("pass"); |
473 | 473 | const summary = JSON.parse(await fs.readFile(result.summaryPath, "utf8")) as { |
474 | 474 | status: string; |
| 475 | +timings: { phases: { name: string; status: string }[] }; |
475 | 476 | warning?: string; |
476 | 477 | }; |
477 | 478 | expect(summary.status).toBe("pass"); |
478 | 479 | expect(summary.warning).toBeUndefined(); |
| 480 | +expect(summary.timings.phases).toEqual( |
| 481 | +expect.arrayContaining([ |
| 482 | +expect.objectContaining({ name: "crabbox.remote_run", status: "accepted" }), |
| 483 | +]), |
| 484 | +); |
479 | 485 | }); |
480 | 486 | |
481 | 487 | it("copies the screenshot before reporting a failed remote Slack QA run", async () => { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -113,7 +113,7 @@ type MantisPhaseTiming = {
|
113 | 113 | finishedAt: string; |
114 | 114 | name: string; |
115 | 115 | startedAt: string; |
116 | | -status: "fail" | "pass"; |
| 116 | +status: "accepted" | "fail" | "pass"; |
117 | 117 | }; |
118 | 118 | |
119 | 119 | type MantisPhaseTimings = { |
@@ -203,7 +203,13 @@ function createPhaseTimer(startedAt: Date) {
|
203 | 203 | totalMs: now.getTime() - origin, |
204 | 204 | }; |
205 | 205 | } |
206 | | -return { recordPhase, snapshot, timePhase }; |
| 206 | +function updatePhaseStatus(name: string, status: MantisPhaseTiming["status"]) { |
| 207 | +const phase = phases.findLast((entry) => entry.name === name); |
| 208 | +if (phase) { |
| 209 | +phase.status = status; |
| 210 | +} |
| 211 | +} |
| 212 | +return { recordPhase, snapshot, timePhase, updatePhaseStatus }; |
207 | 213 | } |
208 | 214 | |
209 | 215 | function defaultOutputDir(repoRoot: string, startedAt: Date) { |
@@ -1034,6 +1040,9 @@ export async function runMantisSlackDesktopSmoke(
|
1034 | 1040 | } |
1035 | 1041 | const gatewaySetupCompleted = |
1036 | 1042 | gatewaySetup && remoteMetadata?.qaExitCode === 0 && remoteMetadata.gatewayAlive === true; |
| 1043 | +if (remoteRunError && gatewaySetupCompleted) { |
| 1044 | +timer.updatePhaseStatus("crabbox.remote_run", "accepted"); |
| 1045 | +} |
1037 | 1046 | if (remoteRunError && !gatewaySetupCompleted) { |
1038 | 1047 | throw remoteRunError; |
1039 | 1048 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。