Skip to content

Commit dacdd39

Browse files
author
Mark Pollack
committed
README: document the final cross-SDK state
Contracts 6 described the eight-step Java seed; it now describes the full Java programs, the expectations rule (Java gaps in java.json by P-item, peer gaps in the peer's file), the conformance array of raw.json that only gen_conf.py reads, and the Kotlin package being stdio and WebSocket only. Contracts 5 records stepSelection all and the HTTP-version facts.
1 parent cc0e02a commit dacdd39

2 files changed

Lines changed: 43 additions & 27 deletions

File tree

‎integration-testing/README.md‎

Lines changed: 40 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -265,11 +265,13 @@ A cell is one generated config, `configs/x-<client>-<agent>-<transport>[-unstabl
265265
- the **profile** is `stable`, or `unstable` (the `unstable` steps only, plus the mandatory first
266266
and last; suffix `-unstable`, run on demand).
267267

268-
`matrix.json` per language: `enabled` (cells are generated only when both languages are enabled),
269-
`dir`, `peers` (from `peers.json`), `env`, `transports`, `readyTimeoutSec`. `stepSelection` is
270-
`seed` (only `"seed": true` steps) or `all`. `facts` add transport assertions to the cells their
271-
`when` matches, with roles `client` and `agent` mapped to processes: the h2c checks of the Java
272-
pair, DELETE -> 202 on the Java agent, the WebSocket 101.
268+
`matrix.json` per language: `enabled` (cells are generated only when both languages are enabled;
269+
all five are), `dir`, `peers` (from `peers.json`), `env`, `transports`, `readyTimeoutSec`.
270+
`stepSelection` is `all` (`seed`, only the `"seed": true` steps, or a comma-separated id list
271+
also work). `facts` add transport assertions to the cells their `when` matches, with roles
272+
`client` and `agent` mapped to processes: the HTTP version each HTTP pair negotiates (h2c between
273+
the Java client and the Java and Python agents, HTTP/1.1 otherwise, on both sides), DELETE -> 202
274+
on every agent, the WebSocket 101 on the Java agent.
273275

274276
Each cell is an ordinary runner config: on HTTP/WS an `agent` process (role `server`, `ready` on
275277
`READY`) and a `client` process; on stdio a single `client` process with `AGENT_CMD`. The checks are
@@ -295,25 +297,37 @@ and never part of the nightly. **Language packages never commit generated config
295297
integration step regenerates and commits them, after enabling the languages. `--check` reports
296298
locally generated extra cells as "extra", which is the reminder.
297299

298-
### 6. The Java seed
299-
300-
The Java programs, `programs/java` (`interop.Agent`, `interop.Client`), are every package's first
301-
partner. Today they implement the eight `seed` steps on all three transports:
302-
303-
| Step | stdio | http | ws |
304-
|---|---|---|---|
305-
| `init.initialize` | yes | yes | yes |
306-
| `session.new` | yes | yes | yes |
307-
| `session.load` | yes | yes | yes |
308-
| `update.agent_message_chunk` | yes | yes | yes |
309-
| `perm.selected` (agent asserts too) | yes | yes | yes |
310-
| `fs.write` (agent asserts too) | yes | yes | yes |
311-
| `http.reconnect` | - | yes | - |
312-
| `conn.close` | yes | yes | yes |
313-
314-
The Java agent answers every other directive with `-32602 unknown directive`, and the Java client
315-
prints `unknown-step` for every other step. The Java agent advertises `loadSession` only; the Java
316-
client advertises `fs.writeTextFile` only. The rest of the catalogue lands with the Java package.
300+
### 6. The Java programs and the expectations
301+
302+
The Java programs, `programs/java` (`interop.Agent`, `interop.Client`), are every package's
303+
partner: every cell has a Java client or a Java agent. They implement the whole catalogue on all
304+
three transports and advertise the full `fixtures.client` / `fixtures.agent` profiles. The `seed`
305+
flag marks the eight steps the first Java seed implemented; `matrix.json` now selects every step
306+
(`"stepSelection": "all"`), and `--steps seed` still generates the seed subset.
307+
308+
A step that fails in a cell is either fixed or declared in exactly one expectations file
309+
([expectations/README.md](expectations/README.md)), chosen by whose code has to change:
310+
311+
- **A Java gap** goes in `expectations/java.json`, with `when.client: java` or `when.agent: java`
312+
and `see: "P<n>"`, the open Phase B item that closes it. The step's `phaseB` in `steps.json`
313+
names the same item. Today there is none: every Phase B item the catalogue
314+
depends on has landed, and `java.json` is empty.
315+
- **A peer gap** goes in the peer's own file (`typescript.json`, `rust.json`, `python.json`,
316+
`kotlin.json`), with `see: "peer:<sdk> <file:line>"` in that SDK, or `see: "spec:<where>"` when
317+
the RFD or schema contradicts itself and the peer and Java read it differently.
318+
- A spec disagreement that only a Java pair shows goes in `java.json` with `see: "spec:..."`
319+
(none today).
320+
321+
The Kotlin package has stdio and WebSocket only: the Kotlin SDK has no Streamable HTTP transport,
322+
so `matrix.json` lists `"transports": ["stdio", "ws"]` for it and no `x-*-kotlin-http` cell exists.
323+
Kotlin's Gradle build needs JDK 21 while everything else stays on 17.
324+
325+
`expectations/raw.json` belongs to the raw driver, which is no matrix language: its
326+
`expectations` array stays empty (`GenConfigs.java` reads it like every other file), and its
327+
`conformance` array holds the expected failures of the `conf-java-*` scenarios, which only
328+
`programs/raw/gen_conf.py` reads (its header documents the fields: `case`, `when.side`,
329+
`when.transport`, `contains`, `see`, `reason`). `gen_conf.py --check` runs next to
330+
`GenConfigs.java --check` in CI.
317331

318332
### 7. Isolation: every scenario must be safe to run next to any other
319333

@@ -391,8 +405,8 @@ language too, run on the same host at the same time.
391405
"requiredOutput": { "agent": ["STEP agent.fs.write PASS"], "client": ["negotiated HTTP_1_1"] },
392406
"forbiddenOutput": { "client": ["negotiated HTTP_2"] },
393407
"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": "..." } ],
408+
"checks": ["client RESULT pass == 65", "client RESULT fail == 0"],
409+
"expectedFailures": [], // from expectations/*.json, e.g. { "process": "client", "step": "...", "contains": "-32601", "reason": "...", "see": "peer:..." }
396410
"report": { "client": ["TIMEOUT"] }
397411
}
398412
}

‎integration-testing/expectations/README.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ never in the configs. `GenConfigs.java` copies every matching entry into the cel
1414
One file per language package, owned by that package: `java.json`, `typescript.json`, `rust.json`,
1515
`python.json`, `kotlin.json`, `raw.json`. A file declares the failures caused by its own SDK or
1616
program. `java.json` holds the Java gaps (`see: "P<n>"`); a peer file holds that peer's bugs
17-
(`see: "peer:..."`).
17+
(`see: "peer:..."`) and the spec disagreements its pairs show (`see: "spec:..."`). `raw.json`'s
18+
`expectations` array stays empty (the raw driver is no matrix language); its `conformance` array
19+
is read only by `programs/raw/gen_conf.py`, for the `conf-java-*` scenarios.
1820

1921
```json
2022
{

0 commit comments

Comments
 (0)