Skip to content

Conversation

@0xMink
Copy link
Contributor

@0xMink 0xMink commented Feb 11, 2026

Refs #11404

Summary

  • Change attempt_completion nativeArgs gating from truthiness (if (args.result)) to existence check (if (args.result !== undefined)) in both the streaming partial parse path and the finalize parse path in NativeToolCallParser.ts
  • An empty string "" is falsy in JavaScript, so result: "" was incorrectly treated as missing, producing the "missing nativeArgs" error
  • Add 4 regression tests: empty-string result, non-empty result, missing result, and streaming empty-string result

Test plan

  • Existing: 12 parser tests continue to pass
  • New: 4 tests for attempt_completion edge cases (empty string, non-empty, missing, streaming empty)
  • Total: 16/16 passing
cd src && npx vitest run core/assistant-message/__tests__/NativeToolCallParser.spec.ts

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. bug Something isn't working labels Feb 11, 2026
@roomote
Copy link
Contributor

roomote bot commented Feb 11, 2026

Rooviewer Clock   See task

No issues found. The fix correctly replaces a truthiness check with an explicit !== undefined check, handling the result: "" edge case that was silently dropping attempt_completion tool calls.

  • No issues identified

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant