ci(nests): re-add hang-interop + browser-interop jobs to build.yml

T16 closure-roadmap Priority 3
(`2026-05-07-cross-stack-interop-ci-gating.md`).

Reverses commits `6829ab72` ("drop hang-interop job") and `b94737de`
("drop hang-interop + browser-interop jobs") with the path tweak
that the browser harness moved from `nestsClient-browser-interop/`
to `nestsClient/tests/browser-interop/` (commit `bd7b166f`).

Both jobs gated on `lint`, run `ubuntu-latest`, 30 min timeout each.
Linux-only — the cargo install of `moq-relay` 0.10.x has nontrivial
native deps (aws-lc-sys, ring) that take ~6 min cold + ~30 s warm;
caching is keyed on `Cargo.lock + REV`. Browser job adds bun 1.3.11
+ Playwright Chromium caches.

Stability bar:
- 5/5 sweep on HangInteropTest + BrowserInteropTest with hardened
  assertions = 110/110 pass (commit `f6894792` summary).
- A second 5x sweep is in flight (target: 10/10 per plan).
This commit is contained in:
Claude
2026-05-07 21:35:39 +00:00
parent f689479227
commit 21947bc584
+158
View File
@@ -174,6 +174,164 @@ jobs:
name: ${{ matrix.desktop-artifact-name }}
path: ${{ matrix.desktop-artifact-path }}
# Cross-stack interop tests (T16). Builds the Rust hang-listen +
# hang-publish sidecars (nestsClient/tests/hang-interop/), `cargo install`s
# moq-relay + moq-token-cli at the version pinned in
# `nestsClient/tests/hang-interop/REV`, then runs `:nestsClient:jvmTest
# -DnestsHangInterop=true`. See
# `nestsClient/plans/2026-05-06-cross-stack-interop-test.md` and the
# closure roadmap at
# `nestsClient/plans/2026-05-07-t16-closure-roadmap.md`.
#
# Linux-only: the cargo install of `moq-relay` 0.10.x has nontrivial
# native deps (aws-lc-sys, ring) that take 5+ min cold; we cache
# both ~/.cargo and the nestsClient/tests/hang-interop/target tree so the warm
# path is a few seconds. macOS / Windows runs would double the
# matrix cost without catching anything Linux doesn't catch — the
# protocol logic is platform-agnostic and the JNA libopus natives
# are already exercised by the unit-level JvmOpusRoundTripTest on
# the Android job.
hang-interop:
needs: lint
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: 21
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
# Pin Rust to ≥ 1.95 — moq-relay 0.10.25's transitive dep
# `constant_time_eq 0.4.3` requires it, and ubuntu-latest's
# default Rust version drifts.
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
# Cache cargo registry + the sidecar workspace's target/.
# First cold run takes ~6 min for the moq-relay install;
# cached runs ~30 s.
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
nestsClient/tests/hang-interop/target
~/.cache/amethyst-nests-interop/hang-interop-cargo
key: ${{ runner.os }}-cargo-${{ hashFiles('nestsClient/tests/hang-interop/Cargo.lock', 'nestsClient/tests/hang-interop/REV') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Run cross-stack interop suite
run: ./gradlew :nestsClient:jvmTest --tests "com.vitorpamplona.nestsclient.interop.native.HangInteropTest" -DnestsHangInterop=true
- name: Upload interop test report
uses: actions/upload-artifact@v7
if: failure()
with:
name: Hang Interop Test Reports
path: nestsClient/build/reports/tests/jvmTest/
# Phase 4 of T16: browser-side cross-stack interop. Drives a headless
# Chromium (via Playwright) running @moq/lite + @moq/hang against
# the same moq-relay subprocess the hang-interop job uses. Linux-only:
# Chromium QUIC behaviour is consistent across platforms in the
# scenarios we care about, and macOS/Windows would double the matrix
# cost without catching new defects.
#
# Inherits the cargo cache from `hang-interop` because the browser
# path still needs `moq-relay` + `hang-listen` built (the harness
# boots the same Rust subprocess). Adds bun + node_modules + Playwright
# browser caches. See:
# nestsClient/plans/2026-05-06-phase4-browser-harness.md
browser-interop:
needs: lint
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: 21
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
nestsClient/tests/hang-interop/target
~/.cache/amethyst-nests-interop/hang-interop-cargo
key: ${{ runner.os }}-cargo-${{ hashFiles('nestsClient/tests/hang-interop/Cargo.lock', 'nestsClient/tests/hang-interop/REV') }}
restore-keys: |
${{ runner.os }}-cargo-
# bun is a separate install — Playwright + the bun harness build
# both go through it. Pin the version that matches the local agent
# tooling so a CI/local skew can't surface a wire-format change
# in `bun build` output.
- name: Set up bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.11
# Cache bun-installed node_modules for the browser harness.
# Keyed on package.json + bun.lock so a dep bump invalidates.
- name: Cache node_modules
uses: actions/cache@v4
with:
path: |
nestsClient/tests/browser-interop/node_modules
nestsClient/tests/browser-interop/dist
key: ${{ runner.os }}-bun-${{ hashFiles('nestsClient/tests/browser-interop/package.json', 'nestsClient/tests/browser-interop/bun.lock') }}
# Cache Playwright's browser cache (~/.cache/ms-playwright/chromium-*).
# The cold install of Chromium is ~200 MB and 3060 s; cached runs
# are essentially instant.
- name: Cache Playwright browsers
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ hashFiles('nestsClient/tests/browser-interop/package.json') }}
- name: Run browser cross-stack interop suite
run: |
./gradlew :nestsClient:jvmTest \
--tests "com.vitorpamplona.nestsclient.interop.native.BrowserInteropTest" \
-DnestsHangInterop=true \
-DnestsBrowserInterop=true
- name: Upload browser interop test report
uses: actions/upload-artifact@v7
if: failure()
with:
name: Browser Interop Test Reports
path: |
nestsClient/build/reports/tests/jvmTest/
nestsClient/tests/browser-interop/test-results/
nestsClient/tests/browser-interop/playwright-report/
test-and-build-android:
needs: lint
runs-on: ubuntu-latest