Skip to content

SWF(bug): preserve JSON fallback tool call order - #48

Merged
maplepaladin73 merged 1 commit into
mainfrom
devin/1795371438-json-tool-call-order
Nov 22, 2026
Merged

maplepaladin73 merged 1 commit into
mainfrom
devin/1795371438-json-tool-call-order

Conversation

@maplepaladin73

@maplepaladin73 maplepaladin73 commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

JSON fallback now emits parallel tool calls in model output order across bare JSON, Markdown fences, and prose.

Test plan

Before the fix, exercising the production parser with the baseline corrections later merged in #51:

json_fallback_preserves_bare_call_order ... FAILED
  left: ["ant", "zebra"]
 right: ["zebra", "ant"]
json_fallback_preserves_order_across_scans ... FAILED
  left: ["read", "check", "update"]
 right: ["update", "read", "check"]
test result: FAILED. 0 passed; 2 failed

After the fix, running the full spark test binary on the rebased branch without local workarounds:

json_fallback_preserves_bare_call_order ... ok
json_fallback_preserves_order_across_scans ... ok
test result: ok. 3201 passed; 0 failed; 14 ignored

Try it (GPU-free): bash scripts/ci_gpu_stubs.sh && ATLAS_SKIP_BUILD=1 CUDARC_CUDA_VERSION=13000 cargo test -p spark-server --bin spark json_fallback_preserves

  • Blueprint lint: workspace rustfmt and Clippy, license headers, and typos.
  • Real-model GPU smoke is queued separately; GPU-only ignored tests were not run.

Notes for reviewers

The fallback scans each format separately, then used to sort candidate JSON lexicographically to make duplicates adjacent. Keeping discovery order alone would still group by scan. The parser now sorts by source byte offset and deduplicates by the same exact JSON text, so overlapping scans still yield one call without reordering.

CLA


Software Factory opened this PR for Robert
Implemented in session Preserve tool call order in JSON fallback
Review with Devin · Open in Devin Desktop


@devin-ai-integration

Copy link
Copy Markdown

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration
devin-ai-integration Bot force-pushed the devin/1795371438-json-tool-call-order branch from 7f1b8bc to 9dd3430 Compare November 22, 2026 18:29
@maplepaladin73
maplepaladin73 merged commit ee1bada into main Nov 22, 2026
1 check passed
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