Skip to content

Commit 7b1b6c2

Browse files
committed
fix(qa): preserve missing-reply failure diagnostics
1 parent 2b95c6a commit 7b1b6c2

2 files changed

Lines changed: 26 additions & 1 deletion

File tree

‎extensions/qa-lab/src/manual-lane.runtime.test.ts‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,30 @@ describe("runQaManualLane", () => {
177177
reply: " ",
178178
error: "manual lane did not produce a successful reply",
179179
},
180+
{
181+
label: "legacy completed run without an outbound reply",
182+
waited: { status: "error", error: "completed" },
183+
reply: null,
184+
error: "manual lane did not produce a successful reply",
185+
},
186+
{
187+
label: "legacy completed run with a whitespace-only reply",
188+
waited: { status: "error", error: " completed " },
189+
reply: " ",
190+
error: "manual lane did not produce a successful reply",
191+
},
192+
{
193+
label: "timed-out run without an outbound reply",
194+
waited: { status: "timeout", error: "provider stalled" },
195+
reply: null,
196+
error: "manual lane did not produce a successful reply",
197+
},
198+
{
199+
label: "failed run with a whitespace-only reply",
200+
waited: { status: "error", error: "authentication failed" },
201+
reply: " ",
202+
error: "manual lane did not produce a successful reply",
203+
},
180204
])("rejects a $label after resource cleanup", async ({ waited, reply, error }) => {
181205
outboundReply = reply;
182206
gatewayCall.mockReset().mockResolvedValueOnce({ runId: "run-1" }).mockResolvedValueOnce(waited);

‎extensions/qa-lab/src/manual-lane.runtime.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,8 @@ export async function runQaManualLane(params: QaManualLaneParams) {
209209
? result.waited.error?.trim().toLowerCase() !== "completed"
210210
: !["ok", "completed", "succeeded"].includes(result.waited.status ?? ""))
211211
) {
212-
throw new Error(result?.waited.error ?? "manual lane did not produce a successful reply");
212+
const providerError = result?.reply?.trim() && result.waited.error;
213+
throw new Error(providerError || "manual lane did not produce a successful reply");
213214
}
214215
return result;
215216
}

0 commit comments

Comments
 (0)