Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/scripts/id-pr-checks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ cargo-check
prod-lines-check
test-unit
test-native-shell
test-rust-examples
test-shard-0
test-shard-1
test-shard-2
Expand All @@ -42,6 +43,7 @@ test-web-unit
test-web-typecheck
roc-test
roc-examples
rust-counter-wasm
crash-gate-sampled
crash-gate-sweep
crash-gate-control
Expand Down
28 changes: 28 additions & 0 deletions .github/test-suite-registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,34 @@
},
"status": "mapped"
},
{
"id": "id.examples.plaza-sdk",
"paths": ["pkgs/id/examples/rust-world/src/**"],
"invocation": "cargo test --manifest-path examples/rust-world/Cargo.toml (test-rust-examples flake check)",
"venue": {
"workflow": ".github/workflows/id-check.yml",
"job_step": "check_each / test-rust-examples",
"state": "active",
"dispatchable": true
},
"status": "mapped",
"related_issues": [7904],
"notes": "plaza-sdk is a standalone crate outside the pkgs/id workspace (own [workspace] table), so workspace test venues never ran its 9 unit tests before #7904."
},
{
"id": "id.examples.rust-counter",
"paths": ["pkgs/id/examples/rust-counter/src/**"],
"invocation": "cargo test --manifest-path examples/rust-counter/Cargo.toml (test-rust-examples flake check); counter.wasm rebuilt from source and sandbox-tested in the rust-counter-wasm flake check",
"venue": {
"workflow": ".github/workflows/id-check.yml",
"job_step": "check_each / test-rust-examples",
"state": "active",
"dispatchable": true
},
"status": "mapped",
"related_issues": [7904],
"notes": "Standalone crate (path dependency on plaza-sdk); its checked-in counter.wasm is loaded by the sandbox conformance tests (src/sandbox.rs), and the rust-counter-wasm check rebuilds the module from source (roc-examples pattern) and runs those tests against the rebuild -- wasm bytes are not reproducible across rustc builds, so no byte gate."
},
{
"id": "id.web.playwright",
"paths": ["pkgs/id/e2e/tests/*.spec.ts"],
Expand Down
32 changes: 32 additions & 0 deletions pkgs/id/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,14 @@
'';
};

# Same pinned toolchain plus the wasm32-unknown-unknown target
# (#7904): rust-toolchain.toml carries no targets, so the stock
# toolchain cannot rebuild examples/rust-counter/counter.wasm;
# the rebuild check below needs this override.
rustToolchainWasm = rustToolchain.override {
targets = [ "wasm32-unknown-unknown" ];
};

