From 908c99f90a9d883173fc034898d3fa267a4c0963 Mon Sep 17 00:00:00 2001 From: mptyl Date: Tue, 11 Aug 2026 19:02:55 +0200 Subject: [PATCH] fix: preserve acceptance scenario failure detail in the P2 report --- backend/scripts/p2-acceptance.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/scripts/p2-acceptance.mjs b/backend/scripts/p2-acceptance.mjs index 39085dbf..ad4ba5c6 100644 --- a/backend/scripts/p2-acceptance.mjs +++ b/backend/scripts/p2-acceptance.mjs @@ -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; } }