diff --git a/.project/objectives/p3-23-trade-richness-gold-strategic.md b/.project/objectives/p3-23-trade-richness-gold-strategic.md index fe438b72..6db4f10f 100644 --- a/.project/objectives/p3-23-trade-richness-gold-strategic.md +++ b/.project/objectives/p3-23-trade-richness-gold-strategic.md @@ -10,12 +10,24 @@ updated_at: 2026-06-25 ## Summary -Inter-player trade EXISTS but is **luxury-for-luxury swaps only** -(`mc-trade/src/lib.rs:139 evaluate_trades`; AI-driven, relation-gated, can't trade -your last copy). You **cannot trade gold or strategic resources** with opponents, -and the `tribute.rs` path is deferred to Game 2. That makes diplomacy/economy -thinner than the resource model implies (strategic resources gate units and are -tradeable in concept, but no exchange path exists). +> **DISCOVERY (2026-06-25, verify-first):** the original premise was wrong. The +> inter-player trade turn-integration is **DISABLED in the played game**, not +> "luxury-only". `turn_manager.gd:287` has `Diplomacy.process_turn()` commented out +> with a stale "empty stub module" note (diplomacy.gd was rebuilt but never +> re-enabled). The *only* writer of `GameState.trade_ledger_json` is diplomacy.gd:32 +> inside that disabled call, so **no inter-player trades run at all** (luxury, strategic, +> or gold). Worse, the `diplomacy.gd ↔ GdTrade.process_trades` contract has drifted +> in 3 places: (1) `_serialize_players` emits `{index, traded_luxuries, personality}` +> but `process_trades` deserializes `Vec` (`player_index`, +> `tile_luxuries`, `tile_strategics`, `trade_willingness`); (2) `process_trades` +> returns `{ledger}` but diplomacy.gd reads `result["trade_ledger_json"]`, +> `["relation_changes"]`, `["new_trades"]`, `["broken_trades"]`; (3) relations +> advancement isn't returned. So enabling is NOT a one-line uncomment. + +The **simulation logic is complete + cargo-tested** (luxury/strategic swaps + gold +sales in `mc-trade`, 66/0) and the gold-flow application is wired (part A) — but it +is all **inert in-game until the diplomacy turn-integration is revived**. The +`tribute.rs` path stays Game-2 deferred. ## Acceptance @@ -36,12 +48,17 @@ tradeable in concept, but no exchange path exists). `#[serde(default)]`. Wiring follow-up.)* - [~] Logic in Rust (`mc-trade`): gold-for-luxury sale + strategic-for-strategic swap + strategic sale all evaluate + activate (8 cargo tests; mc-trade 66/0). - **In-game application — part A (gold flow) DONE:** `GdTradeLedger.gold_flow_for` - + `GdEconomy` `trade_gold` param + `economy.gd` sourcing → inter-player sales now - hit the treasury (GUT `test_trade_gold_flows_into_net_gold`, seller +/buyer −). - **[ ] Remaining: part B** (strategic-resource gating — FFI sources `tile_strategics`, - `PlayerState.traded_strategics`, unit-gating reads `incoming_strategics`) **+ deal - UI** → status stays `partial`. + **In-game application — part A (gold flow) wired but INERT:** `GdTradeLedger.gold_flow_for` + + `GdEconomy` `trade_gold` param + `economy.gd` sourcing are correct and GUT-tested + (`test_trade_gold_flows_into_net_gold`, seller +/buyer −) — but they read + `GameState.trade_ledger_json`, which is **never populated in-game** (the only writer is + the disabled `Diplomacy.process_turn`). So gold flow works the instant the trade + integration is revived, but produces 0 until then. + **[ ] REAL remaining work — revive the diplomacy trade turn-integration** (see the + DISCOVERY note): reconcile the 3 `diplomacy.gd ↔ process_trades` contract drifts, + re-enable `Diplomacy.process_turn` in `turn_manager.gd` (carefully — disabled modules + there can abort the arena turn loop), add `PlayerState.traded_strategics` + unit-gating, + verify the full pipeline headless + GUT. Then the deal UI. → status stays `partial`. ## Progress (2026-06-25) diff --git a/public/games/age-of-dwarves/data/objectives.json b/public/games/age-of-dwarves/data/objectives.json index ba85242c..80cf7f14 100644 --- a/public/games/age-of-dwarves/data/objectives.json +++ b/public/games/age-of-dwarves/data/objectives.json @@ -1,12 +1,12 @@ { - "generated_at": "2026-06-26T00:12:40Z", + "generated_at": "2026-06-26T00:41:24Z", "totals": { "in_progress": 0, + "oos": 31, + "partial": 2, "done": 295, "stub": 0, - "oos": 31, "missing": 0, - "partial": 2, "total": 328 }, "objectives": [ @@ -3278,7 +3278,7 @@ "scope": "game1", "owner": "warcouncil", "updated_at": "2026-06-25", - "summary": "Inter-player trade EXISTS but is **luxury-for-luxury swaps only**\n(`mc-trade/src/lib.rs:139 evaluate_trades`; AI-driven, relation-gated, can't trade\nyour last copy). You **cannot trade gold or strategic resources** with opponents,\nand the `tribute.rs` path is deferred to Game 2. That makes diplomacy/economy\nthinner than the resource model implies (strategic resources gate units and are\ntradeable in concept, but no exchange path exists)." + "summary": "> **DISCOVERY (2026-06-25, verify-first):** the original premise was wrong. The\n> inter-player trade turn-integration is **DISABLED in the played game**, not\n> \"luxury-only\". `turn_manager.gd:287` has `Diplomacy.process_turn()` commented out\n> with a stale \"empty stub module\" note (diplomacy.gd was rebuilt but never\n> re-enabled). The *only* writer of `GameState.trade_ledger_json` is diplomacy.gd:32\n> inside that disabled call, so **no inter-player trades run at all** (luxury, strategic,\n> or gold). Worse, the `diplomacy.gd ↔ GdTrade.process_trades` contract has drifted\n> in 3 places: (1) `_serialize_players` emits `{index, traded_luxuries, personality}`\n> but `process_trades` deserializes `Vec` (`player_index`,\n> `tile_luxuries`, `tile_strategics`, `trade_willingness`); (2) `process_trades`\n> returns `{ledger}` but diplomacy.gd reads `result[\"trade_ledger_json\"]`,\n> `[\"relation_changes\"]`, `[\"new_trades\"]`, `[\"broken_trades\"]`; (3) relations\n> advancement isn't returned. So enabling is NOT a one-line uncomment.\n\nThe **simulation logic is complete + cargo-tested** (luxury/strategic swaps + gold\nsales in `mc-trade`, 66/0) and the gold-flow application is wired (part A) — but it\nis all **inert in-game until the diplomacy turn-integration is revived**. The\n`tribute.rs` path stays Game-2 deferred." }, { "id": "p3-24",