diff --git a/.changeset/fix-guest-room-roster.md b/.changeset/fix-guest-room-roster.md deleted file mode 100644 index 53297f2..0000000 --- a/.changeset/fix-guest-room-roster.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"kit": patch ---- - -Fix casino games showing a 0 balance and refusing wagers. The guest runtime built a fresh `room` every callback but created the game's `Handler` (and its stored `Services`) only once at `OnStart`, so `svc.Credits` was permanently bound to the *start* callback's roster. `creditsSvc` resolves a player's host-side index against that roster's `ctx.members`, which is empty for a solo game (the player joins after start) — so every `Balance`/`Wager`/`Settle` was denied at the guest facade (`ErrCreditsDenied`) and never reached the host. The room is now a single persistent instance refreshed in place each callback, so the game's stored `Services` always resolve against the live roster. (The `kittest`/native/memsvc doubles resolve by account id, not roster index, which is why unit tests and conformance did not catch this — it only manifested on the real wasm ABI path.) Casino games must be rebuilt against this release to pick up the fix. diff --git a/CHANGELOG.md b/CHANGELOG.md index b2e0f0b..eaa6854 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # kit +## 2.16.1 + +### Patch Changes + +- 8c904b5: Fix casino games showing a 0 balance and refusing wagers. The guest runtime built a fresh `room` every callback but created the game's `Handler` (and its stored `Services`) only once at `OnStart`, so `svc.Credits` was permanently bound to the _start_ callback's roster. `creditsSvc` resolves a player's host-side index against that roster's `ctx.members`, which is empty for a solo game (the player joins after start) — so every `Balance`/`Wager`/`Settle` was denied at the guest facade (`ErrCreditsDenied`) and never reached the host. The room is now a single persistent instance refreshed in place each callback, so the game's stored `Services` always resolve against the live roster. (The `kittest`/native/memsvc doubles resolve by account id, not roster index, which is why unit tests and conformance did not catch this — it only manifested on the real wasm ABI path.) Casino games must be rebuilt against this release to pick up the fix. + ## 2.16.0 ### Minor Changes diff --git a/package.json b/package.json index bc75197..af1b442 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kit", - "version": "2.16.0", + "version": "2.16.1", "private": true, "description": "Version management for the shellcade gamekit (Go module + CLI). Versions and changelogs are driven by changesets; binaries by GoReleaser.", "scripts": { diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 2bf29d0..839a3a5 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -15,7 +15,7 @@ [package] name = "shellcade-kit" -version = "2.16.0" +version = "2.16.1" edition = "2021" # #[unsafe(no_mangle)] (emitted by shellcade_game! so expansions survive # edition-2024 game crates) stabilized in 1.82.