Skip to content

fix(llmops): extract a single valid JSON response - #10

Merged
hlubek merged 3 commits into
mainfrom
investigate/issue-6
Sep 7, 2026
Merged

fix(llmops): extract a single valid JSON response#10
hlubek merged 3 commits into
mainfrom
investigate/issue-6

Conversation

@hlubek

@hlubek hlubek commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Fixes #6. Skip non-JSON brace literals when extracting checker responses, reject multiple JSON objects, and require a non-null findings array. Adds 54 regression cases; full tests, vet, build, and lint passed for this final parser implementation.

Prompt wording changes were evaluated and reverted: observed scores were slightly worse, with no demonstrated benefit. Original prompts are retained.

Greptile Summary

Tightens parsing of JSON-shaped LLM checker responses.

  • Extracts exactly one valid outermost JSON object while ignoring balanced non-JSON brace literals.
  • Rejects ambiguous multiple objects, malformed or unbalanced responses, and null or missing findings arrays.
  • Adds regression coverage for preflight and writing-guide response parsing.

Confidence Score: 5/5

The PR appears safe to merge, with no new actionable issues introduced since the previous review.

No blocking or non-blocking findings remain in the reviewed changes.

Important Files Changed

Filename Overview
internal/llmops/preflight.go Reworks shared JSON extraction and enforces a non-null preflight findings array without introducing a new issue since the previous review.
internal/llmops/writingguide.go Enforces a non-null writing-guide findings array consistently with preflight parsing.
internal/llmops/json_response_test.go Adds comprehensive regression cases covering valid prose, brace literals, malformed data, nested objects, and ambiguous responses.

Reviews (2): Last reviewed commit: "fix(llmops): restore prompts after incon..." | Re-trigger Greptile

@hlubek
hlubek merged commit 7f79eaa into main Sep 7, 2026
4 checks passed
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.

Pre-flight crashes when the checked material contains a brace literal

1 participant