fix(daily): include agent text in verification-failure error#14
Merged
Conversation
When the agent makes zero tool calls but reports success, include the assistant's output text in the error message so we can see why. Truncated to 1000 chars to keep the message bounded.
5 tasks
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.
Summary
When
runDailyfails verification because the agent made zero tool calls, the previous error told us the count but not what the agent actually said. With that hidden, we can't distinguish "agent said it had no write tool" from "agent went off-topic" from "skill didn't load." This PR appends a truncatedagent said: <text>line to the verification-failure error.explainToolCalls(calls, agentText, statErr)— newagentTextparameter. Only appends the "agent said:" line when text is non-empty.truncateText(s, n)helper (1000-char clip with…(N more chars)suffix). Theinternal/lineartruncate is package-private and only one caller needs this here.RunResult.Textwas already populated, just discarded.Test plan
go build ./...go test -race ./...(14 packages green)go vet ./...golangci-lint run(0 issues)TestRunDaily_FailsLoudlyWhenFileMissing(empty text → no "agent said:" line),TestRunDaily_MissingFileIncludesToolCallNames(non-empty text → line appears)TestRunDaily_MissingFileIncludesAgentText,TestRunDaily_AgentTextTruncated./archy daily --forcefailure now showsagent said: <text>revealing what the agent output