Added the last missing link test: _collect_tradeable_resources against a real GameMap.
- test_collect_tradeable_resources_classifies_owned_tiles: builds a GameMap with
iron_ore×2 (strategic) + silk (luxury) deposit tiles owned by a player, asserts
_collect_tradeable_resources returns strategics=[iron_ore,iron_ore] (dups kept for
the MIN_COPIES_TO_TRADE surplus rule) + luxuries=[silk]. Proves _serialize_players'
real DataLoader-category tile sourcing. NB: DataLoader maps the "resources" category
to the deposits/ dir — served strategic ids are iron_ore/horses, not "iron".
- before_all loads the theme (category lookups need DataLoader). GUT 749/0.
Full inter-player trade pipeline now GUT-proven link-by-link AND headless-proven live:
real tiles → _collect_tradeable_resources (step 4) → process_trades → ledger →
traded_luxuries/strategics (step 1) → strategic build access (step 3); gold sale →
gold_flow_for → net gold (pre-existing); integration runs every round in a live 25-turn
arena without aborting the loop (step 2). Gold flow no longer inert — process_turn now
populates GameState.trade_ledger_json each round.
Only remaining for done: the deal UI (diplomacy panel + wire trade_agreed). Stays partial.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>