feat(FN-841): harden planning-mode AI response parsing and recovery

- Add robust JSON extraction from AI responses (handle markdown fences, mixed content, malformed JSON)
- Add multi-strategy recovery: regex extraction, brace/bracket balancing, common-fix repairs
- Add comprehensive test suite for planning-mode parsing (101 new test cases)
- Document planning-mode robustness behavior in dashboard README
- Add changeset for patch bump to @gsxdsm/fusion
This commit is contained in:
gsxdsm
2026-04-04 02:04:31 -07:00
parent 5cfb93ecbc
commit 224b0603e8
4 changed files with 367 additions and 26 deletions

View File

@@ -0,0 +1,8 @@
---
"@gsxdsm/fusion": patch
---
Fix planning mode JSON parse failure on question generation. Planning mode now
robustly extracts JSON from AI responses (handles markdown wrapping, prose,
truncated output) and retries once with a reformat prompt before showing an
actionable error instead of "Unexpected end of JSON input".