Motor-Anfrage traegt tisch (Tischname des Clients)

Schluessel (tisch, hand_id) fuer den Hand-Zustand des Motors: die gameHandId ist
nur je Tisch als eindeutig belegt. tisch = tableName, derselbe Schluessel wie raum
im Laeufer, stabil fuer die Dauer des Tisches, ohne Spielernamen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Marc Mintel
2026-12-05 23:59:07 +01:00
co-authored by Claude Opus 5.5
parent 7cb58ee6e4
commit be548a990e
2 changed files with 9 additions and 0 deletions
+1
View File
@@ -1036,6 +1036,7 @@ class Tisch:
# Hand-Nummer des Clients als Text: gleich in allen Anfragen derselben Hand (Motor: eigene Range je Hand,
# docs/notizen/SPEC-hand-zustand.md); ohne Spielernamen.
"hand_id": None if hand is None else str(hand),
"tisch": self.room, # Tischname des Clients (tableName), stabil je Tisch; Schluessel (tisch, hand_id)
"pot": round((turn.get("totalPot") or 0.0) + (splash or 0.0), 10), "toCall": to_call,
"heroStack": self.chips.get(held_seat),
"minRaiseTo": groessen[0] if groessen else None,
+8
View File
@@ -287,6 +287,14 @@ class HandIdInDerAnfrage(unittest.TestCase):
for q, _, _ in self.anfragen():
self.assertRegex(q["hand_id"], r"^[0-9]+$")
def test_jede_anfrage_traegt_den_tisch(self):
"""Schluessel (tisch, hand_id): der Tischname des Clients (tableName), derselbe Schluessel wie im Laeufer (raum)."""
qs = self.anfragen()
for q, raum, _ in qs:
self.assertIsInstance(q.get("tisch"), str, q)
self.assertEqual(q["tisch"], raum)
self.assertGreater(len({q["tisch"] for q, _, _ in qs}), 1, "die Probe braucht mehrere Tische")
class StackNieRaten(unittest.TestCase):
"""Echte Hand aus archiv/rec-log.log (tests/spielart_spec.py); dem Leser fehlt der Stapel eines Spielers."""