Skip to content

fix(tools): lenient UpdateTodoList tasks JSON in normalize_json_array#550

Closed
JessicaMulein wants to merge 1 commit into
cecli-dev:mainfrom
Digital-Defiance:pr/lenient-task-json
Closed

fix(tools): lenient UpdateTodoList tasks JSON in normalize_json_array#550
JessicaMulein wants to merge 1 commit into
cecli-dev:mainfrom
Digital-Defiance:pr/lenient-task-json

Conversation

@JessicaMulein

Copy link
Copy Markdown

Summary

Repair glued/broken UpdateTodoList tasks JSON in normalize_json_array so local models (qwen) can pass unescaped inner quotes and concatenated {…}{…} objects without hard failures.

  • Add try_parse_lenient_task_array() in cecli/helpers/responses.py
  • Wire through normalize_json_array() in cecli/tools/utils/helpers.py
  • Test coverage in tests/tools/test_tool_arguments.py

Context

Reopened from Digital-Defiance/cecli#13 (rebased on cecli-dev/main). Complements cecli-dev/cecli#548 (UpdateTodoList format_output hardening).

Test plan

  • pytest tests/tools/test_tool_arguments.py -k todo — passing (local run)
  • BrightVision dogfood: UpdateTodoList no longer throws JSON parse errors on glued task arrays

Local models emit glued tool args and unescaped inner quotes on tasks arrays.
Add try_parse_lenient_task_array and wire it through normalize_json_array so
UpdateTodoList survives qwen-style { "tasks": "[{...}]" }{ "path": "..." }.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant