Files
nofx/decision
ZhouYongyou 3ff3b5dde3 fix(decision): execute fixMissingQuotes BEFORE validateJSONFormat
Critical bug fix: The fullwidth character replacement was happening AFTER
JSON format validation, so fullwidth characters ([{:,) were rejected
before they could be fixed.

Root cause:
1. validateJSONFormat() checks if JSON starts with "[{" (line 509)
2. When AI outputs "[{...", validation fails immediately
3. fixMissingQuotes() never gets executed (line 493, after validation)

Solution:
Move fixMissingQuotes() call BEFORE validateJSONFormat():
- Line 488: Fix fullwidth characters first
- Line 491: Then validate the cleaned JSON

Execution order:
Before: extract → validate ( fails) → fix (never reached)
After:  extract → fix → validate ( passes) → parse

This ensures all character normalization happens before any validation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-04 22:58:03 +08:00
..