role select scroll log: less robotic phrasing + role code — 'assumes Nth Chair, where SUBJ will start the game as the Role [XC]' — TDD
All checks were successful
ci/woodpecker/push/pyswiss Pipeline was successful
ci/woodpecker/push/main Pipeline was successful

Was 'assumes Nth Chair; SUBJ will start the game as the Role.' Now joins with ', where' and appends the role code in a no-wrap bracket (the Player [PC], the Builder [BC]…), matching the SkyDrive/Sea abbrev treatment. Chair stays capitalised (user-confirmed). 56 drama ITs green; the billscroll FT's 'assumes 1st Chair' assertion still holds.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Disco DeDisco
2026-06-08 23:19:27 -04:00
parent b7f943cd38
commit 97d5522807
2 changed files with 12 additions and 6 deletions

View File

@@ -138,7 +138,13 @@ class GameEvent(models.Model):
except ValueError: except ValueError:
ordinal = "?" ordinal = "?"
subj, _, _ = _actor_pronouns(self.actor) subj, _, _ = _actor_pronouns(self.actor)
return f"assumes {ordinal} Chair; {subj} will start the game as the {role}." # Role code in a no-wrap bracket (e.g. "the Player [PC]"), matching
# the SkyDrive/Sea abbrev treatment; less robotic than the old
# "; SUBJ will…" (user-spec 2026-06-09).
return (
f"assumes {ordinal} Chair, where {subj} will start the game as "
f'the {role} <span style="white-space:nowrap">[{code}]</span>.'
)
if self.verb == self.ROLES_REVEALED: if self.verb == self.ROLES_REVEALED:
return "All roles assigned" return "All roles assigned"
if self.verb == self.SIG_READY: if self.verb == self.SIG_READY:

View File

@@ -67,15 +67,15 @@ class GameEventModelTest(TestCase):
with self.subTest(role=role): with self.subTest(role=role):
event = record(self.room, GameEvent.ROLE_SELECTED, actor=self.user, event = record(self.room, GameEvent.ROLE_SELECTED, actor=self.user,
role=role, role_display="") role=role, role_display="")
self.assertIn(f"assumes {ordinal} Chair", event.to_prose()) self.assertIn(f"assumes {ordinal} Chair, where", event.to_prose())
def test_role_selected_prose_includes_role_name(self): def test_role_selected_prose_includes_role_name_and_code(self):
event = record(self.room, GameEvent.ROLE_SELECTED, actor=self.user, event = record(self.room, GameEvent.ROLE_SELECTED, actor=self.user,
role="PC", role_display="Player") role="PC", role_display="Player")
prose = event.to_prose() prose = event.to_prose()
self.assertIn("Player", prose) # Default user pronouns = pluralism → "they"; role code in a no-wrap bracket.
# Default user pronouns = pluralism → "they". self.assertIn("where they will start the game as ", prose)
self.assertIn("they will start the game", prose) self.assertIn('the Player <span style="white-space:nowrap">[PC]</span>.', prose)
# ── to_prose — SIG_READY ───────────────────────────────────────────── # ── to_prose — SIG_READY ─────────────────────────────────────────────