Skip to content

fix(judge): parse balanced JSON responses - #1434

Open
mnkj0021 wants to merge 3 commits into
microsoft:mainfrom
mnkj0021:fix/167-balanced-judge-json
Open

mnkj0021 wants to merge 3 commits into
microsoft:mainfrom
mnkj0021:fix/167-balanced-judge-json

Conversation

@mnkj0021

@mnkj0021 mnkj0021 commented Sep 28, 2026 •

Copy link
Copy Markdown

Fixes #167

Summary

  • replace regex-based bundled judge JSON extraction with a brace-balanced scanner
  • ignore braces that occur inside JSON strings and handle escaped characters
  • parse JSON independently of markdown code fences or trailing prose
  • preserve the existing parse-failure behavior for genuinely truncated/incomplete JSON
  • add regression coverage for nested JSON, braces in feedback strings, and truncated responses

Validation

  • corepack pnpm --filter judge build — passed on a fresh recheck
  • corepack pnpm exec vitest run apps/judge/src/judge-strategies.test.ts — 69/69 passed
  • git diff --check — passed
  • branch is current with upstream main (0 commits behind)

GitHub's upstream CI workflows are still in action_required and need a Scope maintainer to approve the fork workflow run. The Microsoft CLA check passes.

@mnkj0021
mnkj0021 force-pushed the fix/167-balanced-judge-json branch from 113b84f to cc77eb6 Compare September 30, 2026 02:00
@mnkj0021
mnkj0021 force-pushed the fix/167-balanced-judge-json branch from cc77eb6 to 8c2d9ff Compare September 30, 2026 03:58

This branch has not been deployed

No deployments
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.

Failed to parse judge response

1 participant