test: cover message identity compatibility across SDKs - #2468
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Adding a field to the stable public UserMessageData struct introduces an unresolved Rust source-compatibility break.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 1
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
scripts/codegen/rust.ts — Injecting this field into UserMessageData is a Rust source-breaking API change: the type is… |
What changed in this PR
Exposes stable queued-message UUIDs in Rust for correlating send results, queue entries, and user-message events.
Changes:
- Adds temporary Rust codegen schema bridges for
messageId. - Regenerates Rust API/event types with optional message IDs.
- Adds serde compatibility tests for current and legacy payloads.
| File | Description |
|---|---|
scripts/codegen/utils.ts |
Adds schema augmentation helpers. |
scripts/codegen/rust.ts |
Applies augmentations during Rust generation. |
rust/src/generated/api_types.rs |
Exposes queue-item message IDs. |
rust/src/generated/session_events.rs |
Exposes user-event message IDs. |
rust/tests/api_types_test.rs |
Tests queue-item serde behavior. |
rust/tests/session_events_test.rs |
Tests event-payload serde behavior. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Thanks for addressing the real correlation gap: callers need one stable message UUID shared by Suggested scope and timing:
For tracking, I've moved this to draft - please mark it ready to review when the runtime fields have landed and the six SDKs are generated from the updated contract. |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: adfd8891-a94a-4365-9d3a-9662f967d4cf
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: adfd8891-a94a-4365-9d3a-9662f967d4cf
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: adfd8891-a94a-4365-9d3a-9662f967d4cf
89df40c to
0e43824
Compare
|
The runtime fields are now available through the pinned @github/copilot 1.0.83-2 schemas. I rebased onto current main, removed the temporary Rust-only augmentation, added compatibility coverage for all six SDKs, and completed the full validation set, so this is ready for review. |

The runtime now exposes one stable user-message UUID across
SendResult.messageId, visiblequeue.pendingItemsrows, anduser.messageevents. With@github/copilot1.0.83-2 pinned onmain, all six SDKs generate the optional identity fields from the canonical schemas; this PR adds compatibility coverage to prevent wire-name or older-runtime regressions.This change:
QueuePendingItems.messageIdandUserMessageData.messageIdin Node, .NET, Python, Go, Rust, and JavamessageIdis absentValidation:
go test ./...mvn verify