Repository navigation
fix(agent): recover verdict from duplicated JSON objects (#227) - #228
Merged
Merged
Conversation
…nse (#227) claude-sonnet-5-5-high via agy returns the verdict object twice in one response; JSON.parse fails on the concatenation and every run classified invalid-output. extractJsonValues now scans top-level JSON values and the last complete object is used as the verdict candidate; unparseable responses still fail closed. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Caution Review failedThe pull request is closed. Walkthrough
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
3 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
Closes #227. Found by the Issue #226 model comparison:
claude-sonnet-5-5-highthrough agy returns the verdict JSON object twice in a single response ({...}\n{...}), soJSON.parse(envelope.response)threw and every run classifiedinvalid-outputdespitestatus: SUCCESSand well-formed content.extractJsonValues()scans top-level balanced JSON objects (string/escape aware); the last complete object is the verdict candidate.locationare already tolerated.invalid-outputas before.Test plan
bun test script/agent.agy-review.test.ts— 32 pass (new duplicated-object case)tsc --noEmitcleanreview-completedGenerated with Devin
Summary by CodeRabbit