Skip to content

Commit ea16f68

Browse files
committed
test: complete Wasmtime parity validation
1 parent 2068517 commit ea16f68

314 files changed

Lines changed: 40403 additions & 12831 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci-nightly.yml

Lines changed: 88 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,90 @@ jobs:
4444
AGENTOS_V8_BRIDGE_PREBUILT_DIR: ${{ github.workspace }}/tests/xfstests/.cache/v8-bridge
4545
CARGO_TARGET_DIR: ${{ github.workspace }}/tests/xfstests/.cache/cargo-target
4646
CARGO_BUILD_JOBS: '1'
47+
- name: Run the full parallel ENOSPC race
48+
if: matrix.storage_backend == 'chunked_local'
49+
run: |
50+
cargo test --release -p agentos-native-sidecar \
51+
--test xfstests_correctness \
52+
xfstests_wasi_parallel_enospc_endurance_probe -- \
53+
--ignored --exact --nocapture --test-threads=1
54+
env:
55+
AGENTOS_TEST_WASM_BACKEND: ${{ matrix.wasm_backend }}
56+
XFSTESTS_ROOT: ${{ github.workspace }}/tests/xfstests/.work/xfstests
57+
XFSTESTS_TEST_TIMEOUT_SECONDS: '3600'
58+
AGENTOS_V8_BRIDGE_PREBUILT_DIR: ${{ github.workspace }}/tests/xfstests/.cache/v8-bridge
59+
CARGO_TARGET_DIR: ${{ github.workspace }}/tests/xfstests/.cache/cargo-target
60+
CARGO_BUILD_JOBS: '1'
61+
- name: Run the full insert-range reproduction workload
62+
if: matrix.storage_backend == 'chunked_local'
63+
run: |
64+
cargo test --release -p agentos-native-sidecar \
65+
--test xfstests_correctness \
66+
xfstests_wasi_insert_range_endurance_probe -- \
67+
--ignored --exact --nocapture --test-threads=1
68+
env:
69+
AGENTOS_TEST_WASM_BACKEND: ${{ matrix.wasm_backend }}
70+
XFSTESTS_ROOT: ${{ github.workspace }}/tests/xfstests/.work/xfstests
71+
XFSTESTS_TEST_TIMEOUT_SECONDS: '3600'
72+
AGENTOS_V8_BRIDGE_PREBUILT_DIR: ${{ github.workspace }}/tests/xfstests/.cache/v8-bridge
73+
CARGO_TARGET_DIR: ${{ github.workspace }}/tests/xfstests/.cache/cargo-target
74+
CARGO_BUILD_JOBS: '1'
75+
- name: Run the full 10,000-file rewinddir workload
76+
if: matrix.storage_backend == 'chunked_local'
77+
run: |
78+
cargo test --release -p agentos-native-sidecar \
79+
--test xfstests_correctness \
80+
xfstests_wasi_rewinddir_endurance_probe -- \
81+
--ignored --exact --nocapture --test-threads=1
82+
env:
83+
AGENTOS_TEST_WASM_BACKEND: ${{ matrix.wasm_backend }}
84+
XFSTESTS_ROOT: ${{ github.workspace }}/tests/xfstests/.work/xfstests
85+
XFSTESTS_TEST_TIMEOUT_SECONDS: '3600'
86+
AGENTOS_V8_BRIDGE_PREBUILT_DIR: ${{ github.workspace }}/tests/xfstests/.cache/v8-bridge
87+
CARGO_TARGET_DIR: ${{ github.workspace }}/tests/xfstests/.cache/cargo-target
88+
CARGO_BUILD_JOBS: '1'
89+
- name: Run the full 10,000-file open-unlink workload
90+
if: matrix.storage_backend == 'chunked_local'
91+
run: |
92+
cargo test --release -p agentos-native-sidecar \
93+
--test xfstests_correctness \
94+
xfstests_wasi_open_unlink_endurance_probe -- \
95+
--ignored --exact --nocapture --test-threads=1
96+
env:
97+
AGENTOS_TEST_WASM_BACKEND: ${{ matrix.wasm_backend }}
98+
XFSTESTS_ROOT: ${{ github.workspace }}/tests/xfstests/.work/xfstests
99+
XFSTESTS_TEST_TIMEOUT_SECONDS: '3600'
100+
AGENTOS_V8_BRIDGE_PREBUILT_DIR: ${{ github.workspace }}/tests/xfstests/.cache/v8-bridge
101+
CARGO_TARGET_DIR: ${{ github.workspace }}/tests/xfstests/.cache/cargo-target
102+
CARGO_BUILD_JOBS: '1'
103+
- name: Run the full 4,000-file seekdir/getdents workload
104+
if: matrix.storage_backend == 'chunked_local'
105+
run: |
106+
cargo test --release -p agentos-native-sidecar \
107+
--test xfstests_correctness \
108+
xfstests_wasi_seekdir_endurance_probe -- \
109+
--ignored --exact --nocapture --test-threads=1
110+
env:
111+
AGENTOS_TEST_WASM_BACKEND: ${{ matrix.wasm_backend }}
112+
XFSTESTS_ROOT: ${{ github.workspace }}/tests/xfstests/.work/xfstests
113+
XFSTESTS_TEST_TIMEOUT_SECONDS: '3600'
114+
AGENTOS_V8_BRIDGE_PREBUILT_DIR: ${{ github.workspace }}/tests/xfstests/.cache/v8-bridge
115+
CARGO_TARGET_DIR: ${{ github.workspace }}/tests/xfstests/.cache/cargo-target
116+
CARGO_BUILD_JOBS: '1'
117+
- name: Run the full 5,000-file readdir/rename workload
118+
if: matrix.storage_backend == 'chunked_local'
119+
run: |
120+
cargo test --release -p agentos-native-sidecar \
121+
--test xfstests_correctness \
122+
xfstests_wasi_readdir_rename_endurance_probe -- \
123+
--ignored --exact --nocapture --test-threads=1
124+
env:
125+
AGENTOS_TEST_WASM_BACKEND: ${{ matrix.wasm_backend }}
126+
XFSTESTS_ROOT: ${{ github.workspace }}/tests/xfstests/.work/xfstests
127+
XFSTESTS_TEST_TIMEOUT_SECONDS: '3600'
128+
AGENTOS_V8_BRIDGE_PREBUILT_DIR: ${{ github.workspace }}/tests/xfstests/.cache/v8-bridge
129+
CARGO_TARGET_DIR: ${{ github.workspace }}/tests/xfstests/.cache/cargo-target
130+
CARGO_BUILD_JOBS: '1'
47131
- uses: actions/upload-artifact@v4
48132
if: always()
49133
with:
@@ -58,6 +142,7 @@ jobs:
58142
# Cargo validation and the shared sidecar build are explicit below.
59143
# Do not let TypeScript dependency builds compile a second Rust copy.
60144
AGENTOS_SKIP_NATIVE_META_BUILD: '1'
145+
XFSTESTS_ROOT: ${{ github.workspace }}/tests/xfstests/.work/xfstests
61146
steps:
62147
- uses: actions/checkout@v4
63148
- uses: pnpm/action-setup@v4
@@ -87,10 +172,12 @@ jobs:
87172
- run: pnpm install --frozen-lockfile
88173
- run: node --test scripts/generate-secure-exec-mirror.test.mjs
89174
- run: make -C toolchain commands
90-
- run: make -C toolchain cmd/duckdb
175+
- run: make -C toolchain cmd/duckdb cmd/vim
91176
- run: make -C toolchain codex
92177
- run: make -C toolchain/c pthread-conformance-wasm pthread-benchmark-wasm
93178
- run: node packages/runtime-core/scripts/copy-wasm-commands.mjs --require
179+
- name: Stage pinned xfstests and its WASM helper corpus
180+
run: make -C tests/xfstests helpers XFSTESTS_BUILD_NATIVE_COMMANDS=0
94181
- name: Use stable Rust for repository validation
95182
run: echo "RUSTUP_TOOLCHAIN=stable" >> "$GITHUB_ENV"
96183
# Browser support is retained in-tree but disabled during the unified

