Repository navigation
cardkit-server: GameDescriptor.bot() takes the lobby config - #21
Merged
Merged
Conversation
Found while writing euchre's descriptor: EuchreBot(benny: Boolean) needs to know whether the Benny joker house rule is on, and bot() had no way to tell it. A bot built for the wrong ruleset does not fail loudly — it misplays, which is the worst kind of wrong for something that covers a disconnected player's hand. The room builds its bot from the config it was created with. Only the timeouts can change afterwards (RoomCommand.Configure), never the house rules, so the bot cannot go stale. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019EH6XkA2oEhv4YnMXt8hbJ Signed-off-by: rotund_tapir <rotund_tapir@protonmail.com>
rotundtapir
commented
Jul 29, 2026
rotundtapir
left a comment
Owner
Author
There was a problem hiding this comment.
Reviewed: right fix at the cheap moment (module is hours old, consumers still in-flight — same logic as the firstSeedWhere rename). Bot built from the room's creation config is correct since RoomCommand.Configure can only touch timeouts, and a restored room reconstructs from its snapshot's config, so the bot can't go stale there either. Single commit authored/pushed by rotundtapir. Merging on green; 500's descriptor picks up the one-line signature in #36 or its follow-up, author's sequencing choice.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A gap in the seam, found while writing euchre's descriptor:
EuchreBot(benny: Boolean)needs to know whether the Benny joker house rule is on, andbot()had no way to tell it. A bot built for the wrong ruleset does not fail loudly — it misplays, which is the worst kind of wrong for something that covers a disconnected player's hand.bot(config: C)closes it. The room builds the bot from the config it was created with; only the timeouts can change afterwards (RoomCommand.Configure), never the house rules, so the bot cannot go stale.Small API change with one call site per game — 500's is a single line, updated in 500#36.
🤖 Generated with Claude Code
https://claude.ai/code/session_019EH6XkA2oEhv4YnMXt8hbJ