Show live Treachery and Spice draw-pile counts

Add server-derived physical draw counts above the board after setup begins.
Counts exclude hands, auction pools, faction caches and discards; the client
receives only two numbers, without deck identities or order. Lobby counts are
absent, zero remains explicit and existing refill/custody rules are unchanged.
An internal guide explains pile boundaries, empty/refill behavior, first-turn
worm return and existing authorized inspection. Nexus counts remain separate.

Independent review found no material issue. Six focused cases cover genuine
Basic setup, every viewer, private-field exclusion, JSON/input immutability,
actual auction draws and refill, physical custody, Spice refill with Thumper
annotations excluded, skipped worm return and connected busy/empty/lobby UI.
The initial refill assertion assumed a single card; it was corrected to account
for a legal randomized chain of worms before a territory. The original broad check caught seven view-equality failures in privacy
fixtures that also changed the now-public deck count. Their four test files now
vary hidden allocations/identities at fixed public counts, retain whole-view
assertions and check physical custody. The Sapho fixture now returns its
swapped card rather than losing it. A reviewed CHOAM correction keeps its owner
empty during donor1to2 by staging a hidden discard; the original oracle test
remains intact. All70 affected focused tests pass.

Types, lint, all 4990 offline tests, production build and 49 HTTP tests
passed on stable source. Browser QA reused the existing three-human Basic Nexus
without any game action. Treachery29 and Spice19 matched saved physical arrays;
390px layout fit within339px without internal overflow, with16px body/14px labels.
The internal guide worked by click and Enter, and Back/refresh restored the same
counts. Normal viewport restored and preview retained. Screenshot capture timed
out; full visual, screen-reader,200% text and combined-game acceptance stay open.

All 1499 opening rooms, 3171 seats and auxiliary rows are
unchanged. SQLite integrity and foreign keys pass; isolated HTTP rooms are new.
Healthy server reused without restart, migration, reset or recurring automation.
Full AI refinement remains deferred and no mode/publication gate was opened.

Private evidence: 20260921-deck-status.
Verified source tree: 091be8f49f9b637b9a79da43271cbffdff5cf8c9f653484afa7041c71af88e98
This commit is contained in:
Quintine committed 2026-09-21 11:36:25 +10:00
1 parent 537da4a12c
commit 14a7800fe9
16 files changed
+339 -18

No files matched your search

+2
View File
@@ -24761,6 +24761,8 @@ export function viewGame(state: Game, id: string) {
guildTimingLocked: g.guildTimingLocked ?? false,
ready: g.ready,
spice: g.spice,
// Public physical draw piles only; auction pools and private holdings stay separate.
drawPiles: g.status === 'lobby' ? null : { treachery: g.deck.length, spice: g.spiceDeck.length },
log: g.log,
nexus: g.nexus,
summonedWorm: g.summonedWorm
+24
View File
@@ -204,6 +204,7 @@ export const RULE_TOPICS: RuleTopic[] = [
'setup',
'interactive-introduction',
'storm-cards',
'draw-piles',
'kwisatz-haderach',
'truthtrance-spice',
'ecaz-ambassadors',
@@ -2107,6 +2108,29 @@ export const RULE_TOPICS: RuleTopic[] = [
{ area: 'Verification', status: 'Partial', detail: 'Full-table rendering, JSON continuation, pending-window rejection and SQLite acceptance/withdrawal races are covered. All-configuration and full visual acceptance remain open.', evidence: ['tests/nexus-offer-controls.test.tsx', 'tests/nexus-offer-recovery.test.ts', 'tests/nexus-alliance.test.ts'] },
],
},
{
id: 'draw-piles',
title: 'Cards and draw piles',
category: 'Getting started',
coverage: 'Partial',
developmentStage: 'Prototyped',
summary: 'Read the Treachery and Spice draw counts above the board and distinguish them from cards already elsewhere on the table.',
steps: [
'Once setup begins, the two draw counts show cards currently in the Treachery and Spice draw piles. Everyone sees the same counts. The numbers follow table updates and refresh without a separate game action.',
'Cards in hands, the auction pool, separate faction caches and discard piles are outside these draw counts. The ordinary auction’s remaining count includes its current lot. Nexus Cards retain their separate deck and discard counts in the Nexus panel.',
'Zero means the current draw pile is empty. The existing draw rules may replenish it from eligible discards; the count is not a total of all cards remaining in the game. First-turn worms temporarily set aside rejoin the Spice draw pile when that sequence finishes.',
'A pile count does not reveal card identities or their order. Inspect your own hand, the public Spice discard tops and any private cards an effect permits you to see using their existing card inspectors.',
'Treachery discard contents remain private unless an effect permits inspection. A paid Nullentropy Box search uses its own private controls; the draw counts do not grant additional inspection.',
],
related: ['bidding', 'spice-blow', 'nullentropy-search', 'nexus-cards', 'privacy'],
checklist: [
{ area: 'Implementation', status: 'Implemented', detail: 'Authoritative Treachery and Spice physical draw counts are projected after setup begins, separately from auction, hands and discards.', evidence: ['game/engine.ts'] },
{ area: 'Player controls', status: 'Implemented', detail: 'A read-only display above the board follows live updates and links to this guide.', evidence: ['components/draw-piles.tsx', 'components/game-table.tsx'] },
{ area: 'AI', status: 'Partial', detail: 'Counts add no decision or strategy change. Minimal legal participation remains available; strength tuning waits for feature completion.' },
{ area: 'Documentation', status: 'Implemented', detail: 'Physical pile boundaries, empty/refill behavior and existing inspection permissions are explained.', evidence: ['docs/DRAW_PILES.md'] },
{ area: 'Verification', status: 'Partial', detail: 'Genuine Basic setup, actual auction draws, refill, skipped worms, Thumper exclusion, view privacy, JSON restoration and live component rendering are checked. Complete combined-game and visual acceptance remain open.', evidence: ['tests/draw-piles.test.ts', 'tests/draw-piles-controls.test.tsx'] },
],
},
{
id: 'force-counters',
title: 'Inspect force counters and their locations',