From 0f79f28ccb2349fbb96de79926af21061e25dc48 Mon Sep 17 00:00:00 2001 From: Quintine <15965533+Quintine@users.noreply.github.com> Date: Mon, 21 Sep 2026 16:45:20 +1000 Subject: [PATCH] Complete forced Harkonnen returns with private saved inspection Automatically return the full combined hand when it is the only legal special-Karama return. Preserve real choices and restore the suspended response or auction payment through the same settlement. Record the actual blind draw as owner-only historical card faces, with a bound integrity receipt; legacy forced saves describe held-card history truthfully. Add readable private history and enlarged inspectors. Both manual and forced returns publish only a faction/action completion tag. Wake idle legacy exchanges through production recovery without writes for real choices. Keep provisional auction funding rules and release gates. Validation: types, lint, 5150 offline tests, build and 49 HTTP tests passed. Independent review resolved history substitution and root review completed idle recovery wiring. New tests cover 1-4 forced draws, real choices, overlays, exact saved history, immutable rejection, all four legal AI paths, production competing actions/recovery, private views and custody. One genuine Advanced four-player sample completed 158 actions with 4 JSON restores and no rejected action; no difficulty tuning. Browser QA QUTHVPTT used genuine Advanced setup and conserved Bidding positions. The actual power returned four cards without a prompt; private history/enlargement and exact refresh worked. Phone panel fit without horizontal overflow with 44px inspector controls. Screenshot capture timed out; complete visual acceptance and transient notice capture remain open. Preserved every prior row across all ten tables, including 1586 rooms and 3354 seats. New QA/integration records bring totals to 1626 rooms and 3442 seats. No reset, restart or automation. --- README.md | 4 + components/game-table.tsx | 2 + components/harkonnen-exchange-inspection.tsx | 31 ++ db/rooms.ts | 1 + docs/CURRENT_STATUS.md | 30 +- docs/HARKONNEN_EXCHANGE.md | 74 ++++ docs/IMPLEMENTATION_STATUS.md | 9 + docs/RULE_DECISIONS.md | 1 + game/engine.ts | 167 +++++++-- game/reference.ts | 1 + tests/automatic-responses.test.ts | 4 +- tests/autopilot.test.ts | 8 + tests/distrans-engine-review.test.ts | 5 + tests/harkonnen-exchange-automatic.test.ts | 322 ++++++++++++++++++ tests/harkonnen-exchange-controls.test.tsx | 41 +++ tests/harkonnen-exchange-recovery.test.ts | 142 ++++++++ tests/ix-richese-technology-recovery.test.ts | 39 ++- tests/richese-cancellation.test.ts | 2 + .../truthtrance-discard-continuations.test.ts | 2 + tests/truthtrance-force-engine.test.ts | 10 +- tests/truthtrance.test.ts | 4 + 21 files changed, 847 insertions(+), 52 deletions(-) create mode 100644 components/harkonnen-exchange-inspection.tsx create mode 100644 docs/HARKONNEN_EXCHANGE.md create mode 100644 tests/harkonnen-exchange-automatic.test.ts create mode 100644 tests/harkonnen-exchange-controls.test.tsx create mode 100644 tests/harkonnen-exchange-recovery.test.ts diff --git a/README.md b/README.md index ae8c87d4..f4519f4b 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,10 @@ for activation, background behavior and prototype limits. Bursts summarize older notices while retaining their details in the chronicle; see [completed-action feedback](docs/ACTION_FEEDBACK.md). +In Advanced development games, **Your Harkonnen inspection** preserves the cards +seen during the special-Karama exchange. A return with only one legal selection +completes automatically; see [private exchange history](docs/HARKONNEN_EXCHANGE.md). + ## Verify changes Use the [development guide](docs/DEVELOPMENT.md) for architecture, focused tests diff --git a/components/game-table.tsx b/components/game-table.tsx index 37d7ca2f..6013200e 100644 --- a/components/game-table.tsx +++ b/components/game-table.tsx @@ -90,6 +90,7 @@ import { VictoryProgress } from './victory-progress'; import { tableActionOwner } from '@/game/table-turn'; import { DukeVidal } from './duke-vidal'; import { CardInspector, CardRules } from './card-inspector'; +import { HarkonnenExchangeInspection } from './harkonnen-exchange-inspection'; import { Recruits } from './recruits'; import { ecazTreacheryDefinition } from '@/game/ecaz-cards'; import { ordinaryCardAvailability } from '@/game/card-availability'; @@ -4842,6 +4843,7 @@ export function GameTable({ )} +