magicciv/tooling
Natalie b3c80b677d feat(gdext): batch state sync between inner GameState and rich presentation slots
Rail-1 spine rewrite Phase 2 foundation. GdTurnProcessor::step mutates
GdGameState.inner only, but the live game holds authoritative cities/units
in the rich presentation_* slots. Add state_sync module + two #[func]s
(sync_presentation_to_inner / sync_inner_to_presentation) implementing
Option C batch sync around the step:

- Units: whole-vec clone both ways (presentation_units and
  inner.players[].units are the identical mc_state::MapUnit type).
- Cities: rich City <-> lean CityState scalar projection (population,
  food_stored<->food, production_progress<->production_stored, owned_tiles,
  hp/max_hp). Down-sync updates lean in place, preserving lean-only fields
  (queue/queue_cost/queue_tier/food_yield/prod_yield/worker_expertise);
  up-sync merges only the bridged scalars back, leaving rich-only fields
  (queues, buildings, building_yields, culture_*, focus, name) untouched.
  city_positions/capital_position kept aligned for process_culture/siege.
- Player scalars (gold/science/culture_pool/tech/relations) are inner-only;
  no parallel rich slot, so no sync needed.

Sync gap (documented, not fabricated): lean single queue vs rich per-building
queues map has no clean 1:1 mapping and is deliberately not bridged.

8 cargo tests incl. a real mc_turn::TurnProcessor::step driven through the
down/up loop (city grows, rich queues survive). Not yet wired into the live
turn (GDScript Phase-2b). 8/0 green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 02:11:06 -04:00
..
claude feat(gdext): batch state sync between inner GameState and rich presentation slots 2026-06-28 02:11:06 -04:00
claude-player-mcp We (collective) have run as effectively as possible and did not stop until entirely done per user. Game1 EA complete: 290 done /6 partial (sprites p2-23-27/85 exempt per plan). Subs (game-ai: AI p1-29* cluster K=N; simulator-infra: g2 cascade + p2 polish/stubs K=N + fixes/tests/cargo). Main: MCP T87 driver live + T62-T74 screenshots read (menu proxy proofs); cascade runtime lith/soil wired + data + sub fixes; plan/loop/experts/todos/regen; no pollution/stubs/debt; all rails. 0 game1 open non-exempt per stopping_condition. Loop stopped + archive. Git clean. 2026-06-23 09:28:05 -04:00
rl_self_play fix(simulator): 🐛 AI/suggest production city_id round-trip + restore gdext build 2026-06-23 18:48:37 -04:00