active-rpc 2.0.0

Active RPC — capability-based, promise-pipelined, multi-lane RPC for Active Infinity payloads and multi-agent systems
Documentation
name: CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  gates:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy
      - name: Format
        run: cargo fmt --all -- --check
      - name: Clippy (all targets)
        run: cargo clippy --locked --all-targets --all-features -- -D warnings
      - name: Clippy (no default features)
        run: cargo clippy --locked --all-targets --no-default-features -- -D warnings
      - name: Tests
        run: cargo test --locked --all-features
      - name: Tests (no default features)
        run: cargo test --locked --no-default-features
      - name: Documentation
        env:
          # A broken intra-doc link is a documentation defect, not a warning.
          RUSTDOCFLAGS: -D warnings
        run: cargo doc --locked --no-deps --all-features
      - name: Benchmarks compile
        run: cargo bench --locked --bench transport --no-run

  msrv:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@1.88.0
      # 1.88 is the floor because the patched `time` (RUSTSEC-2026-0009) and
      # `proptest` 1.12 both require it; see docs/adr/0007-msrv.md.
      - name: MSRV check (every feature, every target)
        run: cargo check --locked --all-targets --all-features
      - name: MSRV check (no default features)
        run: cargo check --locked --all-targets --no-default-features

  package:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - name: Package (the tarball must build on its own)
        run: cargo package --locked

  hardening-status:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      # A stale row, a missing test, or a critical invariant without a
      # negative-control plan fails the build.
      - name: Validate the hardening matrix
        run: python3 scripts/hardening_status.py --check

  negative-controls:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      # A security test that still passes on a broken build proves nothing.
      - name: Every security-critical check must fail on a broken build
        run: python3 scripts/negative_controls.py --check

  fuzz:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      # A rolling nightly is deliberate: libFuzzer fixes and sanitizer support
      # land there first. The crate graph is pinned by the committed
      # fuzz/Cargo.lock, which cargo-fuzz uses as-is.
      - uses: dtolnay/rust-toolchain@nightly
      - name: Install clang (libFuzzer runtime)
        run: sudo apt-get update && sudo apt-get install -y clang
      - name: Install cargo-fuzz
        run: cargo install cargo-fuzz --locked
      # The corpus is committed under fuzz/corpus/<target>/. A short campaign
      # per target on every push and pull request; main and nightly run longer.
      - name: Bounded fuzz campaign (every target)
        run: |
          for target in \
            fuzz_arp1_frame \
            fuzz_capability_lifecycle \
            fuzz_promise_graph \
            fuzz_budget_matrix \
            fuzz_tool_mcp \
            fuzz_tool_http \
            fuzz_tool_process \
            fuzz_channel_cap_transfer \
            fuzz_transport_framing; do
            echo "== $target =="
            cargo fuzz run "$target" -- -runs=2000
          done

  supply-chain:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - name: Install audit tools
        run: cargo install cargo-audit cargo-deny --locked
      - name: Advisory audit
        run: cargo audit
      - name: Dependency policy
        run: cargo deny check

  sbom:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - name: Generate and verify the SBOM
        run: |
          mkdir -p dist
          python3 scripts/sbom.py --output dist/active-rpc.cdx.json
          python3 scripts/sbom.py --check dist/active-rpc.cdx.json
      - uses: actions/upload-artifact@v4
        with:
          name: sbom
          path: dist/*.cdx.json

  api-surface:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@nightly
      # The authoritative check: the resolved public API, not a text scan.
      - name: Generate rustdoc JSON
        run: cargo +nightly rustdoc --locked --lib --all-features -- -Zunstable-options --output-format json
      - name: No public secret or raw capability accessor
        run: python3 scripts/api_surface.py target/doc/active_rpc.json