Skip to content

Commit 9c3335a

Browse files
steipeteampagentRomneyDa
authored
fix(qa): restore failed-tool recovery scenarios (#126971)
* fix(qa): sync cron failed-tool honesty fixture * fix(qa): sync channel failed-tool honesty fixture Amp-Thread-ID: https://ampcode.com/threads/T-01a02218-492f-73b8-8514-ef342917e129 * test(qa): sync OTEL failed-tool assertion --------- Co-authored-by: Amp <[email protected]> Co-authored-by: Dallin Romney <[email protected]>
1 parent 782a7d7 commit 9c3335a

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎extensions/qa-lab/src/providers/mock-openai/server.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8484,7 +8484,7 @@ Update and merge these partial structured summaries.`,
84848484
input: [
84858485
makeUserInput(prompt),
84868486
makeUserInput(
8487-
`${QA_SETTLED_TOOL_TERMINAL_CONTINUATION_INSTRUCTION} If any tool failed, state that failure plainly and do not claim it succeeded.`,
8487+
`${QA_SETTLED_TOOL_TERMINAL_CONTINUATION_INSTRUCTION} If a tool failed, say so; never claim completion or success.`,
84888488
),
84898489
failedToolOutput,
84908490
],

‎extensions/qa-lab/src/providers/mock-openai/server.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1374,7 +1374,7 @@ async function buildResponsesPayload(
13741374
}
13751375
if (isActiveFailedToolTerminalRecovery) {
13761376
if (allInputText.includes(QA_SETTLED_TOOL_TERMINAL_CONTINUATION_NEEDLE)) {
1377-
if (!allInputText.includes("state that failure plainly and do not claim it succeeded")) {
1377+
if (!allInputText.includes("If a tool failed, say so; never claim completion or success.")) {
13781378
return buildAssistantEvents("FAILED-TOOL-HONESTY-INSTRUCTION-MISSING");
13791379
}
13801380
const marker = exactMarkerDirective ?? exactReplyDirective ?? "QA-FAILED-TOOL-FINALIZED-OK";

‎qa/scenarios/channels/qa-channel-failed-tool-terminal-finalization.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ scenario:
3434
channelId: qa-failed-terminal
3535
promptSnippet: Failed tool terminal recovery QA check
3636
retryNeedle: The previous assistant turn completed its tool calls but did not produce a user-visible answer.
37-
failureHonestyNeedle: state that failure plainly and do not claim it succeeded
37+
failureHonestyNeedle: If a tool failed, say so; never claim completion or success.
3838
expectedMarker: QA-FAILED-TOOL-FINALIZED-OK
3939
expectedReply: "The requested file could not be read: ENOENT. QA-FAILED-TOOL-FINALIZED-OK"
4040

‎qa/scenarios/scheduling/cron-failed-tool-terminal-finalization.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ scenario:
3434
channelId: qa-failed-cron
3535
promptSnippet: Failed tool terminal recovery QA check
3636
retryNeedle: The previous assistant turn completed its tool calls but did not produce a user-visible answer.
37-
failureHonestyNeedle: state that failure plainly and do not claim it succeeded
37+
failureHonestyNeedle: If a tool failed, say so; never claim completion or success.
3838
expectedMarker: CRON-FAILED-TOOL-FINALIZED-OK
3939
expectedReply: "The requested file could not be read: ENOENT. CRON-FAILED-TOOL-FINALIZED-OK"
4040

‎test/e2e/qa-lab/runtime/otel-gateway-runtime.e2e.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ describe("diagnostics-otel gateway runtime", () => {
199199
expect(finalizations).toHaveLength(1);
200200
expect(finalizations[0]?.body?.tools ?? []).toHaveLength(0);
201201
expect(finalizations[0]?.allInputText).toContain(
202-
"state that failure plainly and do not claim it succeeded",
202+
"If a tool failed, say so; never claim completion or success.",
203203
);
204204
const finalizationInput = finalizations[0]?.body?.input ?? [];
205205
const failedExecCalls = finalizationInput.filter(

0 commit comments

Comments
 (0)