Repository navigation
fix(maf): preserve captured tool-call pairing - #6799
Merged
Merged
Conversation
Signed-off-by: Hao Zhe <haozhe4547@gmail.com>
Signed-off-by: Hao Zhe <haozhe4547@gmail.com>
ZaynJarvis
approved these changes
Oct 30, 2026
ZaynJarvis
left a comment
Collaborator
There was a problem hiding this comment.
LGTM. Re-reviewed c91f026: both prior findings fixed, 184 tests pass on latest and minimum bounds, CI green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fix incorrect tool arguments and names in captured Microsoft Agent Framework conversations when a provider reuses tool-call IDs.
Before:
weather(Paris) -> result -> weather(Tokyo) -> result, with both calls namedcall_0, records the Paris result with Tokyo's arguments._messages()builds a global last-call-wins map before converting the transcript.After: results settle preceding calls in transcript order, using MAF occurrence IDs when available to distinguish parallel or out-of-order results. Calls without an occurrence ID remain eligible when MAF supplies one only on the result. Duplicate results retain completed-call metadata without consuming another pending call. Conflicting explicit occurrence IDs remain unpaired instead of borrowing unrelated arguments. Replayed message IDs are processed once; already acknowledged history can still provide pairing metadata without being uploaded again. Tool execution itself is unchanged.
Human Involvement
Related Issue
Capture-correctness follow-up to #5578. No matching existing issue or PR was found.
Type of Change
Changes Made
Only the adapter and its existing test file change. Public APIs, dependency bounds, stored field names, recall timing and commit policies are unchanged. No server or framework modifications are required.
Testing
1a6300e25dbfd14d, 48 fail / 8 pass on both minimum and current dependencies; all 56 pass after these fixes.uv pip checkpasses.Package validation commands:
Checklist
Documentation changes are unnecessary: this restores the existing tool-capture contract and introduces no configuration or API changes.
Screenshots (if applicable)
Not applicable.
Additional Notes
Validation is offline, with deterministic model responses and controlled SDK HTTP fixtures. No live model or deployed OpenViking run was performed. The existing MAF experimental-loop warning and pytest-asyncio fixture-scope deprecation are also present on the base.