Skip to content

Commit 361da4f

Browse files
committed
test(spin): move wire checks into Rust fixture harness
1 parent 699cd49 commit 361da4f

12 files changed

Lines changed: 2407 additions & 545 deletions

File tree

‎.github/workflows/test.yml‎

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,11 @@ jobs:
443443
wasmtime --version
444444
445445
- name: Fetch dependencies (locked)
446-
run: cargo fetch --locked
446+
run: |
447+
cargo fetch --locked
448+
if [ "${{ matrix.adapter }}" = spin ]; then
449+
cargo fetch --locked --manifest-path tests/fixtures/reusable-app/Cargo.toml
450+
fi
447451
448452
- name: Run ${{ matrix.adapter }} wasm tests
449453
env:
@@ -482,8 +486,17 @@ jobs:
482486
tar -xzf "$install_dir/$archive" -C "$install_dir"
483487
export PATH="$install_dir:$PATH"
484488
test "$(spin --version | awk '{print $2}')" = "$version"
485-
cargo build --offline --locked -p edgezero-adapter-spin --no-default-features --features spin,test-utils --target wasm32-wasip2 --example outbound-bodyless-wire
486-
python3 crates/edgezero-adapter-spin/tests/outbound_bodyless_wire.py
489+
run="$GITHUB_WORKSPACE/tests/fixtures/reusable-app/.runs/ci-spin-wire"
490+
CARGO_NET_OFFLINE=true ./scripts/smoke_test_reusable_app.sh --adapter spin --suite outbound-wire --output "$run"
491+
jq --slurp --exit-status '
492+
([.[] | select(.event == "spin-wire-inventory")]
493+
| length == 1 and .[0].status == "pass"
494+
and .[0].exchanges == 68 and .[0].origin_requests == 84
495+
and .[0].qualification == false)
496+
and ([.[] | select(.event == "spin-wire-case")]
497+
| length == 68 and ([.[].origin_requests | length] | add) == 84)
498+
and all(.[]; .status != "fail")
499+
' "$run/events.jsonl"
487500
488501
- name: Run Cloudflare outbound runtime unit tests
489502
if: matrix.adapter == 'cloudflare'
@@ -534,11 +547,11 @@ jobs:
534547
and all(.[]; .status != "fail")
535548
' "$run/events.jsonl"
536549
537-
- name: Preserve Fastly lifecycle evidence
538-
if: always() && matrix.adapter == 'fastly'
550+
- name: Preserve provider lifecycle evidence
551+
if: always() && (matrix.adapter == 'fastly' || matrix.adapter == 'spin')
539552
uses: actions/upload-artifact@v4
540553
with:
541-
name: fastly-lifecycle-evidence
554+
name: ${{ matrix.adapter }}-lifecycle-evidence
542555
path: tests/fixtures/reusable-app/.runs/
543556
include-hidden-files: true
544557
if-no-files-found: ignore

‎CHANGELOG.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ their scope when introduced; the current summary supersedes their then-pending A
9494
Run the Spin wire harness in its existing CI job and require the separate Fastly redirect
9595
inventory without weakening the original progress inventory. These tests do not qualify
9696
hosted cancellation, successful optimizer transformation or resource guarantees.
97+
- Run the Spin host wire fixture in the existing Rust harness and remove the Python runner.
98+
Preserve all 68 redirect exchanges, 84 correlated origin requests and existing raw-framing
99+
and lifecycle controls. Reuse bounded HTTP capture, file-backed runtime logs and process-group
100+
teardown; reject late worker failures and unexpected runtime exits before publishing success.
101+
Keep one runner and no compatibility wrapper or additional host-language dependency.
97102

98103
### Main Integration
99104

‎crates/edgezero-adapter-spin/tests/outbound_bodyless_wire.py‎

Lines changed: 0 additions & 479 deletions
This file was deleted.

‎docs/superpowers/plans/2026-10-18-trusted-server-outbound-implementation.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,15 @@ freeze an exact candidate. The normative requirements and approved Interfaces ar
237237

238238
### Current Work Queue and Gates
239239

240+
The Spin host wire suite now uses the existing Rust fixture harness's explicit
241+
`--adapter spin --suite outbound-wire` entrypoint. The former Python runner is removed, without
242+
compatibility wrappers or another process supervisor.
243+
The unchanged guest retains 68 exchanges/84 correlated requests, raw framing and scope/handoff
244+
assertions. Colocated Rust tests cover capture boundaries, duplicate fields, exact bytes, late
245+
worker failures and process-group shutdown. The existing Spin CI job executes the shared harness
246+
and checks its complete inventory. This tooling migration does not change production outbound
247+
behavior, frozen requirements, provider capabilities or qualification status.
248+
240249
1. **G1/Q3 acceptance binding:** replace planned placeholder commands with actual, nonzero
241250
sentinels and environment-specific assertions/artifacts as each owning task lands. Reconcile
242251
applicability/approval records separately; mark a leg `ready` only when its complete declared

‎tests/fixtures/reusable-app/README.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,18 @@ converters to make a provider check appear supported. Build/startup failures rem
840840
failures; tools or runtime evidence the runner explicitly marks unsupported or
841841
unverified remain exit 2.
842842

843+
The adapter's local Spin wire controls run in the existing Rust harness, using the unchanged
844+
guest and pinned Spin. The runner builds and stages that guest; there is no separate host-language
845+
runner or alternate outbound client:
846+
847+
```sh
848+
cargo test --offline --locked --manifest-path tests/fixtures/reusable-app/Cargo.toml -p fixture-harness
849+
./scripts/smoke_test_reusable_app.sh --adapter spin --suite outbound-wire
850+
```
851+
852+
These controls preserve raw request framing, scope/handoff checks and 68 redirect exchanges
853+
with 84 correlated origin requests. They establish local SDK behavior, not hosted qualification.
854+
843855
Cloudflare and Spin may select different guests during overlap or recovery tests;
844856
those observations are unverified. A success requires the same instance and the
845857
specific injected failure. Overlap checks use each request's `before.inflight`

0 commit comments

Comments
 (0)