## Summary Windows hosts can lend granted MCP servers to local and machine-based ACP agents through authenticated loopback endpoints. Hosts with Unix sockets retain that transport. Server definitions, upstream credentials, sandbox policy and disabled-tool enforcement stay on the host. - Share one connector between the local bridge and node client. Bind TCP endpoints only to 127.0.0.1 and authenticate with a fresh per-endpoint token before opening an upstream. - Read inherited Windows stdin pipes through a daemon worker with backpressure. Acknowledge each chunk on the event loop before reading another, so neither the reader buffer nor queued callbacks can grow without bound. - Cancel both bridge pumps on exit, allow up to one second for the endpoint connection to flush, then abort the transport if it still holds unsent bytes. A peer that stops reading cannot hold failure or cancellation cleanup indefinitely. - Resolve this installation's raven.exe, preserve task and session isolation, hide endpoint credentials from grant representations, and redact them in bridge diagnostics and session-start journal frames. Remote dispatches do not receive the host's loopback token. - Update capability reporting, CLI help, the remote ACP entry's `machine` docstring, CONTEXT.md and the English/Chinese collaboration guide. Add Windows CI coverage and exercise both Unix and TCP endpoints on Linux. ## Type - [ ] Fix - [x] Feature - [ ] Docs - [ ] CI / tooling - [ ] Refactor - [ ] Other ## Verification Docker Linux, Debian Bookworm with procps and git, Python 3.12.12, --init, a native Linux source copy, and a frozen environment: 783 related unit tests and all 3 real-server integration tests passed. The source and test files were compared with the committed versions before publication. ```sh uv sync --frozen --extra dev uv run --frozen --no-sync pytest tests/test_mcp_transport.py tests/test_mcp_bridge.py tests/test_mcp_endpoint.py tests/test_cli_mcp_commands.py tests/test_subagent_acp_mcp_lifecycle.py tests/test_node_client.py tests/test_acp_journal.py tests/test_subagent_acp_remote.py tests/test_subagent_manager.py tests/test_subagent_mcp_grant.py tests/test_subagent_third_party.py -q -n 4 --dist loadfile --tb=short --cov=raven --cov-report=json:/out/coverage.json --junitxml=/out/units.xml uv run --frozen --no-sync pytest tests/integration/test_mcp_bridge_e2e.py -m integration -q -n 0 --tb=short --junitxml=/out/integration.xml ``` PR diff coverage is 98.26% (169/172 changed executable lines), above the unchanged 90% threshold. On the host checkout, `$coverageReport` points to the JSON exported by that Linux run: ```powershell uv run --frozen --no-sync python scripts/coverage_gate.py --coverage-json $coverageReport diff --base-ref origin/main --head HEAD --threshold 90 ``` Native Windows, Python 3.13.12, a separate frozen environment and PYTHONUTF8=1: all 21 bridge unit tests passed; all 8 integration cases passed, comprising 3 MCP bridge cases and 5 native command-line cases retained in the Windows CI job. ```powershell uv run --frozen --python 3.13 --no-sync pytest tests/test_mcp_bridge.py -q -n 0 --tb=short uv run --frozen --python 3.13 --no-sync pytest tests/integration/test_mcp_bridge_e2e.py tests/integration/test_acp_mirasim_real_process.py -m integration -q -n 0 --tb=short ``` Seven regression cases cover paused input, resuming consumption, closing a paused worker, a busy event loop, and teardown with pending TCP writes: while the endpoint stays stalled, while it drains those writes, and when a second cancel arrives after that drain finished. Aborting the endpoint after a close that finished was wrong: the selector transport has already run connection_lost and dropped its loop, and its _force_close returns early only on _conn_lost, which a drained close does not raise, so the bridge exited 1 at teardown on Linux and macOS. The abort now depends on whether the endpoint's write buffer still holds bytes, since a closing transport empties it before calling connection_lost. A flag set once the close returned would miss the second cancel, and that case fails with one. The stalled-endpoint teardown case pauses the endpoint's reading before the frames are fed: it used to wait for the socket to stop reading through its own flow control, which took 1.87 s of the case's 2 s budget on Linux, so a busy runner timed out before the teardown ran. It is now 0.17 s per case, and 20 consecutive runs under 32 busy loops on 16 cores all passed. The original teardown and buffering cases fail without the fixes. At this head, making the stdin worker read again without waiting for its previous chunk to be delivered fails 3 cases, removing the close deadline fails 2, and never aborting fails 2; aborting unconditionally fails both drained cases. These mutations ran on a disposable copy of the source tree, not on the committed files. The unreachable-upstream integration test still uses its original 1.5-second deadline. Its Windows fixture bypasses the venv redirector while preserving the venv, so an inherited stdout handle cannot mask EOF. Full-PR pre-commit, commitlint, commit-message, source-language, asset and whitespace checks passed. The bridge type check passed and all 10 import contracts were kept: ```powershell uv run --frozen --no-sync pre-commit run --from-ref origin/main --to-ref HEAD npx --no-install commitlint --from origin/main --to HEAD --config commitlint.config.cjs uv run --frozen --no-sync python scripts/check_commit_messages.py origin/main..HEAD uv run --frozen --no-sync python scripts/check_large_files.py origin/main...HEAD uv run --frozen --no-sync python scripts/check_source_language.py origin/main...HEAD uv run --frozen --no-sync ty check raven/mcp/bridge.py uv run --frozen --no-sync lint-imports git diff --check origin/main...HEAD ``` These are focused local results. Remote dispatch tests use the repository's SSH stand-in and real node processes, not an external machine. POSIX-dependent paths are covered on Linux; no full-suite Windows pass, live LLM run or sandbox VM run is claimed. Existing Windows path, shell and journal portability outside this MCP change remains out of scope. - [x] Relevant tests pass locally - [x] Relevant lint / type checks pass locally - [x] User-facing docs or screenshots are updated when needed ## Risk Windows dispatches can now use granted MCP servers. Each fallback endpoint opens an ephemeral loopback listener with a bounded authentication handshake and its own random token. Upstream definitions and credentials remain on the host, and remote dispatches receive no loopback token. Input now pauses when a bridge cannot forward requests. During shutdown, a connection that cannot flush within one second is aborted and its remaining queued bytes can be discarded. This bounds cleanup when a peer has stopped reading. Unix sockets remain the preferred transport, and the Raven node wire protocol is unchanged. No dependencies, configuration fields or migrations are added. Reverting the change restores the previous Windows MCP limitation. - [x] Security impact considered - [x] Backward compatibility considered - [x] Rollback path is clear for risky changes ## Related Issues Fixes #962 --------- Co-authored-by: Codex <noreply@openai.com> Co-authored-by: Claude (claude-opus-5-5[1m]) <noreply@anthropic.com>
580 lines
21 KiB
YAML
580 lines
21 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ci-${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
pre-commit:
|
|
name: pre-commit diff
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v8.2.0
|
|
with:
|
|
enable-cache: true
|
|
cache-dependency-glob: uv.lock
|
|
|
|
- name: Set up Python
|
|
run: uv python install 3.12
|
|
|
|
- name: Install dependencies
|
|
run: make install-deps
|
|
|
|
- name: Run pre-commit on changed files
|
|
run: |
|
|
if [ "${{ github.event_name }}" = "pull_request" ]; then
|
|
BASE="${{ github.event.pull_request.base.sha }}"
|
|
else
|
|
BASE="${{ github.event.before }}"
|
|
fi
|
|
if [ -z "$BASE" ] || [ "$BASE" = "0000000000000000000000000000000000000000" ]; then
|
|
BASE="$(git rev-list --max-parents=0 HEAD)"
|
|
fi
|
|
uv run pre-commit run --from-ref "$BASE" --to-ref HEAD
|
|
|
|
lint-python:
|
|
name: python lint
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v8.2.0
|
|
with:
|
|
enable-cache: true
|
|
cache-dependency-glob: uv.lock
|
|
|
|
- name: Set up Python
|
|
run: uv python install 3.12
|
|
|
|
- name: Install dependencies
|
|
run: make install-deps
|
|
|
|
- name: Python lint
|
|
run: make lint-python
|
|
- name: Import contracts (layer boundaries)
|
|
run: make lint-imports
|
|
|
|
- name: Dependency hygiene (no direct import of a transitive dep)
|
|
run: make lint-deps
|
|
|
|
- name: Type check (call correctness)
|
|
run: make lint-types
|
|
|
|
# Four runners, each collecting and running a quarter of the test files
|
|
# (`--shard`, dealt round-robin in tests/conftest.py), each writing coverage
|
|
# data and no report; the `coverage` job below combines the four and runs
|
|
# the gates once. Measured before the split: 12 minutes on one runner, of
|
|
# which two were the four xdist workers importing every test module.
|
|
unit:
|
|
name: unit (py${{ matrix.python }} / ${{ matrix.os }} / ${{ matrix.shard }})
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 20
|
|
env:
|
|
PYTHON_VERSION: ${{ matrix.python }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
python: ["3.12"]
|
|
# K/N in one place: the denominator is not derived from the matrix size,
|
|
# which would silently drop files if another dimension were added.
|
|
shard: ["1/4", "2/4", "3/4", "4/4"]
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v8.2.0
|
|
with:
|
|
enable-cache: true
|
|
cache-dependency-glob: uv.lock
|
|
|
|
- name: Set up Python
|
|
run: uv python install ${{ matrix.python }}
|
|
|
|
# tests/test_ui_css_token_gate.py shells out to the node gate, and it is
|
|
# the ONLY thing anywhere that checks what that gate rejects -- the page
|
|
# job below runs the gate against the current stylesheet, which proves it
|
|
# runs and that the file passes, and nothing about refusal. Installed
|
|
# here so this job really runs that suite: without it the runtime skip in
|
|
# that file quietly drops all 43 cases.
|
|
- name: Set up Node
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 22
|
|
|
|
# No bytecode precompilation, of site-packages here or of the checkout
|
|
# before the run: measured over three runs of this workflow, neither paid
|
|
# for itself. The note stays so the next reader does not spend an
|
|
# afternoon finding that out again.
|
|
- name: Install dependencies
|
|
run: uv sync --locked --all-extras --dev --python ${{ matrix.python }}
|
|
|
|
# Stdlib only. The dedicated gate is the `page` job below; this step
|
|
# keeps the build honest inside the test matrix too, because
|
|
# `ui-web/build.py` matches exact literal markers in the page sources and
|
|
# hard-exits on a miss, so an edit that reflows a source or drops a
|
|
# marker leaves CI green and blocks the release at `git push v1.2.3`.
|
|
- name: Build served page
|
|
run: |
|
|
npm ci --prefix ui-web
|
|
npm run --prefix ui-web build
|
|
python3 ui-web/build.py
|
|
test -f ui-web/dist/index.html
|
|
|
|
- name: Unit tests, this shard, with line and branch coverage data
|
|
# TERM=dumb: typer's rich_utils force-enables colour when GITHUB_ACTIONS is
|
|
# set, and the highlighter then splits option names with escape codes, so
|
|
# `"--flag" in result.stdout` assertions fail only on CI.
|
|
# The idle ceiling fails the shard here and only here: a test that waits
|
|
# out a production sleep waits the same seconds on every machine, so the
|
|
# verdict is portable; the flag stays off addopts because the Windows
|
|
# job runs pytest with --noconftest, where the option does not exist.
|
|
run: make coverage-shard COVERAGE_SHARD=${{ matrix.shard }} PYTEST_ARGS=--idle-ceiling-strict
|
|
|
|
- name: Name the data file after the shard
|
|
run: mv .coverage .coverage.shard-${{ strategy.job-index }}
|
|
|
|
- name: Upload coverage data
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: coverage-data-py${{ matrix.python }}-${{ matrix.os }}-${{ strategy.job-index }}
|
|
path: .coverage.shard-*
|
|
include-hidden-files: true
|
|
if-no-files-found: error
|
|
retention-days: 1
|
|
|
|
coverage:
|
|
name: coverage gates
|
|
needs: unit
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
env:
|
|
PYTHON_VERSION: "3.12"
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v8.2.0
|
|
with:
|
|
enable-cache: true
|
|
cache-dependency-glob: uv.lock
|
|
|
|
- name: Set up Python
|
|
run: uv python install 3.12
|
|
|
|
- name: Install dependencies
|
|
run: make install-deps
|
|
|
|
- name: Download the shards' coverage data
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
pattern: coverage-data-*
|
|
path: coverage-data
|
|
merge-multiple: true
|
|
|
|
- name: Combine the shards into one report
|
|
run: make coverage-combine
|
|
|
|
- name: Coverage summary and lowest-covered files
|
|
if: ${{ !cancelled() && hashFiles('coverage.json') != '' }}
|
|
run: make coverage-summary
|
|
|
|
- name: Overall coverage ratchet
|
|
if: ${{ !cancelled() && hashFiles('coverage.json') != '' }}
|
|
run: make coverage-ratchet
|
|
|
|
- name: Coverage baseline cannot decrease
|
|
if: ${{ !cancelled() && github.event_name == 'pull_request' }}
|
|
env:
|
|
COVERAGE_BASE_REF: origin/${{ github.base_ref }}
|
|
run: make coverage-baseline-check
|
|
|
|
- name: PR diff coverage
|
|
if: ${{ !cancelled() && github.event_name == 'pull_request' && hashFiles('coverage.json') != '' }}
|
|
env:
|
|
COVERAGE_BASE_REF: origin/${{ github.base_ref }}
|
|
run: make coverage-diff
|
|
|
|
- name: Explain skipped diff coverage
|
|
if: ${{ !cancelled() && github.event_name != 'pull_request' }}
|
|
run: echo "Diff coverage is a PR-only gate; push builds still enforce the overall ratchet."
|
|
|
|
- name: Create auditable baseline candidate
|
|
if: ${{ !cancelled() && hashFiles('coverage.json') != '' }}
|
|
run: make coverage-baseline-candidate
|
|
|
|
- name: Upload coverage reports
|
|
if: always()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: python-coverage-py3.12-ubuntu-latest
|
|
path: |
|
|
coverage.xml
|
|
coverage.json
|
|
coverage-baseline-candidate.json
|
|
if-no-files-found: warn
|
|
retention-days: 30
|
|
|
|
trajectory:
|
|
name: trajectory regressions
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v8.2.0
|
|
with:
|
|
enable-cache: true
|
|
cache-dependency-glob: uv.lock
|
|
|
|
- name: Set up Python
|
|
run: uv python install 3.12
|
|
|
|
- name: Install dependencies
|
|
run: make install-deps
|
|
|
|
- name: Replay committed regression cases
|
|
env:
|
|
RAVEN_REGRESSION_REPORT_DIR: ${{ runner.temp }}/trajectory-reports
|
|
run: uv run pytest tests/test_trajectory_regressions.py -q
|
|
|
|
- name: Validate case format, redaction review, and size budget
|
|
if: ${{ !cancelled() }}
|
|
run: uv run raven trajectory regression validate --all
|
|
|
|
- name: Upload failure reports
|
|
if: failure()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: trajectory-failure-reports
|
|
path: ${{ runner.temp }}/trajectory-reports/
|
|
if-no-files-found: ignore
|
|
retention-days: 14
|
|
|
|
installer:
|
|
name: installer (${{ matrix.os }}) against the latest release
|
|
# The two installers are served from main and install the latest published
|
|
# release, so a script that reaches for something that release does not have
|
|
# breaks every one-line install the moment it merges -- which is how an
|
|
# ending on `raven web` shipped against a wheel that had no `web`. This job
|
|
# runs exactly that combination, piped the way users run it so remote mode
|
|
# is what gets exercised, and asks the installed raven to answer. Only PRs
|
|
# that touch an installer pay for it; every push to main runs it.
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 25
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Decide whether an installer changed
|
|
id: changed
|
|
shell: bash
|
|
run: |
|
|
if [ "${{ github.event_name }}" != "pull_request" ]; then
|
|
echo "run=true" >> "$GITHUB_OUTPUT"
|
|
elif git diff --name-only "origin/${{ github.base_ref }}...HEAD" -- install.sh install.ps1 | grep -q .; then
|
|
echo "run=true" >> "$GITHUB_OUTPUT"
|
|
else
|
|
echo "run=false" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
|
|
# Node 22 up front: the script would otherwise fetch a private runtime,
|
|
# which is its business to get right but not what this job measures.
|
|
- uses: actions/setup-node@v6
|
|
if: steps.changed.outputs.run == 'true'
|
|
with:
|
|
node-version: "22"
|
|
|
|
- name: Install the latest release with install.sh, piped
|
|
if: steps.changed.outputs.run == 'true' && runner.os != 'Windows'
|
|
env:
|
|
RAVEN_MINIMAL: "1"
|
|
RAVEN_NO_LAUNCH: "1"
|
|
UV_TOOL_DIR: ${{ runner.temp }}/tools
|
|
UV_TOOL_BIN_DIR: ${{ runner.temp }}/bin
|
|
UV_CACHE_DIR: ${{ runner.temp }}/cache
|
|
RAVEN_HOME: ${{ runner.temp }}/home
|
|
run: |
|
|
cat install.sh | sh
|
|
"$UV_TOOL_BIN_DIR/raven" --version
|
|
|
|
- name: Install the latest release with install.ps1 under pwsh, piped
|
|
if: steps.changed.outputs.run == 'true' && runner.os == 'Windows'
|
|
shell: pwsh
|
|
env:
|
|
RAVEN_MINIMAL: "1"
|
|
RAVEN_NO_LAUNCH: "1"
|
|
UV_TOOL_DIR: ${{ runner.temp }}\tools
|
|
UV_TOOL_BIN_DIR: ${{ runner.temp }}\bin
|
|
UV_CACHE_DIR: ${{ runner.temp }}\cache
|
|
RAVEN_HOME: ${{ runner.temp }}\home
|
|
run: |
|
|
Get-Content install.ps1 -Raw | Invoke-Expression
|
|
& "$env:UV_TOOL_BIN_DIR\raven.exe" --version
|
|
|
|
# Windows PowerShell 5.1 is the shell every Windows ships with, and its
|
|
# web cmdlets report failures differently from pwsh's, so a script that
|
|
# passes under one can fail under the other. Its own tool, bin and home
|
|
# directories keep the version check answering for this install alone.
|
|
- name: Install the latest release with install.ps1 under Windows PowerShell 5.1, piped
|
|
if: steps.changed.outputs.run == 'true' && runner.os == 'Windows'
|
|
shell: powershell
|
|
env:
|
|
RAVEN_MINIMAL: "1"
|
|
RAVEN_NO_LAUNCH: "1"
|
|
UV_TOOL_DIR: ${{ runner.temp }}\tools-ps51
|
|
UV_TOOL_BIN_DIR: ${{ runner.temp }}\bin-ps51
|
|
UV_CACHE_DIR: ${{ runner.temp }}\cache
|
|
RAVEN_HOME: ${{ runner.temp }}\home-ps51
|
|
run: |
|
|
Get-Content install.ps1 -Raw | Invoke-Expression
|
|
& "$env:UV_TOOL_BIN_DIR\raven.exe" --version
|
|
|
|
windows-upgrade:
|
|
name: Windows self-upgrade
|
|
runs-on: windows-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v8.2.0
|
|
|
|
- name: Set up Python
|
|
run: uv python install 3.12
|
|
|
|
- name: Test real uv self-upgrade
|
|
# pytest-asyncio is needed even though this file has no async test: the
|
|
# isolated interpreter still reads the project's pytest config, whose
|
|
# --strict-config turns the then-unknown asyncio_mode into a hard error.
|
|
# pytest-xdist for the same reason, one step further: addopts now carries
|
|
# `-n 4`, and an unknown ARGUMENT is fatal whatever --strict-config says
|
|
# ("unrecognized arguments: -n"). It runs two tests here, so the workers
|
|
# buy nothing -- the plugin only has to exist.
|
|
run: uvx --python 3.12 --from "pytest>=8,<10" --with pytest-asyncio --with pytest-xdist pytest --noconftest tests/integration/test_cli_upgrade_real_uv.py -q
|
|
|
|
windows-acp:
|
|
name: Windows ACP stdio
|
|
runs-on: windows-latest
|
|
timeout-minutes: 15
|
|
env:
|
|
PYTHONUTF8: "1"
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v8.2.0
|
|
|
|
- name: Install the test environment
|
|
run: uv sync --frozen --python 3.13 --extra dev
|
|
|
|
- name: Test that the suite keeps out of the runner's own home
|
|
run: uv run --frozen --python 3.13 --no-sync pytest tests/test_conftest_home.py -q -n 0 --tb=short
|
|
|
|
- name: Test ACP handshakes and bundled launchers
|
|
run: uv run --frozen --python 3.13 --no-sync pytest tests/integration/test_acp_stdio_smoke.py -m integration -q -n 0 --tb=short
|
|
|
|
- name: Test the registered launcher command
|
|
run: uv run --frozen --python 3.13 --no-sync pytest tests/test_cli_agents_commands.py::test_register_pins_the_resolved_row_into_the_host_roster -q -n 0 --tb=short
|
|
|
|
- name: Test a connect's checks against a live process tree
|
|
run: uv run --frozen --python 3.13 --no-sync pytest tests/integration/test_subagent_connect_windows_real_process.py -m integration -q -n 0 --tb=short
|
|
|
|
- name: Test Windows ACP teardown
|
|
run: uv run --frozen --python 3.13 --no-sync pytest tests/test_subagent_acp.py -k close_without_killpg -q -n 0 --tb=short
|
|
|
|
- name: Test conditional DAG paths
|
|
run: uv run --frozen --python 3.13 --no-sync pytest tests/test_subagent_dag_core.py -k at_nodes -q -n 0 --tb=short
|
|
|
|
- name: Test DAG finish-text paths
|
|
run: |
|
|
$env:PATH = (Join-Path $env:ProgramFiles 'Git\usr\bin') + ';' + $env:PATH
|
|
uv run --frozen --python 3.13 --no-sync pytest tests/test_subagent_dag_runner.py -k 'test_the_finish_text or test_branch_e2e_one_tool_call' -q -n 0 --tb=short
|
|
|
|
# A launch rewrites the agents' prompt files. Keeping a private file's
|
|
# DACL and recovering from a read-only one are Windows facts the Linux
|
|
# shards skip.
|
|
- name: Test regenerated prompt files
|
|
run: uv run --frozen --python 3.13 --no-sync pytest tests/test_config_product_render.py tests/test_atomic_io.py::test_a_failed_replace_takes_its_tmp_with_it tests/test_atomic_io.py::test_a_read_only_tmp_a_dead_writer_left_does_not_block_the_replace -q -n 0 --tb=short
|
|
|
|
# On Windows the Mirasim desktop host is reached over the loopback port
|
|
# and its token file, never a unix socket, and the unit shards run on
|
|
# Linux only -- so the adapter's own road is exercised natively here.
|
|
- name: Test the Mirasim adapter over the loopback port
|
|
run: uv run --frozen --python 3.13 --no-sync pytest tests/test_acp_mirasim_host.py tests/test_acp_mirasim_server.py tests/test_subagent_mirasim.py tests/test_acp_client_teardown.py -q -n 0 --tb=short
|
|
|
|
- name: Test Raven-Code file diagnostics and worker limits on Windows
|
|
run: uv run --frozen --python 3.13 --no-sync pytest tests/test_agents_code_diagnostic_workers.py tests/test_agents_code_tools_plugin.py -q -n 0 --tb=short
|
|
|
|
- name: Test Raven-Code exec diagnostics with the native Windows executor
|
|
run: uv run --frozen --python 3.13 --no-sync pytest tests/test_agents_code_flow_exec.py -k test_exec_ -q -n 0 --tb=short
|
|
|
|
- name: Test Windows MCP lending and endpoint lifetimes
|
|
run: uv run --frozen --python 3.13 --no-sync pytest tests/test_mcp_transport.py tests/test_mcp_bridge.py tests/test_mcp_endpoint.py tests/test_cli_mcp_commands.py tests/test_subagent_acp_mcp_lifecycle.py tests/test_node_client.py -q -n 0 --tb=short
|
|
|
|
- name: Test Windows MCP bridge against a real server
|
|
run: uv run --frozen --python 3.13 --no-sync pytest tests/integration/test_mcp_bridge_e2e.py -m integration -q -n 0 --tb=short
|
|
|
|
core-wheel:
|
|
name: kernel wheel smoke
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v8.2.0
|
|
with:
|
|
enable-cache: true
|
|
cache-dependency-glob: uv.lock
|
|
|
|
- name: Set up Python
|
|
run: uv python install 3.12
|
|
|
|
- name: Install dependencies
|
|
run: make install-deps
|
|
|
|
# The closure guard in the unit suite proves the SOURCE kernel imports
|
|
# nothing else; this proves the ARTIFACT does -- built from the contract
|
|
# roster, installed into a clean venv with nothing but its own pins.
|
|
# norecursedirs keeps it out of the default pytest scope, so this job is
|
|
# what keeps the wheel honest on every push.
|
|
- name: Build and smoke the raven-core wheel
|
|
run: make check-core-wheel
|
|
|
|
tui:
|
|
name: TUI checks
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- name: Set up Node
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 22
|
|
cache: npm
|
|
cache-dependency-path: ui-tui/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
working-directory: ui-tui
|
|
|
|
- name: Lint, type-check, and test
|
|
run: |
|
|
npm run lint
|
|
npm run lint:rpc
|
|
npm run lint:i18n
|
|
npm run type-check
|
|
npm test
|
|
npm run build
|
|
working-directory: ui-tui
|
|
|
|
ui-rpc:
|
|
name: ui rpc contract
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- name: Set up Node
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 22
|
|
cache: npm
|
|
cache-dependency-path: ui-web/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
working-directory: ui-web
|
|
|
|
# generated.ts is committed; a schema edit without regeneration is the
|
|
# drift this catches. Then the transport layer compiles against it and
|
|
# the fixture transport's behaviour is pinned by vitest.
|
|
- name: Check contract, lint, types, and tests
|
|
run: |
|
|
npm run gen:check
|
|
npm run lint
|
|
npm run type-check
|
|
npm test
|
|
working-directory: ui-web
|
|
|
|
page:
|
|
name: page checks
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- name: Set up Node
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 22
|
|
|
|
# The npm build makes the island bundle build.py inlines; the gate
|
|
# scripts themselves still run on bare node, straight off the checkout.
|
|
# build.py validates the part seams (IIFE opener first, closer last);
|
|
# check-page.mjs validates the assembled artifact (one style, two
|
|
# inline scripts, no leftover markers, scripts parse).
|
|
- name: Build and check the served page
|
|
run: |
|
|
npm ci --prefix ui-web
|
|
npm run --prefix ui-web build
|
|
python3 ui-web/build.py
|
|
node ui-web/scripts/check-page.mjs
|
|
node ui-web/scripts/check-css.mjs
|
|
node ui-web/scripts/check-class-namespace.mjs
|
|
|
|
bridge:
|
|
name: bridge checks
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- name: Set up Node
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 22
|
|
cache: npm
|
|
cache-dependency-path: bridge/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
working-directory: bridge
|
|
|
|
- name: Build bridge
|
|
run: npm run build
|
|
working-directory: bridge
|
|
|
|
- name: Audit bridge dependencies
|
|
run: npm audit --audit-level=critical
|
|
working-directory: bridge
|