openclaw/.github/workflows/node-runtime-conformance.yml
Gio Della-Libera 95b8e03354
chore: gate shared node runtime contracts (#150329)
* ci: gate shared node runtime contracts

Copilot-Session: 2c44506f-c357-47e5-a867-91775df2093d

* refactor(gateway): isolate serialized node events

Move the branded serialized-event payload helper into a focused sibling module so the node registry remains below its enforced line cap while the conformance producers stay wired to shared builders.

Copilot-Session: 2c44506f-c357-47e5-a867-91775df2093d

* fix(gateway): satisfy assertion safety gate

Copilot-Session: 2c44506f-c357-47e5-a867-91775df2093d

* fix: preserve node invoke compatibility

Copilot-Session: 2c44506f-c357-47e5-a867-91775df2093d

* fix: align node request extension handling

Copilot-Session: 2c44506f-c357-47e5-a867-91775df2093d

---------

Co-authored-by: Gio Della-Libera <giodl73-repo@users.noreply.github.com>
Copilot-Session: 2c44506f-c357-47e5-a867-91775df2093d
2026-09-18 22:14:21 -07:00

127 lines
3.9 KiB
YAML

name: Node Runtime Conformance
on:
workflow_dispatch:
push:
branches: [main]
paths:
- ".github/workflows/node-runtime-conformance.yml"
- "crates/**"
- "packages/gateway-protocol/src/index.ts"
- "packages/gateway-protocol/src/schema/nodes.ts"
- "packages/gateway-protocol/src/validator-registry.ts"
- "src/gateway/node-command-policy.ts"
- "src/gateway/node-invoke-request.ts"
- "src/gateway/node-registry.ts"
- "src/infra/node-invoke-lifecycle-contract.test.ts"
- "src/infra/node-pairing-surface.ts"
- "src/infra/node-runtime-integration-contract.test.ts"
- "src/node-host/invoke-payload.ts"
- "test/fixtures/node-invoke-lifecycle-contract.json"
- "test/fixtures/node-runtime-integration-contract.json"
pull_request:
paths:
- ".github/workflows/node-runtime-conformance.yml"
- "crates/**"
- "packages/gateway-protocol/src/index.ts"
- "packages/gateway-protocol/src/schema/nodes.ts"
- "packages/gateway-protocol/src/validator-registry.ts"
- "src/gateway/node-command-policy.ts"
- "src/gateway/node-invoke-request.ts"
- "src/gateway/node-registry.ts"
- "src/infra/node-invoke-lifecycle-contract.test.ts"
- "src/infra/node-pairing-surface.ts"
- "src/infra/node-runtime-integration-contract.test.ts"
- "src/node-host/invoke-payload.ts"
- "test/fixtures/node-invoke-lifecycle-contract.json"
- "test/fixtures/node-runtime-integration-contract.json"
concurrency:
group: node-runtime-conformance-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
permissions:
contents: read
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
jobs:
typescript:
name: TypeScript contracts
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1
fetch-tags: false
persist-credentials: false
submodules: false
- name: Setup Node environment
uses: ./.github/actions/setup-node-env
with:
cache-mode: restore
dependency-cache: "true"
install-bun: "false"
- name: Test shared node contracts
run: >-
pnpm test
src/infra/node-invoke-lifecycle-contract.test.ts
src/infra/node-runtime-integration-contract.test.ts
rust:
name: Rust workspace
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1
fetch-tags: false
persist-credentials: false
submodules: false
- name: Install Rust
run: rustup toolchain install 1.93.0 --profile minimal --component clippy,rustfmt
- name: Cache Cargo
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.cargo/registry
~/.cargo/git
crates/target
key: node-runtime-${{ runner.os }}-${{ hashFiles('crates/Cargo.lock') }}
restore-keys: |
node-runtime-${{ runner.os }}-
- name: Check formatting
run: cargo +1.93.0 fmt --manifest-path crates/Cargo.toml --all -- --check
- name: Run tests
run: cargo +1.93.0 test --manifest-path crates/Cargo.toml --workspace --locked --all-targets
- name: Run Clippy
run: >-
cargo +1.93.0 clippy
--manifest-path crates/Cargo.toml
--workspace
--locked
--all-targets
--
-D warnings
- name: Check documentation
env:
RUSTDOCFLAGS: -D warnings
run: >-
cargo +1.93.0 doc
--manifest-path crates/Cargo.toml
--workspace
--locked
--no-deps