Skip to content

Commit 834021a

Browse files
rustyconoverclaude
andcommitted
ci: run the SDK-neutral Orchard hosted-mode harness against vgi-python
scripts/hosted_conformance.sh runs vgi test/hosted/run_hosted_conformance.py (VGI_DIR, default ../vgi) against OrchardHostedWorker from the project env, with --unix, --tcp and --iroh-raw-upstream as must-refuse commands. The new orchard-hosted-conformance CI job runs it against a pinned vgi commit (VGI_HOSTED_REF) and uploads the worker logs on failure. vgi-python is the reference implementation, so this lane must pass in full. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 85ae674 commit 834021a

2 files changed

Lines changed: 76 additions & 0 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,46 @@ jobs:
181181
- name: Run hosted-protocols group (stdio, unix, http)
182182
run: scripts/hosted_protocols_conformance.sh
183183

184+
orchard-hosted-conformance:
185+
# The SDK-neutral Orchard hosted-mode harness (vgi test/hosted/), which
186+
# every SDK runs against its own fixture worker. vgi-python is the
187+
# reference, so it must pass here in full. Bump VGI_HOSTED_REF with the
188+
# harness.
189+
name: Orchard hosted-mode conformance
190+
runs-on: ubuntu-latest
191+
env:
192+
VGI_HOSTED_REF: 2957674e1167abf884fbd0d7e159472afa31291c
193+
steps:
194+
- uses: actions/checkout@v7
195+
196+
- name: Checkout the harness (vgi)
197+
uses: actions/checkout@v7
198+
with:
199+
repository: Query-farm/vgi
200+
ref: ${{ env.VGI_HOSTED_REF }}
201+
path: vgi-upstream
202+
token: ${{ secrets.GITHUB_TOKEN }}
203+
sparse-checkout: test/hosted
204+
205+
- name: Install uv
206+
uses: astral-sh/setup-uv@v10.3.3
207+
208+
- name: Set up Python 3.14
209+
run: uv python install 3.14
210+
211+
- name: Install dependencies
212+
run: uv sync --all-extras --python 3.14
213+
214+
- name: Run the hosted-mode harness
215+
run: VGI_DIR=vgi-upstream scripts/hosted_conformance.sh --log-dir hosted-conformance-logs
216+
217+
- name: Upload worker logs
218+
if: failure()
219+
uses: actions/upload-artifact@v7
220+
with:
221+
name: hosted-conformance-logs
222+
path: hosted-conformance-logs
223+
184224
bare-install:
185225
# Every other job syncs --all-extras, which hides a core-dependency gap: a
186226
# worker that installs vgi-python with no extras must still import the

‎scripts/hosted_conformance.sh‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/usr/bin/env bash
2+
# Copyright 2025, 2026 Query Farm LLC - https://query.farm
3+
#
4+
# Run the SDK-neutral Orchard hosted-mode conformance harness (the vgi repo's
5+
# test/hosted/run_hosted_conformance.py, see its README) against this repo's
6+
# hosted fixture worker, vgi._test_fixtures.orchard_hosted:OrchardHostedWorker.
7+
#
8+
# Usage: VGI_DIR=<vgi checkout> scripts/hosted_conformance.sh [harness flags...]
9+
# VGI_DIR defaults to ../vgi. Extra flags go to the harness (e.g. --slow,
10+
# --streaming-body, --only 'jwks.*'). Runs from the project env
11+
# (`uv sync --all-extras`), which has the client, joserfc and cryptography.
12+
#
13+
# No stdio --refuse-cmd: Worker.main refuses --unix and --tcp in hosted mode
14+
# but still serves stdio (see the harness README).
15+
set -euo pipefail
16+
17+
cd "$(dirname "$0")/.."
18+
19+
VGI_DIR="${VGI_DIR:-../vgi}"
20+
HARNESS="$VGI_DIR/test/hosted/run_hosted_conformance.py"
21+
if [ ! -f "$HARNESS" ]; then
22+
echo "no harness at $HARNESS: set VGI_DIR to a vgi checkout that has test/hosted/" >&2
23+
exit 2
24+
fi
25+
26+
PY="$(uv run --no-sync python -c 'import sys; print(sys.executable)')"
27+
WORKER="$(printf '%q' "$PY") -m vgi.serve vgi._test_fixtures.orchard_hosted:OrchardHostedWorker"
28+
FIXTURE="$(printf '%q' "$PY") -m vgi._test_fixtures.orchard_hosted"
29+
30+
exec "$PY" "$HARNESS" \
31+
--worker-cwd "$PWD" \
32+
--worker-cmd "$WORKER --http --host 127.0.0.1 --port 0 --debug" \
33+
--refuse-cmd "$FIXTURE --unix /tmp/vgi-hosted-refuse-{port}.sock" \
34+
--refuse-cmd "$FIXTURE --tcp 127.0.0.1:{port}" \
35+
--refuse-cmd "$WORKER --iroh-raw-upstream 0" \
36+
"$@"

0 commit comments

Comments
 (0)