From 19789f19be7081626e4caa61a935f5f405c5ea46 Mon Sep 17 00:00:00 2001 From: santhreal <64453045+santhreal@users.noreply.github.com> Date: Wed, 22 Jul 2026 22:52:15 -0700 Subject: [PATCH] style(utils): one-line comment on trailing-prose JSON decode --- deeptutor/utils/json_parser.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/deeptutor/utils/json_parser.py b/deeptutor/utils/json_parser.py index 55638dff2..8049040b7 100644 --- a/deeptutor/utils/json_parser.py +++ b/deeptutor/utils/json_parser.py @@ -84,9 +84,7 @@ def parse_json_response( except (json.JSONDecodeError, TypeError) as parse_error: log.debug(f"Direct JSON parse failed: {parse_error}") - # Strategy 1b: first JSON value via raw_decode. Trailing prose with braces - # (common LLM slip) must not fall through to json-repair, which can invent - # a wrapping array and corrupt callers that expect a single object. + # Prefer raw_decode before repair so trailing brace-prose cannot become a wrapping array. if isinstance(extracted_response, str): stripped = extracted_response.lstrip() for idx, ch in enumerate(stripped):