Repository navigation
fix: post-pass replies get the lens path's JSON tolerance; a non-JSON reply fails the pass - #385
Merged
Merged
Conversation
… reply fails the pass Synthesis and triage parsed their reply with a raw JSON.parse, so a fenced reply read as a completed pass with nothing in it. Both parse through the fence-tolerant reader; a reply that is not a JSON object marks the pass failed with the reason, keeps the raw text beside the run, and says so in the report. Closes #366 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Merged
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 #366. Verified on
main:parseTriageItems(collect.ts) andparseSynthesisTopFindings(render.ts) callJSON.parsedirectly and return[]on failure, and the completion branch writes whatever came back to<pass>.jsonand marks the passcompleted; the new test fails there — a fenced reply yieldscompletedwith empty top findings, a prose reply the same.parseLensJson(fence-tolerant). The storedsynthesis.json/triage.jsonis the parsed object re-serialized, so downstream readers (loadPostPassVerdictsis unaffected — it readsverified.json) get JSON, not a fence.failedwitherror: "the reply was not a JSON object — cut off at the output cap, or prose; the raw text is saved beside the run", writes<pass>.raw.txt, andcollectResultText's existing failed-pass line shows the reason. An empty result body gets its own message.Test plan
tests/broadside-post-pass-verdicts.test.mjs: fenced replies parse and populate the top items with the fence stripped on disk; prose replies fail both passes with the reason, keep the raw text, write no.json, and the report says so. Fails onmain, passes here.npm run build+npm test— 933 pass.🤖 Generated with Claude Code