Skip to content

test: fail test 4b on failed tool request and wrong finish_reason - #268

Merged
solderzzc merged 2 commits into
mainfrom
fix/dflash-test-4b-skip
Nov 7, 2026
Merged

solderzzc merged 2 commits into
mainfrom
fix/dflash-test-4b-skip

Conversation

@solderzzc

Copy link
Copy Markdown
Member

Fixes #266.

tests/test-dflash.sh test 4b only FAILed when the reply contained tool-call text. An HTTP error or timeout, and a parsed get_weather call with finish_reason: "stop" (the #262 regression), both fell through to SKIP, and the script exited 0. SKIP is now kept only for a reply with no tool-call shape.

Verified (extracted 4b block, run against a fake server; no real model available here)

  • HTTP 500: FAIL, exit 1
  • tool_calls with get_weather and finish_reason: "stop": FAIL, exit 1
  • plain text: SKIP, exit 0
  • bash -n tests/test-dflash.sh: OK

🤖 Generated with Claude Code

solderzzc and others added 2 commits November 5, 2026 19:45
Test 4b only FAILed when the reply contained tool-call text. An HTTP
error or timeout, and a parsed get_weather call with finish_reason
"stop" (the #262 regression), both fell through to SKIP and the script
exited 0. SKIP is now kept only for a reply with no tool-call shape.

Fixes #266

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
…ices

Test 4b captured curl output with `|| echo ""`, so a response cut off after a few bytes
was non-empty. jq then parsed nothing, and the test fell through to SKIP and exited 0.
A 200 whose body is not a chat completion (for example an error object) also SKIPped.

Capture the curl exit status and FAIL on non-zero. FAIL when the response has no
`choices[0]`. SKIP stays for a valid reply with no tool-call shape.

Verified by running the 4b block against a fake server in each mode:

| server reply            | before (82e5916) | after      |
|-------------------------|------------------|------------|
| HTTP 500                | FAIL             | FAIL       |
| empty 200 body         | FAIL             | FAIL       |
| body cut off mid-way    | SKIP (exit 0)    | FAIL       |
| 200 error object        | SKIP (exit 0)    | FAIL       |
| tool call, finish=stop  | FAIL             | FAIL       |
| plain text reply        | SKIP             | SKIP       |
| correct tool call       | PASS             | PASS       |

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
@solderzzc
solderzzc merged commit 8392f02 into main Nov 7, 2026
15 checks passed
@solderzzc
solderzzc deleted the fix/dflash-test-4b-skip branch November 7, 2026 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test-dflash.sh test 4b: SKIP hides a failed tool request and a wrong finish_reason

1 participant