# Helper to create a check that runs a just command or direct test
# command, with an optional pre-check step and check-specific tools.
mkCheck = name: justCmd: mkCheckWith { inherit name justCmd; };
Expand Down Expand Up @@ -362,6 +370,30 @@
test = mkCheck "test" "test-sandbox";
test-unit = mkCheck "test-unit" "test-unit";
test-native-shell = mkCheck "test-native-shell" "test-native-shell";
# Rust example guests (#7904): plaza-sdk (examples/rust-world)
# and rust-counter (examples/rust-counter) are standalone
# crates outside the pkgs/id workspace, so no workspace test
# check ever ran their unit tests (9 + 2).
test-rust-examples = mkCheck "test-rust-examples" "test-rust-examples";
# Rebuild the Rust counter guest from source and run the
# sandbox tests against the rebuilt module (#7904) -- the
# roc-examples pattern. Wasm bytes are not reproducible
# across rustc builds or build paths (the producers/code
# sections differ between the rustup and rust-overlay
# builds of the same pinned 1.99.0), so a byte drift gate
# would be permanently red; what CI must prove is that the
# module built from current source passes the conformance
# tests that load it (src/sandbox.rs include_bytes!).
rust-counter-wasm = mkCheckWith {
name = "rust-counter-wasm";
beforeCheck = ''
export PATH="${rustToolchainWasm}/bin:$PATH"
bash examples/rust-counter/build.sh
'';
checkCommand = ''
cargo test --no-default-features --features sandbox,world --lib sandbox
'';
};
test-int = mkCheck "test-int" "test-int-sandbox";
# PR-gate shards of the integration suite (#869): the four
# shards together run every target test-sandbox runs, in
Expand Down
23 changes: 20 additions & 3 deletions pkgs/id/just-recipes.json
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@
"windows_shell": null,
"working_directory": null
},
"source": "/home/user/git/fleet/6592/root.just",
"source": "/home/user/git/fleet/14257-7904-rust-sdk-venue/root.just",
"unexports": [],
"warnings": []
}
Expand Down Expand Up @@ -1468,6 +1468,7 @@
{ "arguments": [], "recipe": "web-lint", "star": null },
{ "arguments": [], "recipe": "test-sandbox", "star": null },
{ "arguments": [], "recipe": "test-native-shell", "star": null },
{ "arguments": [], "recipe": "test-rust-examples", "star": null },
{ "arguments": [], "recipe": "test-web-unit", "star": null },
{ "arguments": [], "recipe": "test-web-typecheck", "star": null },
{ "arguments": [], "recipe": "roc-test", "star": null },
Expand All @@ -1478,7 +1479,7 @@
"doc": "CI-safe checks (read-only, no modifications) [bun]",
"name": "ci",
"parameters": [],
"priors": 14,
"priors": 15,
"private": false,
"quiet": false,
"namepath": "ci",
Expand Down Expand Up @@ -2740,6 +2741,22 @@
"namepath": "test-rust",
"shebang": false
},
"test-rust-examples": {
"attributes": [{ "group": "test" }],
"body": [
["cargo test --manifest-path examples/rust-world/Cargo.toml"],
["cargo test --manifest-path examples/rust-counter/Cargo.toml"]
],
"dependencies": [],
"doc": "Run the Rust example-guest unit tests (#7904): plaza-sdk (examples/rust-world, 9 tests) and rust-counter (examples/rust-counter, 2 tests) are standalone crates outside the pkgs/id workspace, so the workspace test recipes never run them.",
"name": "test-rust-examples",
"parameters": [],
"priors": 0,
"private": false,
"quiet": false,
"namepath": "test-rust-examples",
"shebang": false
},
"test-sandbox": {
"attributes": [{ "group": "test" }],
"body": [["cargo nextest run --all-features -E 'not test(serve_tests)'"]],
Expand Down Expand Up @@ -3339,7 +3356,7 @@
"windows_shell": null,
"working_directory": null
},
"source": "/home/user/git/fleet/14371-6378-nextest/pkgs/id/justfile",
"source": "/home/user/git/fleet/14257-7904-rust-sdk-venue/pkgs/id/justfile",
"unexports": [],
"warnings": []
}
8 changes: 7 additions & 1 deletion pkgs/id/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ alias check-all := check

# CI-safe checks (read-only, no modifications) [bun]
[group('check')]
ci: cargo-fmt-check web-fmt-check cargo-check clippy-lint clippy-native-shell web-lint test-sandbox test-native-shell test-web-unit test-web-typecheck roc-test doc build release
ci: cargo-fmt-check web-fmt-check cargo-check clippy-lint clippy-native-shell web-lint test-sandbox test-native-shell test-rust-examples test-web-unit test-web-typecheck roc-test doc build release
@echo "✓ CI checks passed!"

# Auto-fix formatting and lint issues
Expand Down Expand Up @@ -299,6 +299,12 @@ alias test-lib := test-unit
test-native-shell:
cargo nextest run -p id-native-shell

# Run the Rust example-guest unit tests (#7904): plaza-sdk (examples/rust-world, 9 tests) and rust-counter (examples/rust-counter, 2 tests) are standalone crates outside the pkgs/id workspace, so the workspace test recipes never run them.
[group('test')]
test-rust-examples:
cargo test --manifest-path examples/rust-world/Cargo.toml
cargo test --manifest-path examples/rust-counter/Cargo.toml

# Run the F11.8 benchmark harness (issue #539): journal append+fsync, checkpoint compaction, guest replay, session fan-out
bench *args:
cargo bench --bench world_bench -- {{ args }}
Expand Down
Loading