Skip to content

refactor(agentos): apply inspector review feedback #1128

refactor(agentos): apply inspector review feedback

refactor(agentos): apply inspector review feedback #1128

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened, labeled]
jobs:
checks:
name: Checks
if: github.event_name != 'pull_request' || github.base_ref == 'main' || contains(github.event.pull_request.labels.*.name, 'aggregate-ci')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: |
rm -rf /tmp/docs-theme
git clone https://github.com/rivet-dev/docs-theme.git /tmp/docs-theme
git -C /tmp/docs-theme checkout 450c498555135098c6a927adfdf13458be9be22a
rm -rf website/vendor/theme && mkdir -p website/vendor
cp -r /tmp/docs-theme/packages/theme website/vendor/theme
- run: pnpm install --frozen-lockfile
- run: |
# Browser runtime sources remain in-tree, but are intentionally disabled
# until their sidecar/reactor architecture has a separate approved design.
# Software package builds create temporary npm install trees; cap Turbo
# concurrency so their aggregate peak cannot exhaust hosted-runner disk.
if grep -qE '^[[:space:]]*-[[:space:]]*website[[:space:]]*$' pnpm-workspace.yaml; then
npx turbo build \
--concurrency=4 \
--filter='!@rivet-dev/agentos-website' \
--filter='!@rivet-dev/agentos-browser' \
--filter='!@rivet-dev/agentos-runtime-browser' \
--filter='!@rivet-dev/agentos-playground'
else
npx turbo build \
--concurrency=4 \
--filter='!@rivet-dev/agentos-browser' \
--filter='!@rivet-dev/agentos-runtime-browser' \
--filter='!@rivet-dev/agentos-playground'
fi
- run: pnpm --dir scripts/publish run check-types
- run: pnpm --dir scripts/publish test
- run: node --test scripts/check-rust-package-metadata.test.mjs
- run: node scripts/check-rust-package-metadata.mjs
- run: node --test scripts/check-agentos-client-protocol-compat.test.mjs
- run: node scripts/check-agentos-client-protocol-compat.mjs
- run: node --test scripts/verify-fixed-versions.test.mjs
- run: node scripts/verify-fixed-versions.mjs
- run: pnpm check-layout
- run: node --test scripts/generate-secure-exec-mirror.test.mjs
# cargo-fmt ignores workspace.default-members at a virtual workspace root;
# keep retained browser crates outside the native runtime CI gate.
- run: node --test scripts/check-rustfmt.test.mjs
- run: node scripts/check-rustfmt.mjs
- run: pnpm check-types
- run: pnpm lint
continue-on-error: true
wasm-commands:
name: WASM Commands
if: github.event_name != 'pull_request' || github.base_ref == 'main' || contains(github.event.pull_request.labels.*.name, 'aggregate-ci')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- uses: dtolnay/rust-toolchain@nightly
with:
targets: wasm32-wasip1
- uses: Swatinem/rust-cache@v2
with:
workspaces: toolchain -> toolchain/target
cache-workspace-crates: true
key: wasm-commands-${{ hashFiles('toolchain/Cargo.lock') }}
- run: pnpm install --frozen-lockfile --filter '@rivet-dev/agentos-runtime-core...'
- run: make -C toolchain commands
# DuckDB is intentionally outside the default command set because it is a
# heavy build, but the core integration suite requires its real package.
- name: Build required heavy integration commands
run: make -C toolchain cmd/duckdb
- run: node packages/runtime-core/scripts/copy-wasm-commands.mjs --require
- uses: actions/upload-artifact@v4
with:
name: wasm-commands
path: packages/runtime-core/commands
if-no-files-found: error
rust:
name: Rust
if: github.event_name != 'pull_request' || github.base_ref == 'main' || contains(github.event.pull_request.labels.*.name, 'aggregate-ci')
needs: [wasm-commands]
runs-on: [self-hosted, agentos-builder]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Install wasm-pack
run: |
rustup target add wasm32-unknown-unknown
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- run: |
rm -rf /tmp/docs-theme
git clone https://github.com/rivet-dev/docs-theme.git /tmp/docs-theme
git -C /tmp/docs-theme checkout 450c498555135098c6a927adfdf13458be9be22a
rm -rf website/vendor/theme && mkdir -p website/vendor
cp -r /tmp/docs-theme/packages/theme website/vendor/theme
- run: pnpm install --frozen-lockfile
- uses: actions/download-artifact@v4
with:
name: wasm-commands
path: packages/runtime-core/commands
- run: node packages/runtime-core/scripts/copy-wasm-commands.mjs --require
- name: Restore canonical command staging directory
run: |
# Software package builds stage from the canonical toolchain output,
# while CI downloads the validated artifact into runtime-core.
mkdir -p toolchain/target/wasm32-wasip1/release/commands
cp -a packages/runtime-core/commands/. toolchain/target/wasm32-wasip1/release/commands/
- run: |
# Browser runtime sources remain in-tree, but are intentionally disabled
# until their sidecar/reactor architecture has a separate approved design.
if grep -qE '^[[:space:]]*-[[:space:]]*website[[:space:]]*$' pnpm-workspace.yaml; then
npx turbo build \
--filter='!@rivet-dev/agentos-website' \
--filter='!@rivet-dev/agentos-browser' \
--filter='!@rivet-dev/agentos-runtime-browser' \
--filter='!@rivet-dev/agentos-playground'
else
npx turbo build \
--filter='!@rivet-dev/agentos-browser' \
--filter='!@rivet-dev/agentos-runtime-browser' \
--filter='!@rivet-dev/agentos-playground'
fi
- name: Verify complete coreutils runtime package
run: pnpm --filter @agentos-software/coreutils build:runtime
- name: Run real AgentOS actor conformance
run: |
cargo build -p agentos-sidecar
pnpm --filter @rivet-dev/agentos-test-harness build
pnpm --filter @rivet-dev/agentos test:e2e:run
env:
AGENTOS_SIDECAR_BIN: ${{ github.workspace }}/target/debug/agentos-sidecar
- run: cargo clippy --workspace --exclude agentos-sidecar-browser --exclude agentos-native-sidecar-browser --all-targets -- -D warnings
- run: cargo test -p agentos-protocol -- --test-threads=1
- run: cargo test -p agentos-sidecar -- --test-threads=1
- run: cargo test -p agentos-client -- --test-threads=1
env:
AGENT_OS_CLIENT_ALLOW_E2E_SKIPS: '1'
- name: Reclaim Cargo target space before package tests
run: |
df -h .
cargo clean
df -h .
- if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
run: pnpm test
env:
AGENTOS_E2E_NETWORK: '1'
- if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }}
run: pnpm test