Skip to content

0.16.0

Choose a tag to compare

@github-actions github-actions released this 07 Nov 00:20

Release 0.16.0

Summary

  • Lobby sessions: Sessions are now stored in SQLite as hashed tokens, so restarts and deploys no longer log everyone out. Expiry slides: 30 idle days for accounts, 7 for guests, with a 90-day cap.
  • Rooms: Waiting rooms stay open while anyone is in them. A lost connection holds the seat for 5 minutes, and the room page reconnects on its own with backoff.
  • Security: Guest login is rate-limited per client IP. The engine and the wire now accept only strict integer tile ids, kan actions must name their kan type, and malformed action data raises a game error instead of a raw validation error.
  • Rules: A closed kan now prevents the Four Winds abort, and a further kan reveals an earlier kan's deferred dora.
  • Performance: Waits, tenpai and riichi discards are computed from native shanten masks. Each draw makes fewer state copies and skips wall re-validation, ron checks run once per discard, a broadcast is encoded once for all recipients (or not at all when nobody receives it), and each connection uses one send-deadline timer. Below-level log calls are dropped cheaply, and finished replays are encoded off the event loop.
  • Tooling: make profile-games now reports game server CPU per message and the garbage-collection share of CPU. Deploys use an SSH key file.

Features

  • feat: a further kan reveals the earlier kan's deferred dora (d6bef4c)
  • feat: a closed kan prevents the Four Winds abort (bb08cca)
  • feat: rate-limit guest login per client IP (4f45ceb)
  • feat: slide session expiry with idle timeout and 90-day cap (b9f2ca6)
  • feat: persist lobby sessions in SQLite with hashed tokens (90eaf12)

Bug Fixes

  • bug: validate engine action tile ids and require a kan type (ecb4578)
  • bug: raise InvalidGameActionError for malformed action data (7e0d512)
  • bug: accept only real ints as wire tile ids (80142b8)
  • bug: encode finished replays off the event loop (806434a)
  • bug: keep waiting rooms open and hold seats through lost connections (71876a8)

Maintenance

  • chore: say the chi check mirrors the kuikae rule itself (2e294f8)
  • chore: skip encoding a broadcast nobody will receive !perf (1552f9b)
  • chore: track the send deadline with one timer per connection !perf (a892219)
  • chore: skip the trial player in chi checks and unneeded discard checks !perf (211e438)
  • chore: encode a broadcast once when every recipient gets the same !perf (1bbab51)
  • chore: draw from the wall without re-running its validators !perf (b13ab4b)
  • chore: copy the state three times per draw instead of six !perf (f6c1c2d)
  • chore: drop a stale is_tempai docstring line, space a tenpai loop (36ecc20)
  • chore: check tile ownership with one set comparison !perf (d480b30)
  • chore: keep the wait id on the game runtime, not the frozen state !perf (3e0f6e4)
  • chore: check each discard's completing seats once !perf (cb2dd8a)
  • chore: compute waits, tenpai and riichi discards from native masks !perf (c792ec9)
  • chore: keep the below-level logging test independent of LOG_LEVEL (d0d24e5)
  • chore: drop below-level log calls before merging context !perf (cd5a883)
  • chore: pin strict tile ids in the second chi sequence slot too (4fbded0)
  • chore: limit the GC timer's profile cross-check to the main thread (7c5845a)
  • chore: name only the possible later-kan case in the kan dora note (334a85c)
  • chore: drop a stale rate-limit comment, tidy two lists, cite karaten (a8c7025)
  • chore: say GC samples show under the GC timer, archive its readout (e017400)
  • chore: report the profiled game server's GC share of CPU (6867ac2)
  • chore: report game server CPU per handled and outbound message (2c69719)
  • chore: pin idle timeouts, guest renewal and the expiry guard in tests (7d30535)
  • chore: note that guest login to an account frees the guest's name (5f6c70f)
  • chore: deploy over SSH with a key file, default id_ed25519 (344b39c)
  • chore: bump version to 0.16.0 (39697a3)

Stats

  • Code changes (lock files and SVG assets excluded): 93 files changed, 2064 insertions(+), 951 deletions(-)