Make agent reload test runtime-compatible#1201
Conversation
Use a unique reload agent name and assert reload results match the subsequent list result instead of depending on whether the runtime preserves session-configured agents after reload. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates the .NET E2E coverage for the session.agent.reload JSON-RPC contract to be resilient to differences between the live agent runtime and the replay/runtime harness, avoiding assumptions about fixed agent names or post-reload agent set behavior.
Changes:
- Generate a unique custom agent name per test run to avoid collisions and brittle name assumptions.
- Assert the session-configured agent is present (and metadata matches) before reload.
- Validate the portable contract:
session.agent.reloadreturns the same agent set as a subsequentsession.agent.list.
Show a summary per file
| File | Description |
|---|---|
| dotnet/test/E2E/RpcAgentE2ETests.cs | Makes the agent reload E2E test runtime-compatible by using a per-run agent name and verifying reload/list consistency. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 0
This comment has been minimized.
This comment has been minimized.
Apply the same runtime-compatible reload test pattern to Go and Python by using unique reload agent names and asserting reload results match subsequent agent list results. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Applied this across Go and Python as well: both reload tests now use unique agent names and assert the reload response matches a subsequent agent list result. |
This comment has been minimized.
This comment has been minimized.
Add the Node.js counterpart for the runtime-compatible agent reload RPC test, including a unique agent name and reload/list consistency assertion. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Added the Node.js reload E2E coverage too. It now follows the same pattern: unique reload agent name, pre-reload metadata assertion, and reload/list consistency check. |
Cross-SDK Consistency Review ✅This PR updates the agent reload E2E test consistently across all four SDKs (Node.js, Go, Python, .NET). The key patterns are well-aligned:
One minor nit: The Python test fixture uses
|
There was a problem hiding this comment.
Generated by SDK Consistency Review Agent for issue #1201 · ● 394.8K
The agent reload E2E tests were brittle against live runtime behavior because they assumed fixed custom agent names and, in some SDKs, a specific post-reload treatment of session-configured agents. In copilot-agent-runtime, the live runtime can preserve the session-configured agent after reload, while the replay runtime may return a different post-reload set.
This updates the C#, Go, Python, and Node.js reload coverage to use unique reload agent names per run, verifies the session-configured agent is present before reload, and then validates the portable contract:
session.agent.reloadsucceeds and returns the same agent set exposed by a subsequentsession.agent.listcall.Validation: