Files
nofx/decision
ZhouYongyou 834285bb16 fix(decision): replace fullwidth space (U+3000) in JSON
Critical bug: AI can output fullwidth space ( U+3000) between brackets:
Input:  [ {"symbol":"BTCUSDT"}]
        ↑ ↑ fullwidth space
After previous fix:
        [ {"symbol":"BTCUSDT"}]
         ↑ fullwidth space remained!
Result: validateJSONFormat failed because:
- Checks "[{" (no space) 
- Checks "[ {" (halfwidth space U+0020) 
- AI output "[ {" (fullwidth space U+3000) 
Solution: Replace fullwidth space → halfwidth space
-  (U+3000) → space (U+0020)
This allows existing validation logic to work:
strings.HasPrefix(trimmed, "[ {") now matches 
Why fullwidth space?
- Common in CJK text editing
- AI trained on mixed CJK content
- Invisible to naked eye but breaks JSON parsing
Test case:
Input:  [ {"symbol":"BTCUSDT"}]
Output: [ {"symbol":"BTCUSDT"}]
Validation:  PASS
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-11-04 23:59:20 +08:00
..