test(ai-chat): add edge-case tests for assistant ID reconciliation#969
Merged
Merged
Conversation
Extend merge-server-state tests with two cases: (1) verify reconciliation is skipped when assistant content differs at the same position, preserving both server and client assistant messages; (2) ensure assistant messages containing tool-call parts are skipped during reconciliation without breaking the message cursor or ordering (tool-bearing message is preserved and text assistant remains correct). Changes are in packages/ai-chat/src/tests/merge-server-state.test.ts.
|
commit: |
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.
Summary
Adds two additional test cases for the assistant ID reconciliation logic introduced in #958:
These were identified during review of #958 but the PR was merged before they could be pushed.
Test plan
merge-server-state.test.tspassclient-tool-duplicate-message.test.tspass (no regressions)Made with Cursor