Skip to content

fix(local-inference): keep XML snippets inside JSON as data - #10606

Merged
alexhancock merged 1 commit into
mainfrom
jbg/security-native-json-xml-boundary
Jul 27, 2026
Merged

fix(local-inference): keep XML snippets inside JSON as data#10606
alexhancock merged 1 commit into
mainfrom
jbg/security-native-json-xml-boundary

Conversation

@jbg

@jbg jbg commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • treat a complete valid non-tool JSON value as data before the native XML tool-call fallback
  • preserve structured JSON tool calls and the existing standalone XML tool-call behavior
  • add regression coverage for XML-looking text inside JSON and compatibility coverage for JSON tool-call arguments

Audit issue

Verification

  • cargo fmt --all
  • cargo test -p goose-local-inference --features mlx native_tool_parsing::tests (10 passed)
  • cargo build -p goose-local-inference --features mlx
  • cargo clippy -p goose-local-inference --all-targets --features mlx -- -D warnings (reached the component; blocked by eight pre-existing warnings in unchanged MLX/parser code)
  • focused follow-up clippy with only those exact existing lint classes allowed (passed)
  • git diff --check

This finding was discovered by Project Loupe.

@alexhancock
alexhancock merged commit b7542f2 into main Jul 27, 2026
25 checks passed
@alexhancock
alexhancock deleted the jbg/security-native-json-xml-boundary branch July 27, 2026 20:26
lifeizhou-ap added a commit that referenced this pull request Jul 28, 2026
* main: (28 commits)
  chore(deps): bump postcss from 8.5.10 to 8.5.23 in /documentation (#10721)
  chore(deps-dev): bump js-yaml from 4.2.0 to 4.3.0 in /documentation (#10735)
  chore(deps): bump fast-uri from 3.1.2 to 3.1.4 in /documentation (#10647)
  chore(deps): bump svgo from 3.3.3 to 3.3.4 in /documentation (#10646)
  chore(deps): bump docker/login-action from 4.4.0 to 4.5.1 (#10670)
  chore(deps): bump ossf/scorecard-action from 2.4.3 to 2.4.4 (#10671)
  chore(deps): bump pypa/gh-action-pypi-publish from 1.14.0 to 1.14.1 (#10674)
  fix(providers): update DeepSeek model names to v4 API (#10729)
  fix(acp): forward Claude Code model picker selection to the adapter (#10675)
  fix(acp): forward Pi model selection to the adapter (#10707)
  fix(config): preserve enabled flag when migrating platform extensions (#10690)
  fix(acp): pass session working_dir to on_call_tool (#10689)
  fix(security): preserve adversary tool arguments (#10529)
  fix(local-inference): keep XML snippets inside JSON as data (#10606)
  fix: sync generated chat title in header (#10578)
  feat: tab completion and switch provider for `model` (#10585)
  fix(telegram): prompt for tool approval in gateway sessions (#10613)
  fix: keep CLI provider prompts out of process arguments (#10547)
  fix(providers): ignore stale inventory for static model lists (#10591)
  fix(ui): Refine dark theme message surfaces for consistent, compliant dark mode UX. (#10693)
  ...
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.

2 participants