Repository navigation
test: fail test 4b on failed tool request and wrong finish_reason - #268
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #266.
tests/test-dflash.shtest 4b only FAILed when the reply contained tool-call text. An HTTP error or timeout, and a parsedget_weathercall withfinish_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)
tool_callswithget_weatherandfinish_reason: "stop": FAIL, exit 1bash -n tests/test-dflash.sh: OK🤖 Generated with Claude Code