Skip to content

Commit cc0e02a

Browse files
author
Mark Pollack
committed
Retire the legacy interop-* scenarios and their programs
The generated cells now cover everything they checked: reconnect (http.reconnect in every HTTP cell), session/load, permission and fs write round trips (the Python client's handler still answers "result": null), and, through new matrix.json facts, the HTTP version each pair negotiates (h2c between the Java client and the Java and Python agents, HTTP/1.1 otherwise) and DELETE answered 202 on every agent. Removed: configs/interop-*.json, JavaAgentMain, JavaClientMain, ts-client.mjs, ts-server.mjs, py-client.py, py-server.py and the rust-agent/rust-client binaries. The load-* scenarios stay.
1 parent 347e563 commit cc0e02a

33 files changed

Lines changed: 205 additions & 1291 deletions

‎.github/workflows/cross-sdk.yml‎

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,21 @@ jobs:
4949
PEER: ${{ github.event.inputs.peer || 'all' }}
5050
run: |
5151
# Per peer: its toolchain, its transports (cells x-java-<peer>-<t> and x-<peer>-java-<t>),
52-
# the legacy scenarios that run with its http leg, and the cache paths of its build.
53-
# java runs as one leg: the Java <-> Java cells, the legacy Java pair, conformance, load.
52+
# and the cache paths of its build.
53+
# java runs as one leg: the Java <-> Java cells, conformance, load.
5454
# kotlin has no Streamable HTTP; its Gradle toolchain is JDK 21 while the SDK and the
5555
# Java programs stay on 17 (the last version listed is the default).
5656
peers="$(jq -c . <<'JSON'
5757
[
58-
{ "peer": "java", "java": "17", "only": "interop-java-java,x-java-java-*,conf-*,load-*" },
58+
{ "peer": "java", "java": "17", "only": "x-java-java-*,conf-*,load-*" },
5959
{ "peer": "typescript", "sdk": "typescript-sdk", "java": "17", "node": true,
60-
"transports": ["stdio", "http", "ws"], "legacy": "interop-ts-*",
60+
"transports": ["stdio", "http", "ws"],
6161
"cache-paths": "integration-testing/.cache/peers/typescript-sdk@*\n~/.npm" },
6262
{ "peer": "rust", "sdk": "rust-sdk", "java": "17", "rust": true,
63-
"transports": ["stdio", "http", "ws"], "legacy": "interop-rust-*",
63+
"transports": ["stdio", "http", "ws"],
6464
"cache-paths": "integration-testing/.cache/peers/rust-sdk@*\nintegration-testing/.cache/build\n~/.cargo/registry/index\n~/.cargo/registry/cache\n~/.cargo/git/db" },
6565
{ "peer": "python", "sdk": "python-sdk", "java": "17", "python": true,
66-
"transports": ["stdio", "http", "ws"], "legacy": "interop-python-*",
66+
"transports": ["stdio", "http", "ws"],
6767
"cache-paths": "integration-testing/.cache/peers/python-sdk@*" },
6868
{ "peer": "kotlin", "sdk": "kotlin-sdk", "java": "21\n17", "gradle": true,
6969
"transports": ["stdio", "ws"],
@@ -73,13 +73,12 @@ jobs:
7373
)"
7474
picked="$(jq -c --arg p "$PEER" '[.[] | select($p == "all" or .peer == $p)]' <<< "$peers")"
7575
prepare="$(jq -c '{include: [.[] | select(.sdk)
76-
| . + {only: ((["x-*-\(.peer)-*", "x-\(.peer)-*"] + (if .legacy then [.legacy] else [] end)) | join(","))}
77-
| del(.transports, .legacy)]}' <<< "$picked")"
76+
| . + {only: (["x-*-\(.peer)-*", "x-\(.peer)-*"] | join(","))}
77+
| del(.transports)]}' <<< "$picked")"
7878
cells="$(jq -c '{include: [.[] as $x | ($x.transports // ["all"])[] as $t
7979
| $x + (if $t == "all" then {leg: $x.peer} else {leg: "\($x.peer)-\($t)", transport: $t,
80-
only: ((["x-java-\($x.peer)-\($t)*", "x-\($x.peer)-java-\($t)*"]
81-
+ (if $t == "http" and $x.legacy then [$x.legacy] else [] end)) | join(","))} end)
82-
| del(.transports, .legacy)]}' <<< "$picked")"
80+
only: (["x-java-\($x.peer)-\($t)*", "x-\($x.peer)-java-\($t)*"] | join(","))} end)
81+
| del(.transports)]}' <<< "$picked")"
8382
jq . <<< "$cells"
8483
{
8584
echo "prepare=$prepare"

‎integration-testing/README.md‎

Lines changed: 36 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ This directory is **not** a Maven module and the root `pom.xml` does not referen
99
CI through `.github/workflows/cross-sdk.yml` (per peer; manual dispatch plus nightly) and
1010
`.github/workflows/interop-java.yml` (the Java<->Java cells on every push and pull request).
1111

12-
There are two generations of scenarios:
12+
There are three kinds of scenarios:
1313

14-
- **Generated cells**, `configs/x-<client>-<agent>-<transport>.json`: one feature-driven agent and
15-
one client program per language, a shared step catalogue (`steps.json`), and configs generated
16-
from `matrix.json` by `GenConfigs.java`. The [Contracts](#contracts) section is everything a
17-
language package needs to take part.
18-
- **Legacy scenarios**, `configs/interop-*.json`: hand-written per-pair scripts over Streamable
19-
HTTP. They stay until the generated HTTP cells cover their steps (reconnect, the HTTP-version
20-
checks), then they are deleted in one change. The `load-*` scenarios stay as they are.
14+
- **Generated cells**, `configs/x-<client>-<agent>-<transport>[-unstable].json`: one
15+
feature-driven agent and one client program per language, a shared step catalogue
16+
(`steps.json`), and configs generated from `matrix.json` by `GenConfigs.java`. The
17+
[Contracts](#contracts) section is everything a language package needs to take part.
18+
- **Conformance scenarios**, `configs/conf-java-*.json`: the raw JSON-RPC driver
19+
(`programs/raw`) against the Java agent and client, generated by `programs/raw/gen_conf.py`.
20+
- **Load scenarios**, `configs/load-*.json`, hand-written.
2121

2222
## Prerequisites
2323

@@ -54,7 +54,7 @@ A set of scenarios, with a pass/fail table at the end (exits non-zero on any une
5454

5555
```bash
5656
integration-testing/scripts/run-all.sh # the default set
57-
integration-testing/scripts/run-all.sh --only interop-java-java,load-50 # names
57+
integration-testing/scripts/run-all.sh --only x-java-java-http,load-50 # names
5858
integration-testing/scripts/run-all.sh --only 'x-*-python-*,x-python-*' # globs
5959
integration-testing/scripts/run-all.sh --tag python # name tokens
6060
integration-testing/scripts/run-all.sh --tag stdio --exclude 'x-java-*' --list
@@ -84,7 +84,7 @@ Against a tag or other ref of the peer SDKs (the default, from `peers.json`, is
8484
integration-testing/scripts/run-all.sh --peers-ref v1.0.0
8585
# one peer at a tag, the others at main
8686
integration-testing/scripts/run-all.sh --peer typescript-sdk=v0.5.0
87-
jbang RunScenario.java interop-python-server --peer python-sdk=1.0.0rc2
87+
jbang RunScenario.java x-java-python-http --peer python-sdk=1.0.0rc2
8888
```
8989

9090
A ref can be a branch, a tag or a commit SHA. Each ref gets its own checkout,
@@ -99,32 +99,17 @@ artifact.
9999

100100
| Scenario | What runs |
101101
|---|---|
102-
| `x-java-java-stdio`, `x-java-java-http`, `x-java-java-ws` | generated: the Java client against the Java agent over stdio, Streamable HTTP (h2c) and WebSocket, running the seeded catalogue steps ([Contracts](#6-the-java-seed)) |
103-
| `interop-java-java` | Java client -> Java server; HTTP/2 (h2c) on every request |
104-
| `interop-ts-server` | Java client -> TypeScript server, wired as the SDK's example ships it (HTTP handler plus WebSocket upgrade listener); HTTP/1.1 |
105-
| `interop-rust-server` | Java client -> Rust server (axum); HTTP/1.1 |
106-
| `interop-python-server` | Java client -> Python server (Hypercorn, h2c); HTTP/2; one **expected failure**, below |
107-
| `interop-ts-client` | TypeScript client -> Java server; HTTP/1.1 |
108-
| `interop-rust-client` | Rust client -> Java server; HTTP/1.1 |
109-
| `interop-python-client` | Python client -> Java server; HTTP/1.1 |
102+
| `x-<client>-<agent>-<transport>` | generated: the client program of one language against the agent program of another over one transport, running every stable catalogue step (`steps.json`). Pairs are Java<->Java and Java<->X for X in TypeScript, Rust, Python and Kotlin; transports are stdio, Streamable HTTP and WebSocket (Kotlin: stdio and WebSocket) |
103+
| `x-<client>-<agent>-<transport>-unstable` | the same pair running the `unstable` steps (`session.fork`); on demand only |
104+
| `conf-java-agent-<t>`, `conf-java-client-<t>`, `conf-java-client-catalogue-<t>` | the raw driver probing the Java agent, the Java client's raw mode, and the Java client running catalogue steps against the raw agent ([programs/raw/gen_conf.py](programs/raw/gen_conf.py)) |
110105
| `load-50`, `load-300`, `load-1000` | N Java clients on their own connections, each: initialize, session/new, then 10 (or 5) prompts streaming two updates each |
111106
| `load-shared-300` | 300 clients sharing one HttpClient, so one HTTP/2 connection |
112107

113-
The legacy interop steps are the same in every cell: `initialize`, `session/new`, two prompts that each
114-
stream two updates, a prompt that triggers a permission round trip, `session/load` on the same
115-
connection, a prompt after the load, and the DELETE on close (checked in the server's request log).
116-
The Java client then reconnects on a new connection, loads the same session and prompts again.
117-
The Python client also advertises `fs.writeTextFile` and sends a prompt on which the Java agent
118-
writes a file through it; its handler returns `None`, which the Python SDK sends as
119-
`"result": null`.
120-
121-
**Expected failure.** Java client -> Python server: reconnect-then-load gets a 404. The RFD
122-
contradicts itself: its reconnect diagram opens the session stream before `session/load`, and it
123-
also says an `Acp-Session-Id` the connection does not know is a 404. The Python server follows the
124-
second rule; the TypeScript, Rust and Java servers accept the pre-open. The scenario declares the
125-
two affected steps under `expectedFailures`. The suite stays green and shows them as XFAIL. If the
126-
Python server starts accepting the pre-open, the steps pass, the scenario **fails**, and the
127-
expectation has to be updated.
108+
Over Streamable HTTP the cells also assert, through `matrix.json` facts, what the retired
109+
hand-written `interop-*` scenarios checked: the negotiated HTTP version on both sides (h2c between
110+
the Java client and the Java and Python agents, HTTP/1.1 everywhere else), and the `DELETE` on
111+
close answered 202. `http.reconnect`, in every HTTP cell, loads and prompts a session on a new
112+
connection.
128113

129114
**Load thresholds** (first baselines, from the 2026-09-25 pre-release run): `errors == 0`, every
130115
prompt answered (`ok == expected`), every update delivered (`updates == 2*ok`), at most 4 SDK
@@ -329,8 +314,6 @@ partner. Today they implement the eight `seed` steps on all three transports:
329314
The Java agent answers every other directive with `-32602 unknown directive`, and the Java client
330315
prints `unknown-step` for every other step. The Java agent advertises `loadSession` only; the Java
331316
client advertises `fs.writeTextFile` only. The rest of the catalogue lands with the Java package.
332-
The legacy `interop.JavaAgentMain`/`JavaClientMain` serve the legacy configs until they are
333-
retired.
334317

335318
### 7. Isolation: every scenario must be safe to run next to any other
336319

@@ -373,15 +356,15 @@ language too, run on the same host at the same time.
373356
### 8. CI
374357

375358
- `.github/workflows/interop-java.yml`, on every push to `main` and every pull request: JDK 17
376-
only, `GenConfigs.java --check`, then the `x-java-java-*` cells on all three transports.
359+
only, `GenConfigs.java --check` and `programs/raw/gen_conf.py --check`, then the `x-java-java-*`
360+
cells on all three transports.
377361
- `.github/workflows/cross-sdk.yml`, nightly and on manual dispatch (optionally for one peer):
378362
a `prepare <peer>` job per peer SDK fetches and builds the peer and its programs once
379363
(`run-all.sh --prepare-only`) and caches them under the peer's resolved commit
380364
(`scripts/peer-sha.sh`); then one job per peer and transport (`typescript-stdio`,
381365
`typescript-http`, ..., `kotlin-ws`) restores that build, installs only its own toolchain, and
382-
runs `run-all.sh --only 'x-java-<peer>-<t>*,x-<peer>-java-<t>*'` (the `http` leg also runs the
383-
peer's legacy `interop-*` scenarios). A `java` job runs the Java pair, conformance, load and
384-
`--check`. Each job uploads `logs/` as `cross-sdk-logs-<leg>`; `fail-fast` is off.
366+
runs `run-all.sh --only 'x-java-<peer>-<t>*,x-<peer>-java-<t>*'`. A `java` job runs the Java
367+
pair, conformance, load and both `--check`s. Each job uploads `logs/` as `cross-sdk-logs-<leg>`; `fail-fast` is off.
385368
- None of these gates a release.
386369

387370
## How a scenario is described
@@ -390,25 +373,27 @@ language too, run on the same host at the same time.
390373

391374
```jsonc
392375
{
393-
"name": "interop-ts-server",
394-
"timeoutSec": 240,
376+
"name": "x-java-typescript-http",
377+
"timeoutSec": 565,
395378
"peers": ["typescript-sdk"], // prepared from peers.json before anything is built
396379
"processes": [
397-
{ "name": "server", "role": "server", "language": "node",
398-
"dir": "${ROOT}/programs/node", "build": null, "run": "node ts-server.mjs",
399-
"env": { "TS_SDK": "${peer.typescript-sdk}", "PORT": "${PORT}" },
380+
{ "name": "agent", "role": "server", "language": "typescript",
381+
"dir": "${ROOT}/programs/node", "build": "... ${ROOT}/programs/node/launch/build.sh",
382+
"run": "${ROOT}/programs/node/launch/agent.sh --transport http --port ${PORT}",
383+
"env": { "TS_SDK": "${peer.typescript-sdk}" },
400384
"ready": { "line": "READY", "timeoutSec": 60 } },
401385
{ "name": "client", "role": "client", "language": "java",
402-
"dir": "${ROOT}/programs/java", "build": "${MVNW} -q -B ... compile ...",
403-
"run": "java -cp ... interop.JavaClientMain http://127.0.0.1:${PORT}/acp", "timeoutSec": 120 }
386+
"dir": "${ROOT}/programs/java", "build": "... ${ROOT}/programs/java/launch/build.sh",
387+
"run": "${ROOT}/programs/java/launch/client.sh --transport http --url http://127.0.0.1:${PORT}/acp",
388+
"env": { "STEPS": "init.initialize,...,conn.close" }, "timeoutSec": 445 }
404389
],
405390
"assertions": {
406-
"requiredOutput": { "client": ["STEP initialize PASS", "negotiated HTTP_1_1"] },
391+
"requiredOutput": { "agent": ["STEP agent.fs.write PASS"], "client": ["negotiated HTTP_1_1"] },
407392
"forbiddenOutput": { "client": ["negotiated HTTP_2"] },
408-
"requiredPatterns": { "server": ["\\[http\\] DELETE /acp HTTP/1\\.1 .*-> 202"] },
409-
"checks": ["client RESULT fail == 0", "client RESULT prompt1_updates >= 2"],
410-
"expectedFailures": [ { "process": "client", "step": "...", "contains": "404", "reason": "...", "see": "..." } ],
411-
"report": { "clients": ["GOAWAY received"] }
393+
"requiredPatterns": { "agent": ["\\[http\\] DELETE /acp HTTP/1\\.1 .*-> 202"] },
394+
"checks": ["client RESULT pass == 60", "client RESULT fail == 5"],
395+
"expectedFailures": [ { "process": "client", "step": "cancel-request.client", "contains": "P2:", "reason": "...", "see": "..." } ],
396+
"report": { "client": ["TIMEOUT"] }
412397
}
413398
}
414399
```
@@ -436,9 +421,6 @@ language too, run on the same host at the same time.
436421
without asserting on it. It is for known, timing-dependent behaviour: in `load-shared-300`,
437422
Jetty's HTTP/2 rate control can send GOAWAY when all 300 clients close at once.
438423

439-
The legacy programs live in `programs/<language>/`. Each prints `READY <port>` when it is listening (the
440-
servers), `STEP <name> PASS|FAIL` per step and a final `RESULT key=value ...` line (the clients),
441-
and one `[http]` line per request with the negotiated HTTP version (the servers).
442424

443425
## Layout
444426

‎integration-testing/RunScenario.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
*
3535
* <pre>
3636
* cd integration-testing
37-
* jbang RunScenario.java interop-ts-server
38-
* jbang RunScenario.java interop-ts-server --peer typescript-sdk=v0.5.0
37+
* jbang RunScenario.java x-java-typescript-http
38+
* jbang RunScenario.java x-java-typescript-http --peer typescript-sdk=v0.5.0
3939
* jbang RunScenario.java load-300 --skip-sdk-install
4040
* jbang RunScenario.java --list
4141
* jbang RunScenario.java --prepare x-java-java-http x-java-rust-ws (peers and builds only)

‎integration-testing/configs/interop-java-java.json‎

Lines changed: 0 additions & 76 deletions
This file was deleted.

‎integration-testing/configs/interop-python-client.json‎

Lines changed: 0 additions & 72 deletions
This file was deleted.

0 commit comments

Comments
 (0)