diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a75197e1..3b84a31a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -850,7 +850,7 @@ jobs: java-version: '17' cache: ${{ runner.environment == 'github-hosted' && 'gradle' || '' }} cache-dependency-path: kotlin/rutis/**/*.gradle.kts - - name: gradle build (the SDK, the processor, the conformance programs) + - name: gradle build (the SDK, the processor, the testing tool, the conformance programs) working-directory: kotlin/rutis run: | # The downloads first, retried (the runners' networks); then the @@ -862,10 +862,28 @@ jobs: done ./gradlew --no-daemon build echo "RUTIS_KOTLIN_JAR=$PWD/rutis-conformance/build/libs/rutis-conformance-all.jar" >> "$GITHUB_ENV" + # The other languages, as the far ends of the events conformance. + - uses: actions/setup-node@v4 + with: + node-version: '22' + - run: npm --prefix node/rutis-runtime ci + - uses: actions/setup-python@v5 + if: runner.environment == 'github-hosted' || runner.os != 'macOS' + with: + python-version: '3.10' + - run: python3 -m pip install "websockets==15.*" # Only the Kotlin tests of the contract suites: the other runtimes run # in their own jobs. - name: cargo test (the contract suites with Kotlin) - run: cargo test -p rutis-bridge --features testing,kotlin --test runtime_conformance --test value_roundtrip kotlin_ + run: cargo test -p rutis-bridge --features testing,websocket,kotlin --test runtime_conformance --test value_roundtrip --test session_matrix kotlin_ + # The events conformance with X Kotlin, and Kotlin as Y of the others + # (the written placements on pull requests, a sample in full runs). + - name: cargo test (events conformance with Kotlin) + env: + RUTIS_EVENTS_PLACEMENTS: ${{ needs.changes.outputs.all == 'true' && 'sampled' || 'written' }} + RUTIS_EVENTS_REQUIRE: node,python,kotlin + RUTIS_EVENTS_SETTLE_SCALE: '2' + run: cargo test -p rutis-loader --features node,python,kotlin --test events_conformance - name: self-hosted runner, end if: always() && runner.environment == 'self-hosted' env: diff --git a/crates/rutis-bridge/src/runtime/testing/events.expected.json b/crates/rutis-bridge/src/runtime/testing/events.expected.json index c3d5abd0..5144ebe5 100644 --- a/crates/rutis-bridge/src/runtime/testing/events.expected.json +++ b/crates/rutis-bridge/src/runtime/testing/events.expected.json @@ -1,18 +1,18 @@ { "about": [ "Unified events conformance (#464): one list both the real runtimes and the SDK testing tools are checked against. Format: docs/design-events-protocol-2026-10-18.en.md §13; the cases of §13.3 come first, then the ones added to cover every rule.", - "Real runtimes: crates/rutis-loader/tests/events_conformance.rs (rows of one rutis host, its runtimes, and a second node). Testing tools, the cases without `tool: false`: node/rutis/test/events-conformance.test.mjs, python/rutis/tests/test_events_conformance.py, go/rutis/rutistest/events_conformance_test.go, bun/rutis-bun/test/events-conformance.test.ts, swift/rutis/Tests/RutisTests/EventsConformanceTests.swift (RutisTest). The file is checked for shape by crates/rutis-bridge/tests/events_expected.rs.", - "Languages (`only` / `except`): rust (the host's Rust plugin), node (a Cordis plugin in the Node runtime), node-leaf (a leaf plugin in the Node runtime), bun, python, go, swift. Fixtures: node/rutis-runtime/test/fixtures/conformance-events{,-e,-f}/ (Cordis) and conformance-events-leaf{,-e,-f}.mjs, bun/rutis-bun/test/fixtures/conformance-events{,-e,-f}.ts, python/rutis/tests/fixtures/conformance_events{,_e,_f}.py, go/rutis/internal/fixtures/plugins/conformance (served by go/rutis/internal/fixtures/runtime; one plugin provides every emitter undeclared, its sync method on the wire `dispatchSync`), swift/rutis/Sources/RutisFixturePlugins/ConformanceEvents.swift (served by RutisConformance; as Go), and the Rust plugin of crates/rutis-loader/tests/events_conformance.", + "Real runtimes: crates/rutis-loader/tests/events_conformance.rs (rows of one rutis host, its runtimes, and a second node). Testing tools, the cases without `tool: false`: node/rutis/test/events-conformance.test.mjs, python/rutis/tests/test_events_conformance.py, go/rutis/rutistest/events_conformance_test.go, bun/rutis-bun/test/events-conformance.test.ts, swift/rutis/Tests/RutisTests/EventsConformanceTests.swift (RutisTest), kotlin/rutis/rutis-conformance/src/test/kotlin/arcships/rutis/conformance/EventsConformanceTest.kt. The file is checked for shape by crates/rutis-bridge/tests/events_expected.rs.", + "Languages (`only` / `except`): rust (the host's Rust plugin), node (a Cordis plugin in the Node runtime), node-leaf (a leaf plugin in the Node runtime), bun, python, go, swift, kotlin (the Kotlin SDK's jvm target). Fixtures: node/rutis-runtime/test/fixtures/conformance-events{,-e,-f}/ (Cordis) and conformance-events-leaf{,-e,-f}.mjs, bun/rutis-bun/test/fixtures/conformance-events{,-e,-f}.ts, python/rutis/tests/fixtures/conformance_events{,_e,_f}.py, go/rutis/internal/fixtures/plugins/conformance (served by go/rutis/internal/fixtures/runtime; one plugin provides every emitter undeclared, its sync method on the wire `dispatchSync`), swift/rutis/Sources/RutisFixturePlugins/ConformanceEvents.swift (served by RutisConformance; as Go), kotlin/rutis/rutis-conformance/src/main/kotlin/arcships/rutis/conformance/plugins/ConformanceEvents.kt (likewise: one plugin provides every emitter undeclared, `dispatchSync`), and the Rust plugin of crates/rutis-loader/tests/events_conformance.", "Scopes: each scope path is one instance of its group, created once; t2's group is `team`, not `tenant`, so that rows placed in t1 are not copied into t2 (a loader instance copies its group's rows). The rule compares ids, so the group names do not matter to it.", "Additions to the format of §13.2: a listener's `fails` ({name, message}: its row's apply throws that error, after registering nothing); `typed: \"unit\"` (a Rust unit struct event); `observesDispatch` (a Cordis listener row that also logs `