Files
rutster/.github/workflows/ci.yml
Aaron D. Lee 72409e4b8f ci(trunk): twilio-live manual-trigger job + seam-gate verification + doc-link fixes (slice-5 T10)
The routine CI gate stays feature-default-off: MockCallControlClient is the
per-PR test surface. A new twilio-live job runs ONLY on manual
workflow_dispatch (maintainer triggers pre-release) -- it exercises clippy
--features=twilio-live + the live TwilioCallControlClient tests against real
Twilio credentials (TWILIO_* secrets). Never runs per-PR.

Seam gate verified UNCHANGED: loop_driver.rs (744bf314...) + rtc_session.rs
(f47d63b9...) blob hashes match the slice-4 Task 10 pins exactly -- the trunk
leg's tick lives entirely in rutster-trunk/src/loop_driver.rs (a separate file
in a separate crate), so the media-crate seam files stay byte-identical.

cargo deny: reqwest (rustls-tls) + base64 + async-trait introduce ZERO new
duplicate dep versions (verified via `cargo tree -d` with vs without
--features=twilio-live: identical duplicate sets -- the existing skip list in
deny.toml remains sufficient). Local cargo-deny 0.18.3 cannot parse the
`-or-later` SPDX form + CVSS 4.0 advisory entries (pre-existing limitation
documented in deny.toml; CI's cargo-deny-action@v2 bundles 0.19.x which handles
both) -- CI is the authoritative deny gate.

Two rustdoc intra-doc-link warnings in my code fixed (mock.rs private-item
link -> plain inline code; lib.rs redundant explicit link target simplified).
Two pre-existing rustdoc warnings remain in rutster-tap/protocol.rs +
rutster/tap_engine.rs (out of scope -- pre-existing from slices 2-3, not
introduced by slice-5).

T10 of slice-5. This is the final task on the dev-b chain (T2 + T6 + T9 + T10
all landed).

Signed-off-by: Aaron D. Lee <himself@adlee.work>
2026-07-05 03:16:00 -04:00

120 lines
4.7 KiB
YAML

# .github/workflows/ci.yml — slice-1 CI (spec §6.2).
# Gates: fmt --check, clippy -D warnings, test --all, cargo deny check.
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
# Manual trigger for the twilio-live job (pre-release validation against
# real Twilio credentials). Never runs per-PR — the routine clippy/test
# jobs use default features (MockCallControlClient); the live
# TwilioCallControlClient is feature-gated behind `twilio-live` + only the
# maintainer exercises it before tagging a release (spec §1.2 + plan T6/T10).
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Install libopus (media crate FFI dep)
run: apt-get update && apt-get install -y libopus-dev
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --all -- -D warnings
test:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain: [stable, "1.85"]
steps:
- uses: actions/checkout@v4
# Seam gate (slice-4 §7 #3; re-pinned slice-5):
#
# `loop_driver.rs` stays byte-identical to slice-3 — the hot-path
# poll loop is untouched. `rtc_session.rs` was re-pinned in slice-5
# for MediaAddressConfig (2026-07-04 scalability review, B1:
# bind/advertised address split + port range). If a legitimate
# change is needed, update the pinned blob hashes below in the same
# PR — loud and reviewable by design.
- name: Seam gate — loop_driver frozen (slice-3) + rtc_session pinned (slice-5)
run: |
EXPECTED_LOOP_DRIVER='744bf314edf7f4925c8bb3bd0f5176dbc88f8113'
EXPECTED_RTC_SESSION='f47d63b9a2883d37066a93c9daa0e2cf8816bec4'
GOT_LOOP_DRIVER=$(git hash-object crates/rutster-media/src/loop_driver.rs)
GOT_RTC_SESSION=$(git hash-object crates/rutster-media/src/rtc_session.rs)
if [ "$GOT_LOOP_DRIVER" != "$EXPECTED_LOOP_DRIVER" ]; then
echo "::error::loop_driver.rs blob mismatch: $GOT_LOOP_DRIVER != $EXPECTED_LOOP_DRIVER"
exit 1
fi
if [ "$GOT_RTC_SESSION" != "$EXPECTED_RTC_SESSION" ]; then
echo "::error::rtc_session.rs blob mismatch: $GOT_RTC_SESSION != $EXPECTED_RTC_SESSION"
exit 1
fi
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- name: Install libopus (media crate FFI dep)
run: apt-get update && apt-get install -y libopus-dev
- uses: Swatinem/rust-cache@v2
- run: cargo test --all
deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: EmbarkStudios/cargo-deny-action@v2
with:
command: check
# The live TwilioCallControlClient is feature-gated behind `twilio-live`
# (reqwest + rustls-tls + tracing + serde_json pulled in only when the
# feature is on). This job exercises it against REAL Twilio credentials.
# It runs ONLY on manual `workflow_dispatch` (never per-PR) — the routine
# clippy/test jobs above use default features (MockCallControlClient).
# The maintainer triggers this before tagging a release, after setting the
# TWILIO_* secrets in the repo settings (spec §1.2 + plan T10 Step 3).
twilio-live:
name: twilio-live (manual only)
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Install libopus (media crate FFI dep)
run: apt-get update && apt-get install -y libopus-dev
- uses: Swatinem/rust-cache@v2
- name: Clippy with twilio-live feature
run: cargo clippy --all --all-targets --features=twilio-live -- -D warnings
- name: Twilio-live tests (includes ignored live e2e; needs TWILIO_* secrets)
env:
RUTSTER_TWILIO_ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }}
RUTSTER_TWILIO_AUTH_TOKEN: ${{ secrets.TWILIO_AUTH_TOKEN }}
RUTSTER_TWILIO_MEDIA_BIND: 0.0.0.0:8081
RUTSTER_TWILIO_WEBHOOK_BASE: ${{ secrets.TWILIO_WEBHOOK_BASE }}
RUTSTER_TWILIO_TEST_TO: ${{ secrets.TWILIO_TEST_TO }}
RUTSTER_TWILIO_TEST_FROM: ${{ secrets.TWILIO_TEST_FROM }}
run: cargo test --all --features=twilio-live -- --include-ignored