mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-04 11:30:58 +08:00
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>