fix: preserve acceptance scenario failure detail in the P2 report

This commit is contained in:
2026-08-11 19:02:55 +02:00
parent 077e648191
commit 908c99f90a
+3 -2
View File
@@ -1015,8 +1015,9 @@ async function executeChecksLocal({ checks, failAt } = {}) {
const output = await scenario.run();
if (scenario.id === failAt) throw new Error("injected acceptance failure");
result = { id: scenario.id, status: "PASS", startedAt, finishedAt: nowIso(), commands: output.commands ?? [], artifacts: output.artifacts ?? [] };
} catch {
result = { id: scenario.id, status: "FAIL", startedAt, finishedAt: nowIso(), commands: [], artifacts: [], error: "Acceptance scenario failed safely." };
} catch (error) {
const detail = error instanceof Error ? error.message : String(error);
result = { id: scenario.id, status: "FAIL", startedAt, finishedAt: nowIso(), commands: [], artifacts: [], error: `Acceptance scenario failed safely: ${detail}` };
stopped = true;
}
}