From 81ad2488fc53a648080f4ef77be529e6e2524804 Mon Sep 17 00:00:00 2001 From: Brandon Cook Date: Sat, 6 Jun 2026 17:11:35 +1000 Subject: [PATCH 1/3] ci: adopt shellcade-kit v2.2.0; add the wasm-rust author-journey gate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bump the pinned toolchain to the first --rust-capable release (version + linux/amd64 sha from its checksums.txt). New wasm-rust job mirroring the Go journey: scaffold with the pinned binary (new --rust), point the scaffold's crate dep at the PR's checkout (the cargo equivalent of go mod edit -replace), release-profile build, real shellcade-kit check. This is the guard that catches scaffolder/crate drift at PR time — the class of escape the v2.0.2 scaffolder bug proved possible. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/ci.yml | 42 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d782722..665295f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,8 +12,8 @@ on: # to this repo's matching release. Bump the version AND the linux/amd64 sha # (from that release's checksums.txt) together when adopting a new toolchain. env: - SHELLCADE_KIT_VERSION: "2.0.2" - SHELLCADE_KIT_SHA256: "11f39b4cb9a3a9ec7c9e2819ac9322a426b3ac5ab2b9dd2497795ed65bbb8c31" + SHELLCADE_KIT_VERSION: "2.2.0" + SHELLCADE_KIT_SHA256: "eab71d43085ce894a0075af0c3af71c9e23c8f3150cc50e46d0df3668742eff7" jobs: test: @@ -74,6 +74,44 @@ jobs: ls -la cigame.wasm shellcade-kit check cigame.wasm + # Rust author journey: the Rust mirror of the wasm job above — scaffold with + # the pinned shellcade-kit (`new --rust`), point the scaffold's crate dep at + # the PR's checkout (the cargo equivalent of `go mod edit -replace`), build + # the release artifact, and run the arcade's acceptance check on it. This is + # the gate that catches scaffolder/crate drift at PR time. + wasm-rust: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: { path: kit } + - uses: dtolnay/rust-toolchain@stable + with: { targets: wasm32-wasip1 } + - name: fetch pinned shellcade-kit (sha256-verified) + run: | + set -euo pipefail + ver="${SHELLCADE_KIT_VERSION}" + asset="shellcade-kit_${ver}_linux_amd64.tar.gz" + base="https://github.com/shellcade/kit/releases/download/v${ver}" + curl -fsSL -o "${asset}" "${base}/${asset}" + echo "${SHELLCADE_KIT_SHA256} ${asset}" | sha256sum -c - + curl -fsSL -o checksums.txt "${base}/checksums.txt" + grep " ${asset}\$" checksums.txt | sha256sum -c - + tar -xzf "${asset}" shellcade-kit + sudo install shellcade-kit /usr/local/bin/shellcade-kit + shellcade-kit version + - name: scaffold a fresh Rust game + run: shellcade-kit new --rust cigame + - name: build against this PR's crate (release profile) and check + run: | + set -euo pipefail + cd cigame + # The scaffold pins a released kit tag; point it at the PR's checkout + # so the gate exercises THIS repo's crate. + sed -i 's|^shellcade-kit = .*|shellcade-kit = { path = "../kit/rust" }|' Cargo.toml + cargo build --release --target wasm32-wasip1 + ls -la target/wasm32-wasip1/release/cigame.wasm + shellcade-kit check target/wasm32-wasip1/release/cigame.wasm + # Rust SDK: the shellcade-kit crate (rust/) and its golden-vector harness # (crossverify/). Gates: unit tests, byte-identity with the Go reference # encoder, a wasm32-wasip1 release build smoke of the crate, and the From e16ae84f8191fe506ba839ec00f895c198c07266 Mon Sep 17 00:00:00 2001 From: Brandon Cook Date: Sat, 6 Jun 2026 17:12:27 +1000 Subject: [PATCH 2/3] =?UTF-8?q?DELIBERATE=20BREAK:=20rename=20Room::set=5F?= =?UTF-8?q?input=5Fcontext=20(gate=20sanity=20check=20=E2=80=94=20will=20b?= =?UTF-8?q?e=20reverted)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rust/src/room.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/src/room.rs b/rust/src/room.rs index 02ba1af..0b45039 100644 --- a/rust/src/room.rs +++ b/rust/src/room.rs @@ -98,7 +98,7 @@ impl Room { /// Select how subsequent input resolves (Nav/Command/Text). Host-side /// state: survives hibernation; do not re-issue on resume. - pub fn set_input_context(&mut self, ctx: InputContext) { + pub fn set_input_context_BROKEN(&mut self, ctx: InputContext) { host::host_set_input_context(ctx as i64); } From bf9241244fae58faf24230fa2eb3425e9ca65be8 Mon Sep 17 00:00:00 2001 From: Brandon Cook Date: Sat, 6 Jun 2026 17:14:29 +1000 Subject: [PATCH 3/3] =?UTF-8?q?Revert=20"DELIBERATE=20BREAK:=20rename=20Ro?= =?UTF-8?q?om::set=5Finput=5Fcontext=20(gate=20sanity=20check=20=E2=80=94?= =?UTF-8?q?=20will=20be=20reverted)"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit e16ae84f8191fe506ba839ec00f895c198c07266. --- rust/src/room.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/src/room.rs b/rust/src/room.rs index 0b45039..02ba1af 100644 --- a/rust/src/room.rs +++ b/rust/src/room.rs @@ -98,7 +98,7 @@ impl Room { /// Select how subsequent input resolves (Nav/Command/Text). Host-side /// state: survives hibernation; do not re-issue on resume. - pub fn set_input_context_BROKEN(&mut self, ctx: InputContext) { + pub fn set_input_context(&mut self, ctx: InputContext) { host::host_set_input_context(ctx as i64); }