Skip to content

Parse XML tool calls from text responses#2307

Merged
chubes4 merged 3 commits into
mainfrom
fix/xml-tool-call-fallback
May 27, 2026
Merged

Parse XML tool calls from text responses#2307
chubes4 merged 3 commits into
mainfrom
fix/xml-tool-call-fallback

Conversation

@chubes4
Copy link
Copy Markdown
Member

@chubes4 chubes4 commented May 27, 2026

Summary

  • Parse XML-style <function_calls>/ tool calls when a provider returns them as text instead of native FunctionCall DTOs.
  • Preserve native tool-call extraction priority and use the XML fallback only when no native calls are present.
  • Add sandbox/pipeline smoke coverage proving XML tool calls execute and return to the provider for a final answer.

Tests

  • php tests/agent-conversation-runner-request-smoke.php

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode (GPT-5.5)
  • Used for: Investigated WP Codebox sandbox transcripts showing text-form tool calls, drafted the fallback parser and smoke coverage, and ran local verification.

Fixes #2309

@homeboy-ci
Copy link
Copy Markdown
Contributor

homeboy-ci Bot commented May 27, 2026

Homeboy Results — data-machine

Lint

lint — failed

  • wp-alternatives — 1 finding(s)
  • Total: 1 finding(s)

ℹ️ Auto-fix: homeboy lint data-machine --path /home/runner/work/data-machine/data-machine --changed-since bdde870 --fix (or homeboy refactor data-machine --path /home/runner/work/data-machine/data-machine --changed-since bdde870 --from lint --write)
ℹ️ Some issues may require manual fixes
ℹ️ Full options: homeboy docs commands/lint
Deep dive: homeboy lint data-machine --changed-since bdde870

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-lint-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-lint-quality-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine/actions/runs/26535157944

Test

test — passed

ℹ️ Auto-fix lint issues: homeboy refactor data-machine --from lint --write
ℹ️ Collect coverage: homeboy test data-machine --coverage
ℹ️ Pass args to test runner: homeboy test -- [args]
ℹ️ Full options: homeboy docs commands/test
Deep dive: homeboy test data-machine --changed-since bdde870

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-test-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-test-quality-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine/actions/runs/26535157944

Audit

audit — passed

  • requested_detectors — 9 finding(s)
  • intra-method-duplication — 7 finding(s)
  • dead_code — 4 finding(s)
  • dead_guard — 3 finding(s)
  • structural — 2 finding(s)
  • Directives — 1 finding(s)
  • Retention — 1 finding(s)
  • Total: 27 finding(s)

Deep dive: homeboy audit data-machine --changed-since bdde870

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-audit-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-audit-quality-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine/actions/runs/26535157944
Tooling versions
  • Homeboy CLI: homeboy 0.199.4+36e3b856
  • Extension: wordpress from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: aeefae40
  • Action: unknown@unknown

@chubes4 chubes4 merged commit af13676 into main May 27, 2026
@chubes4 chubes4 deleted the fix/xml-tool-call-fallback branch May 27, 2026 22:42
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.

Track XML-style tool calls returned as text responses

1 participant