.github/workflows/ci.yml

Lines changed: 54 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
--filter='!@agentos-software/codex' \
5151
--filter='!@rivet-dev/agentos-browser' \
5252
--filter='!@rivet-dev/agentos-runtime-browser' \
53+
--filter='!@rivet-dev/agentos-example-browser-terminal' \
5354
--filter='!@rivet-dev/agentos-playground'
5455
else
5556
npx turbo build \
@@ -58,6 +59,7 @@ jobs:
5859
--filter='!@agentos-software/codex' \
5960
--filter='!@rivet-dev/agentos-browser' \
6061
--filter='!@rivet-dev/agentos-runtime-browser' \
62+
--filter='!@rivet-dev/agentos-example-browser-terminal' \
6163
--filter='!@rivet-dev/agentos-playground'
6264
fi
6365
# The Codex adapter is ordinary TypeScript, while its executable is a
@@ -74,6 +76,7 @@ jobs:
7476
- run: node scripts/verify-fixed-versions.mjs
7577
- run: node --test scripts/check-layout.test.mjs
7678
- run: pnpm check-layout
79+
- run: node --test website/scripts/gen-registry.test.mjs
7780
- run: node --test scripts/generate-secure-exec-mirror.test.mjs
7881
- run: node --test scripts/check-rustfmt.test.mjs
7982
- run: node scripts/check-rustfmt.mjs
@@ -123,24 +126,47 @@ jobs:
123126
workspaces: toolchain -> target
124127
key: wasm-commands-${{ hashFiles('toolchain/Cargo.lock') }}
125128
- run: pnpm install --frozen-lockfile --filter '@rivet-dev/agentos-runtime-core...'
126-
- run: make -C toolchain commands
129+
- name: Build the bounded PR command corpus
130+
if: github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'aggregate-ci')
131+
run: make -C toolchain pr-commands
132+
- name: Build the complete command corpus
133+
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'aggregate-ci')
134+
run: make -C toolchain commands
127135
# DuckDB and Vim are intentionally outside the default command set because
128136
# they are heavy builds, but the runtime/parity suites require their real
129137
# command artifacts.
130138
- name: Build required heavy integration commands
139+
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'aggregate-ci')
131140
run: make -C toolchain cmd/duckdb cmd/vim
141+
- name: Build the pinned Codex WASI artifacts required by the software suite
142+
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'aggregate-ci')
143+
run: make -C toolchain codex-required
132144
- name: Build mandatory threaded-WASM conformance fixtures
145+
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'aggregate-ci')
133146
run: make -C toolchain/c pthread-conformance-wasm pthread-benchmark-wasm
134147
- name: Stage native/WASM C parity fixtures
148+
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'aggregate-ci')
135149
run: make -C toolchain/c conformance-artifacts
136-
- run: node packages/runtime-core/scripts/copy-wasm-commands.mjs --require
150+
- name: Stage the bounded PR command corpus
151+
if: github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'aggregate-ci')
152+
run: node packages/runtime-core/scripts/copy-wasm-commands.mjs --require-coreutils
153+
- name: Stage the complete command corpus
154+
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'aggregate-ci')
155+
run: node packages/runtime-core/scripts/copy-wasm-commands.mjs --require
137156
- uses: actions/upload-artifact@v4
138157
with:
139158
name: wasm-commands
140159
path: packages/runtime-core/commands
141160
retention-days: 1
142161
if-no-files-found: error
143162
- uses: actions/upload-artifact@v4
163+
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'aggregate-ci')
164+
with:
165+
name: codex-wasi
166+
path: software/codex/wasm
167+
if-no-files-found: error
168+
- uses: actions/upload-artifact@v4
169+
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'aggregate-ci')
144170
with:
145171
name: wasm-thread-fixtures
146172
path: |
@@ -149,6 +175,7 @@ jobs:
149175
toolchain/c/build/exec_variants
150176
if-no-files-found: error
151177
- uses: actions/upload-artifact@v4
178+
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'aggregate-ci')
152179
with:
153180
name: wasm-c-parity-fixtures
154181
path: toolchain/c/build/conformance
@@ -331,7 +358,7 @@ jobs:
331358
required:
332359
name: CI / Required
333360
if: ${{ always() && (github.event_name != 'pull_request' || github.base_ref == 'main' || contains(github.event.pull_request.labels.*.name, 'aggregate-ci')) }}
334-
needs: [checks, wasm-commands, rust, core-pr, runtime-core-pr, actor-pr]
361+
needs: [checks, wasm-commands, rust, core-pr, runtime-core-pr, actor-pr, wasm-backend-matrix]
335362
runs-on: ubuntu-latest
336363
steps:
337364
- name: Require every PR gate
@@ -342,6 +369,8 @@ jobs:
342369
CORE_RESULT: ${{ needs.core-pr.result }}
343370
RUNTIME_CORE_RESULT: ${{ needs.runtime-core-pr.result }}
344371
ACTOR_RESULT: ${{ needs.actor-pr.result }}
372+
WASM_BACKEND_RESULT: ${{ needs.wasm-backend-matrix.result }}
373+
EXPECT_WASM_BACKEND_MATRIX: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'aggregate-ci') }}
345374
run: |
346375
for result in \
347376
"$CHECKS_RESULT" \
@@ -355,6 +384,10 @@ jobs:
355384
exit 1
356385
fi
357386
done
387+
if [ "$EXPECT_WASM_BACKEND_MATRIX" = true ] && [ "$WASM_BACKEND_RESULT" != success ]; then
388+
echo "required dual-backend CI job did not succeed: $WASM_BACKEND_RESULT" >&2
389+
exit 1
390+
fi
358391
359392
wasm-backend-matrix:
360393
name: "WASM backend (${{ matrix.backend }})"
@@ -370,10 +403,11 @@ jobs:
370403
AGENTOS_TEST_WASM_BACKEND: ${{ matrix.backend }}
371404
AGENTOS_E2E_NETWORK: '1'
372405
AGENT_OS_CLIENT_ALLOW_E2E_SKIPS: '0'
373-
AGENTOS_SIDECAR_BIN: ${{ github.workspace }}/target/release/agentos-native-sidecar
406+
AGENTOS_SIDECAR_BIN: ${{ github.workspace }}/target/release/agentos-sidecar
374407
AGENTOS_WASMTIME_WORKER_PATH: ${{ github.workspace }}/target/release/agentos-native-sidecar
375408
AGENTOS_WASM_COMMANDS_DIR: ${{ github.workspace }}/packages/runtime-core/commands
376409
AGENTOS_C_WASM_COMMANDS_DIR: ${{ github.workspace }}/toolchain/c/build/conformance
410+
XFSTESTS_ROOT: ${{ github.workspace }}/tests/xfstests/.work/xfstests
377411
steps:
378412
- uses: actions/checkout@v4
379413
- uses: pnpm/action-setup@v4
@@ -389,6 +423,12 @@ jobs:
389423
with:
390424
name: wasm-commands
391425
path: packages/runtime-core/commands
426+
- uses: actions/download-artifact@v4
427+
with:
428+
name: codex-wasi
429+
path: software/codex/wasm
430+
- name: Restore Codex WASI executable modes
431+
run: chmod 0755 software/codex/wasm/codex software/codex/wasm/codex-exec
392432
- uses: actions/download-artifact@v4
393433
with:
394434
name: wasm-thread-fixtures
@@ -402,17 +442,24 @@ jobs:
402442
mkdir -p toolchain/target/wasm32-wasip1/release/commands
403443
cp -a packages/runtime-core/commands/. toolchain/target/wasm32-wasip1/release/commands/
404444
node packages/runtime-core/scripts/copy-wasm-commands.mjs --require
445+
pnpm --filter @agentos-software/manifest build
446+
pnpm --filter @rivet-dev/agentos-toolchain build
405447
pnpm --filter @agentos-software/coreutils build:runtime
406448
pnpm --filter '@agentos-software/common...' build
449+
- name: Stage pinned xfstests and its WASM helper corpus
450+
run: make -C tests/xfstests helpers XFSTESTS_BUILD_NATIVE_COMMANDS=0
407451
- name: Build the release sidecar and public test clients
408452
run: |
409-
cargo build --release -p agentos-native-sidecar
453+
cargo build --release -p agentos-sidecar -p agentos-native-sidecar
410454
pnpm --filter '@rivet-dev/agentos-runtime-core...' build
411455
pnpm --filter @rivet-dev/agentos-vm-test-harness build
412456
pnpm --filter @rivet-dev/agentos-core build
413457
pnpm --filter @rivet-dev/agentos build
414458
- name: Run all native sidecar tests through the selected VM backend
415459
run: cargo test --release -p agentos-native-sidecar --tests -- --test-threads=1
460+
- name: Run artifact-backed V8-WASM and Wasmtime software parity
461+
if: matrix.backend == 'wasmtime'
462+
run: cargo test --release -p agentos-native-sidecar --test wasm_software_parity -- --ignored --nocapture --test-threads=1
416463
- name: Run owned pthread libc conformance
417464
if: matrix.backend == 'wasmtime'
418465
run: cargo test --release -p agentos-native-sidecar --test wasmtime_safety owned_pthread_libc_mutex_cond_tls_join_detach_and_cancel_conform -- --ignored --exact --nocapture --test-threads=1
@@ -426,6 +473,8 @@ jobs:
426473
run: cargo test -p agentos-client -- --test-threads=1
427474
- name: Run every registry software suite through the selected WASM backend
428475
run: pnpm exec turbo test --concurrency=1 --filter='@agentos-software/*'
476+
- name: Run every registry software nightly suite through the selected WASM backend
477+
run: pnpm exec turbo test:nightly --concurrency=1 --filter='@agentos-software/*'
429478
- name: Run deterministic actor, ACP, and agent-tool conformance
430479
run: pnpm --filter @rivet-dev/agentos test:e2e:run
431480
- name: Run mixed V8-JavaScript and Wasmtime resource-plateau smoke

.github/workflows/publish.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,7 @@ jobs:
398398
--filter='!@rivet-dev/agentos-website' \
399399
--filter='!@rivet-dev/agentos-browser' \
400400
--filter='!@rivet-dev/agentos-runtime-browser' \
401+
--filter='!@rivet-dev/agentos-example-browser-terminal' \
401402
--filter='!@rivet-dev/agentos-playground' \
402403
--filter='!./examples/*' \
403404
--filter='!./examples/quickstart/*'

0 commit comments

Comments
 (0)