fix(zebralogicbench): keep braces inside strings out of the object scan #2030
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.35) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.35 · 123 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.288
Real PR Conversation Timeline
1 item
"Review active on #2030"
general
weight: 0.35
Yunnglin
simin-yuan
Problem
Fixes #2026.
ZebraLogicBenchAdapter.extract_answerfinds the answer by scanning the whole completion for the last balanced{...}run and passing that slice tojson.loads. The scan keeps a stack of brace positions but has no notion of JSON string literals or escapes, so a{or}inside a string value is treated as structure:{inside a value (e.g."the set {A, B} is open") empties the extraction;}truncates it to an inner object that is not the answer.match_scorethen feedsfiltered_prediction or '{}'toprocess_results, so a valid answer is scored as unanswered and counted inno_answer_numand thecell_accdenominator.Fix
Track string state (and backslash escapes) in the same scan: a brace is only structural when it appears outside a string literal. No change to the JSON normalisation or the scoring path.
Tests
tests/benchmark/test_zebralogic_braces_in_strings.py:The existing unparsed-answer behaviour (counts toward the totals) is unchanged.
AI assistance: prepared with an AI coding agent (DSH); I ran the tests above and can explain every change.