Commit aa4e707
Version-independent SDK test and codegen fixes split from the 1.0.76-0 bump (#2110)
* Bound Python e2e tests with a per-test timeout
pytest-timeout has been a declared dev dependency for a while but was never
configured, and the Python job sets no timeout-minutes either. When CLI 1.0.76-0
introduced a session.destroy deadlock, five of the six Python jobs sat
in_progress for hours instead of failing, producing no diagnostic signal at all
and holding runners until GitHub's 6-hour job limit.
Setting timeout = 300 makes a deadlocked test fail in five minutes with a full
stack dump pointing at the blocked call, which is how the other SDKs already
behave (Node uses 30s/60s/180s per test, Go bounds the package at 20m).
The value is deliberately generous: the whole Python suite completes in about
10 minutes, so no individual test comes close to 300s. Verified locally that
pytest honours the setting from pyproject.toml and that it interrupts a hanging
test with a traceback.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e615d062-bcb7-431e-aa9c-d3e47405723a
(cherry picked from commit c33d8e2)
* Close Go/.NET shell-test teardown gap
The "should kill shell process" e2e test exists in all five SDKs, but only
Node, Python and Rust destroy the session at the end of it. Go tears the whole
client down with client.ForceStop() and .NET simply ended at the last assert,
so neither ever exercised session.destroy after a session.shell.exec.
That gap is why Go and .NET stayed green on CLI 1.0.76-0 while Node, Python and
Rust hang: the hang is in session.destroy after a shell exec, and the two green
SDKs never made the call. Adding the teardown makes all five cover the same
sequence.
Verified locally against the same CLI binary (1.0.76-0, sha256 b8bfad2c...):
with the added Disconnect(), the Go test hangs past a 3-minute timeout where it
previously passed in seconds. The same test passes on CLI 1.0.73.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e615d062-bcb7-431e-aa9c-d3e47405723a
(cherry picked from commit 2e54b47)
* Remove Rust e2e test for session.mcp.registerExternalClient
The runtime team confirmed this method is marked `visibility: internal` in the
shared API contract: its `client` and `transport` fields are live in-process MCP
SDK instances that cannot be serialized over JSON-RPC. No SDK exposes it as a
typed method, and the Rust test drove it through a raw `call_session_rpc` with
placeholder JSON objects that could never satisfy that contract.
It passed on CLI 1.0.73 only because the old TypeScript dispatch happened to
route internal methods generically. 1.0.76-0 routes the method through the Rust
native registry, where the host-effect switch has no case for it, so it now
returns -32603 "Unsupported native session host effect". That is correct
behaviour, not a regression, so the test is removed along with its now-orphaned
snapshot and a note recording why the gap is deliberate.
Both `call_session_rpc` and `is_mcp_server_running` remain in use by other tests
in the file, so no helper became dead.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e615d062-bcb7-431e-aa9c-d3e47405723a
(cherry picked from commit f0c846c)
* codegen: emit Rust type aliases for scalar RPC result schemas
The Rust codegen only emitted a named type for result schemas that were an
enum, array, map, or object. A method whose result is an inline primitive
(e.g. {"type":"integer"}) produced a reference to a type that was never
defined, so the generated crate failed to compile with E0425.
No RPC method had a primitive result until session.cancelAllBackgroundAgents
was added, so this latent gap only surfaces on a schema update. Add
rustScalarType()/emitRustScalarAlias() so scalar results emit a plain type
alias alongside the existing shapes.
This is a no-op against the current pinned schema and prevents the next
dependency bump from hitting the same build break.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e615d062-bcb7-431e-aa9c-d3e47405723a
* Ensure shell test teardown on failure
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b565403c-57ed-4368-84f1-f04bfe39e46e
---------
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e615d062-bcb7-431e-aa9c-d3e47405723a
Copilot-Session: b565403c-57ed-4368-84f1-f04bfe39e46e1 parent 523b0c7 commit aa4e707
6 files changed
Lines changed: 54 additions & 56 deletions
File tree
- dotnet/test/E2E
- go/internal/e2e
- python
- rust/tests/e2e
- scripts/codegen
- test/snapshots/rpc_mcp_lifecycle
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
249 | 202 | | |
250 | 203 | | |
251 | 204 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
575 | 575 | | |
576 | 576 | | |
577 | 577 | | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
578 | 617 | | |
579 | 618 | | |
580 | 619 | | |
| |||
1527 | 1566 | | |
1528 | 1567 | | |
1529 | 1568 | | |
| 1569 | + | |
| 1570 | + | |
1530 | 1571 | | |
1531 | 1572 | | |
1532 | 1573 | | |
| |||
1576 | 1617 | | |
1577 | 1618 | | |
1578 | 1619 | | |
| 1620 | + | |
| 1621 | + | |
1579 | 1622 | | |
1580 | 1623 | | |
1581 | 1624 | | |
| |||
Lines changed: 0 additions & 3 deletions
This file was deleted.
0 commit comments