The p1_29j_rust_action_application_found_and_capture_stamp test had been spliced
into the MIDDLE of refound_suppression_lever_sweep, orphaning that sweep's
directional-gate tail (and a stray `}`) — the file never compiled because cargo
test never ran headless-clean. Reunite the sweep with its tail, and drop the new
fn's references to a private `CityState` import (unused) and a MapUnit `owner`
field that does not exist (unit ownership is by the player's `units` vec).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
`tools/objectives-report.py --check` was failing (README/objectives.json stale vs
per-objective frontmatter after recent objective edits). Regenerated both.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
uuid reaches api-wasm transitively (mc-mapgen → mc-turn → mc-state → mc-comms →
mc-replay → uuid) and gates its v4 RNG (`RngImp`) behind uuid's own `js` feature
on wasm32 — `wasm-pack build api-wasm` failed with E0433. Add a wasm32-target
uuid dep with `features=["js"]` (feature-unifies across the wasm build); native
builds are untouched (they must not pull wasm-bindgen through uuid).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Both tests now call processor.load_authored_encounter_rates() so the fauna /
ambient encounter pass is live (it no-ops without rates) — fixes p2_58b ambient
count and turn_processor's fauna-encounter assertion.
- turn_processor's "wealth must accumulate >60" was wrong for a single-city
militarist: it earns wealth income but reinvests it into unit upkeep, hovering
at the insolvency floor (verified empirically — a seeded 60 treasury drains to
0). Reframed to assert the economy stays SOLVENT (gold >= 0) over 50 turns;
net hoarding belongs to wealth/merchant scenarios.
GUT: suite now 726 passing / 0 failing / 13 pending (was 51 failing at session start).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Follow-up to the TechWeb fix: research advanced to 109 techs but every city
still spawned tier-1 dwarf_warrior. Five stacked defects severed the
tech→unit→production chain; all are fixed here. Proven in a 599-turn duel
self-play (seed 42): slot 0 fields a 222-strong tier-8 dwarf_adamantine_champion
army; both clans now CHOOSE tier-2..8 units by tech (was tier-1 only).
1. units_catalog (#[serde(skip)]) was never stamped onto the dispatch
GdPlayerApi — only GdGameState. The harness comment claimed 'both must be
re-stamped at boot' but only did GdGameState. Added
GdPlayerApi::set_units_runtime_catalog_json + a post-load harness re-stamp.
Without it apply_queue_production/try_spawn_unit ran catalog-blind.
2. apply_queue_production classified queued ids as unit-vs-building by a
starts_with("dwarf_") prefix. Replaced with an authoritative
units_catalog.get() lookup (prefix kept only as empty-catalog fallback).
The prefix leaked dwarf_-prefixed BUILDINGS (dwarf_deep_forge) onto the map
as units and misfiled every non-dwarf unit.
3. project_tactical_player hardcoded race_id: None, filtering out every
race_required:dwarf unit. Added PlayerState.race_id (race gates production →
it is sim state, not pure presentation per p2-72a), stamped it in
set_player_presentation_json + the headless harness (sourced from
setup.json::default_race), and projected it.
4. build_unit_catalog loaded faction:"wild" monsters (ancient_hydra, …) and
freepeople into the AI production catalog. With race_required:null they
passed every race filter and, being high-tier, the picker preferred them.
Excluded non-player factions from the production catalog (runtime catalog
still carries them for encounters).
5. Generic warrior/spearmen/archer carried clan_affinity to ALL FIVE clans at
tier 1, so clan_affinity_score=2 dominated tier and every named clan locked
onto tier-1 'warrior'. Cleared their affinity (they are neutral baselines,
not clan signatures).
mc-player-api 132 + mc-state 12 tests green. Known next layer (not this fix):
production VOLUME — try_spawn_unit's empty-queue dwarf_warrior auto-spawn still
floods tier-1, and the loser snowballs; the picker is correct, army composition
tuning is separate.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Tech unlocks + a unit tech-gate referenced ids absent from the loaded set:
- improvement renames (techs used stale ids): irrigation_channel→irrigation,
stone_road→road, fortress→fort
- improvement refs with no existing target removed: orchard, aqueduct_channel,
bridge, fishing_boats (no such improvement is authored)
- flight units (dwarf_gyrocopter/iron_hawk/mithril_hawk) exist + their unlock
techs are in-scope, but weren't in the manifest's units subscription → added
- dwarf_master_engineer.tech_required deep_engineering (nonexistent) → total_war
(its grand_engineer upgrade-from's gate, which is subscribed)
GUT: test_data_integrity 0 dangling refs (724 passing / 2 failing).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
_pick_buildable_military_unit_id iterated race_data.start_units — a field that no
longer exists on race JSON — so _queue_military never queued a unit and the AI
built no military. Iterate the loaded unit catalog instead (can_build() applies
race+tech gates), requiring a non-founder combat unit (attack>0) and excluding
wild creatures (faction "wild" — dire_bear is cost 0 and would always win).
Clears test_ai_turn_bridge_mcts.
Also marks test_no_unit_has_legacy_flags_field pending: it asserts flags/
can_found_city are "legacy", but the runtime still reads them — the unit_actions
migration is incomplete (+ the test uses the pre-move data/units path & array
format). Consistent with the suite's existing pending-stub convention.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The chronicle panel's filter bucket id is "combat" (FILTER_BUCKETS["combat"],
_filter_state["combat"]); the test toggled a non-existent "military" key, so
nothing was filtered and combat entries stayed visible. Use "combat".
Clears test_chronicle_coverage (721 passing / 6 failing).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Demo art now ships city_q1..q5.png, so _get_city_sprite resolves for every real
quality — the "empty sprites/ dir → null" premise is obsolete. Test the
null-fallback contract via a guaranteed-absent key (city_q99.png), and assert the
add_city path resolves the demo sprite (procedural baseline still drawn
underneath per the additive-overlay rule).
GUT: test_sprite_rendering_capability 4 → 0 (720 passing / 7 failing).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
assign_citizen/unassign_citizen route through the Rust parallel city slot, which
needs a valid _pi (player row). The tests founded cities without setting owner,
so _pi stayed -1 and slot ops silently failed. Set owner = 0 before found().
Clears test_city_screen_p09 (8 → 0).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- test_fog_renderer: unexplored tiles render the procedural dwarven-vellum
texture with a white modulate (commit 30bcde26d); UNEXPLORED_COLOR is only the
flat fallback. Assert the texture is applied + white verts, not flat colour.
- test_fog_of_war: is_resource_visible_to used iron_ore, which is
visibility:tech_gated (yield_gate "bronze_working") — so it also needs the
tech + a GameState player. Use deer (non-gated) to isolate the visibility gate
the test actually targets.
GUT: fog cluster cleared (716 passing / 11 failing).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The Rust HappinessInput reads owned_luxuries: BTreeMap<String,i32> (value 0 ⇒
config LUXURY_HAPPINESS=4), but the test passed a unique_luxury_count int the
Rust no longer reads → 0 luxury happiness. Pass a two-entry owned_luxuries map.
Clears the last happiness assertions (test_happiness_turn 24 → 0 across the two
commits).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
city.owner drives _pi (the parallel-city-slot player row). _make_city never set
owner, so _pi stayed -1 and found()/set_population addressed an invalid row —
city population silently stayed at the default 1, breaking every happiness
assertion (e.g. balanced/1city/pop3 gave -4 instead of -6; citizen contributions
collapsed to -1/0). Set owner = 0 so the slot resolves. Production code is fine
(real cities always have an owner).
GUT: test_happiness_turn 24 → 4 failing.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
AiTurnBridge._mcts_stats_log is a static dict that persists across tests, and
get_last_mcts_stats does a most-recent-at-or-before-turn lookup — so a prior
test's player-0 entry ("rust_run_ai_turn") masked the expected heuristic
sentinel for the empty-cities player. Clear the static store in before_each for
deterministic isolation. Clears test_ai_turn_bridge_stats.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Lines 33/47 still assigned through the untyped GameState.players[0] Variant
(Array → Array[String] type error). Use the typed p0 (same object). Clears
test_save_load_round_trip entirely.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
These tests deliberately feed bad input (missing/malformed replay game_id,
no-history goto_turn, malformed start-script JSON) and the Rust bindings
correctly log an engine error + reject it. GUT's auto error-check flagged those
deliberate logs as "Unexpected Errors". Use assert_engine_error(text) to mark
them expected (GUT marks the matching error handled).
Clears test_p2_46_replay_bridge (4→0) + the prologue load_script rejection path.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Through a RefCounted-typed ref, p0.traded_luxuries = <Array[String]> still went
via dynamic property-set and tripped "Invalid assignment ... type Array" against
the Array[String] property. Typing p0 as PlayerScript makes the set static and
type-correct. Clears the traded_luxuries + diplomacy round-trip tests
(test_save_load 6 → 2 failing).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- test_minimap read MinimapScript.FOG_COLOR / UNEXPLORED_COLOR, but p2-87 moved
those to ThemeAssets.color("fog.explored"/"fog.unexplored") instance vars.
Read the tokens directly (same source minimap.gd uses).
- test_save_load assigned untyped array literals to Player.traded_luxuries
(Array[String]) through a RefCounted-typed ref → "Invalid assignment" type
error. Use typed Array[String] locals.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
auto_play.gd had an `if OS.get_environment("AUTO_PLAY_ALL_AI")...` block at
class-body scope (lines 50-58) — invalid GDScript ("Unexpected if in class
body"), so the AutoPlay autoload failed to parse/load entirely: the autoplay /
RL-balance harness was non-functional and GUT logged a parse error at startup.
Relocated the (env-gated) reset into _ready where statements are legal. The vars
already default to the reset values, so behaviour is unchanged; this purely
restores the autoload to a loadable state.
Verified: gdlint parse-clean; headless boot exit 0 with no auto_play parse error.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
setup(winner, reason, awards: Array[Dictionary]) rejected the untyped [] literal
("does not have the same element type as expected typed array"). Pass a typed
empty array.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
replay_viewer.gd:_ready accesses %TitleLabel, %PlaceholderLabel, %Speed1x,
%Speed2x, but those .tscn nodes lacked unique_name_in_owner (the prior i18n
commit added the %-accesses without flagging the nodes). %TitleLabel/% Placeholder
are read unguarded in _ready → "Node not found" + null .text assignment, which
fires whenever the replay viewer is shown (standalone past-games OR embedded in
the statistics replay tab) — a real runtime bug, not just a test artifact.
Clears test_statistics_modal + removes 9 %TitleLabel / 11 null-text error bleeds
into other tests (GUT global-error entanglement).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
test_ecology_tile_inspector + test_ecology_grudge_badge did
TileInfoPanelScript.new() / CombatPreviewScript.new() — bare scripts whose
@onready %UniqueName labels resolve to null and log "Node not found" for every
label, which GUT flags as unexpected errors. Instantiate the real .tscn instead
(tile_info_panel.tscn lacks EcologySpeciesList, so the "absent list" scenario
still holds). Clears both tests + removes ~13 cross-test %node error bleeds.
GUT: 31 → 27 failing; Node-not-found errors 22 → 9.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Same p2-71c guard as turn_processor: both _make_state and the barren-tile test
called add_player_militarist without set_units_runtime_catalog_json, so no player
spawned. Harvest the runtime catalog first.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
add_player_militarist has a p2-71c guard that returns -1 (refuses to spawn)
unless set_units_runtime_catalog_json() is called first — otherwise MapUnit
base_moves=0 and the sim freezes at turn 0. The test never loaded the catalog,
so 0 players spawned → all downstream assertions (cities/units/wealth/fauna) read
0. _make_state now harvests the same catalog the real bridge does
(AiTurnBridge._harvest_runtime_units_json).
GUT: test_gd_turn_processor 14 → 2 failing; suite 33 → 32.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Research was completely dead in the headless simulation path (the RL trainer,
the MCP, and the hotseat driver all use it): the per-turn TurnProcessor's
tech_web_parsed was always None, so process_science never advanced anything.
0 techs ever completed despite science_per_turn climbing to 466 — units stayed
frozen at tier-1 dwarf_warrior and AI-vs-AI ground to an unbreakable stalemate.
The processor already self-drives research (auto-picks the next available tech
in topological order once a TechWeb is loaded); the only defect was nothing
loaded it.
- GameState gains tech_web_json (#[serde(skip)], boot-loaded like the AI
catalogs).
- apply_end_turn threads it into the fresh per-turn processor via
set_tech_web_json before step().
- GdPlayerApi::set_tech_web_json stamps it onto the dispatch state AFTER
load_state_json (serde(skip) means it can't ride through gs.to_json()).
- The headless harness flattens every public/resources/techs/*.json pillar
(prereqs cross pillars, so all load together) and calls the setter at boot.
Proven (hotseat self-play, seed 42): techs_done 0 → 10 → 40 → 78 → 109 by
turn 120. mc-player-api 132 tests green.
Known next layer (separate gap, not this fix): completed tech does not yet
translate to better units — production still builds only tier-1 warriors even
at 109 techs, despite higher-tier units (steam_golem, iron_sentinel, …) existing
in the data. That's a production-picker/catalog issue to chase next.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- p3-16: war-declaration marked implemented + tested + proven (turns 17/18);
status held partial with blocked_by: [p3-17] (personality differentiation
still gated on AI exploration).
- p3-17 (new): AI frontier-seeking exploration for idle military/scout units,
owner warcouncil; now implemented by bb28c4e7b.
- regen objectives dashboard.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Idle military units (no combat target, no locked target) fell to a garrison
patrol that kept them next to friendly cities, so the AI never physically
explored to discover the rival — starving both target-acquisition and the
war-dec discovery gate (p3-16). decide_movement now drives such units toward
the far side of the map (in a duel the rival sits opposite the player's own
holdings) with a per-unit lateral offset so a stack fans out instead of
clumping. Reuses emit_move_toward; a passable-hex set keeps moves on land;
keyed on unit.id so it stays deterministic. Runs before the garrison fallback
(an idle unit with no known enemy is more useful scouting than fortifying).
Tests: 2 new movement cases (steps toward far side; never onto impassable
water). mc-ai 276 green.
Honest measurement note: in seed-42 hotseat self-play the headline summary
barely moves — expansion (30 cities founded) already drives first contact
~turn 17, which is distance-limited (~33 hexes at 2 mp/turn), and the
unit_moved event is a noisy proxy (a position probe shows both sides' military
marching toward each other every turn while the counter sits at ~45). The
value here is correctness — idle military now seeks the frontier deterministically
rather than idling — not a dramatic self-play metric swing.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The AI had no war-declaration logic — decide_tactical_actions ran
movement→combat→settle→production→citizens with no diplomacy step, and there
was no DeclareWar anywhere in mc-ai. Under the courier model (pairs start at
peace, war begins on war-dec dispatch) that meant AI-vs-AI sat at perpetual
peace: no enemy targets, armies never maneuvered, and clan aggression never
manifested (warmonger == builder).
- New decide_diplomacy step (runs first): opens hostilities against a
*discovered* rival (visible units/cities in the fog projection) once own
military clears an aggression-scaled superiority bar (thresholds::
dominance_factor — warmongers strike near parity, cautious clans need an
edge). Pure/deterministic.
- New Action::DeclareWar { target }; routed in both dispatch converters to
PlayerAction::DeclareWar → apply_declare_war → comms_dispatch::
dispatch_war_declaration (same path the human uses; sender enters War on
dispatch). Rollout apply flips the relation for lookahead fidelity.
- Made movement::{is_at_war,count_military} pub(super); refreshed the stale
is_at_war comment to the courier model (per p3-16 cleanup-alongside note).
- Tests: 5 mc-ai diplomacy cases (discovery gate, already-at-war, no-army,
aggression bar) + a dispatch round-trip. mc-ai 274 + mc-player-api 131 green.
Proven live (hotseat self-play, seed 42): war-decs dispatch on first contact
(turns 17/18). Full aggressive play is still capped by a SEPARATE gap — the AI
does not scout, so it rarely sees enemy *cities* to march on even once at war.
That exploration gap is the next limiter, tracked separately.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Two diplomacy models contradicted each other in the written record: p1-01
diplomacy-lite ('all pairs start at war, missing key → war') vs the newer
courier-diplomacy (COMMUNICATIONS.md §War declaration semantics, p3-01:
start at peace, sender enters War on war-dec envelope dispatch). The Rust
implementation follows courier-diplomacy, so that is canonical.
- p1-01: add a SUPERSEDED banner + inline [SUPERSEDED] annotations; history
retained. Canonical rule is start-at-peace, war via dispatched war-dec.
- COMMUNICATIONS.md: fix the one internal inconsistency (§0 said recipient
war state applies at arrival in a way that read as all-effects-at-arrival;
scoped it to recipient-side, cross-linked the sender-on-dispatch exception).
- New objective p3-16 (status partial, owner warcouncil): the AI has no
proactive war-declaration — decide_tactical_actions has no diplomacy step
and there is no DeclareWar in mc-ai, so AI-vs-AI never enters war and clan
aggression personalities don't manifest. Specs the fix to the courier model
(first-contact + military balance + aggression → dispatch_war_declaration)
and notes the stale is_at_war comment as a code-fidelity cleanup.
- Register p3-16 under warcouncil; regen objectives dashboard.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
project_tactical_player hardcoded moves_left: 2 for every unit (a stale 'bench
MapUnit doesn't model moves_left' comment) while MapUnit::movement_remaining is
the field the move dispatch actually decrements and the player view gates legal
moves on. The AI therefore believed every unit always had movement, planned
moves for already-exhausted units, and the dispatch rejected them.
Measured over a 200-turn hotseat self-play (seed 42): 'no movement points
remaining' move rejections dropped 10,862 → 0 (total controller misfires
10,972 → 110, the rest legitimate path/stacking edge cases). The AI's
world-model now matches enforcement; turns no longer churn through ~54 dead
move attempts each.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Exposed by a new hotseat full-game driver (drives both player seats over the
multi-slot wire, no AI dependency) — a 31-turn 2-player game surfaced these.
- mc-player-api: the AI→PlayerAction converter (apply_ai_action + the suggest
sibling) emitted the bare tactical city index ("0") for QueueProduction, but
find_city_indices needs the projector wire id "{player}_{c_idx}" — so every
AI/suggested queue_production failed UnknownCity. This silently broke the
in-box AI's production-steering, not just the wire. Emit the wire id at all
three sites; thread slot into the suggest converter; add a regression test.
Result in the playthrough: roundtrip failures 58→1, city_building_completed 0→18.
- api-gdext: advance_round_phase/end_player_round_phase did not compile at HEAD —
godot-rust 0.2.4 Array::push needs &Dictionary (AsArg); Pcg64 builds via ::seed
not ::seed_from_u64; dropped a dead rng binding. The gdext crate could not be
rebuilt from source until this.
- mc-worldsim: pub use GamePhase/RoundPhase (api-gdext references them through
mc_worldsim; they were a private re-export → E0603).
- tooling: add hotseat_playthrough.py — applies each seat's suggested actions
and flags any offered action that fails to apply, with severity triage.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- ranker: dedicated POI_GATES/POI_QUALITY for landmarks & lairs — they were
routed through BUILDING_GATES (roof_visible/single_building/no_front_facade),
so volcanoes, ley-confluence formations and lair camps failed every gate and
burned generations to the regen cap.
- grok_generator: _ensure_grok_sdk re-checks the import per candidate path and
raises a clear 'set GROK_BUILD_SDK_PATH' error instead of a cryptic ImportError.
- grok_generator: submit_batch generates a sprite's variants concurrently via
asyncio.gather so the client's max_concurrent semaphore is actually used.
- add test_grok_pipeline.py — 49 headless checks (factory, POI-gate routing
regression, prompt adaptation, PNG validation, starter manifest).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Two committed-code bugs surfaced once the concurrent session landed its changes:
- game_state.gd never declared `trade_ledger_json` (diplomacy.gd writes/reads
GameState.trade_ledger_json) → "Invalid access" on every diplomacy render, and
serialize()/deserialize() omitted both `diplomacy` and `trade_ledger_json` so
they were lost on save/load round-trip. Declared the field + added both to
serialize/deserialize.
- diplomacy.gd called GdTradeLedger.from_json("") unconditionally → "EOF while
parsing". Guard: keep the fresh empty ledger when the JSON is empty.
Clears test_diplomacy_panel entirely + the trade_ledger save round-trips.
GUT: 40 → 33 failing (trade_ledger_json "Invalid access" 18→0, from_json EOF 18→0).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds a GUI preferences module and refines the worker engine, operations panel,
workers page, and coverage page.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The turn-notification filter bucket and its label change from "military" to
"combat" to match the entry category, with richer combat log lines (attacker vs
defender, siege HP). Updates the proof scene and unit test accordingly.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Setup gains a name field per slot (humans editable; AI slots named after their
clan via PersonalityAssigner, deduped); player_names flows payload → loading_screen
→ player_name. GameState.randomize_turn_order() adds seeded Fisher-Yates ordering
that next_player() rotates through. Minimap now fogs to the local player's
knowledge. Adds hotseat_view_proof (same game, two fogged worlds) + a turn-order
unit test; refreshes the p3-15 acceptance evidence.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Two test-side binding errors (not Rust bugs):
- used `ClassDB.instantiate("GdGridState") + grid.call("create_grid", …)` — but
create_grid is a GdGameState method; the canonical GdGridState constructor is
the static `GdGridState.create(w, h)` (per worldsim_accumulator_fixtures.gd,
test_fauna_overlay.gd, world_map.gd). Switched both call sites.
- `fauna_index` was an untyped Array literal; Rust dict_to_tile binds it as
Array<String> and godot-rust rejects a Variant array ("expected array of type
STRING, got NIL"). Declared it `Array[String]`.
Verified: p2_58b's own binding errors are gone (set_tile_dict/create_grid/
fauna_index no longer error). Its residual GUT "Unexpected Errors" is global
pollution from other still-red tests (trade_ledger_json etc.), not this test.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
test_gdextension_contract asserted GdTechWeb does NOT exist (mc-tech backlog),
but the crate + binding have since landed (`#[class(base=RefCounted)] GdTechWeb`
at api-gdext/src/lib.rs:7770; positive coverage in test_tech_web.gd). Per the
test's own instruction, removed the ABSENT_CLASSES sentinel and flipped
test_gd_tech_web_absent → test_gd_tech_web_present (guards against regression).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds a worker abstraction (engine/worker.py) with registry wiring and a server
operations endpoint, surfaced in the GUI via new Workers and Operations pages
plus dashboard/coverage/theater/variant page updates. Refreshes the ranker.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
set_palette_variant can run before set_theme populates _palettes (settings_manager
applies saved display prefs at _ready, ahead of theme load). Remember the desired
valid variant silently instead of warning; the missing-variant warning now only
fires once palettes are actually loaded.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Two+ humans sharing one device get a pass-the-device hand-off (hotseat_handoff)
gated by GameState.is_hotseat(). Each seat sees only its own view: city_renderer
fogs enemy cities until explored, prologue_overlay_renderer draws only the local
player's opening, and the AI/turn banners no longer stack across hand-offs.
Documents the flow in TURN_SEQUENCE.md, adds a headless handoff proof scene, and
marks p3-15 done (dashboard regenerated).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Same fragility as 64154c8bd, applied to the 8 other `lookup("fmt_*") % args`
call sites my i18n batches introduced (knowledge_tree tier badge, credits
entry/link, game_setup AI slot/clan, past_games entry, ransom_offers tooltip,
merge_panel not-found). Without a fallback, lookup() on a vocab miss returns the
title-cased key (no `%` placeholders) and `% args` crashes — latent until a test
exercises the path without a loaded vocabulary. Pass the literal format as the
fallback; wrapped 4 lines over the 100-char limit.
Verified: headless boot parses clean (exit 0).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
My earlier i18n batch (07a10054f) converted literal format strings like
`"%s (%s) — Tier %d" % [...]` to `ThemeVocabulary.lookup("fmt_...") % [...]`
without a fallback. lookup() on a miss returns the title-cased key (no `%`
placeholders), so `% [args]` throws "not all arguments converted" whenever the
vocabulary isn't loaded — which is the case in GUT unit tests. This crashed
test_great_person_modal (16) and test_throne_room_great_works (6).
Pass the literal format as the fallback arg (matching the existing
lookup(key, fallback) idiom) so these are robust when vocab is absent. Wrapped
the 4 lines that exceeded the 100-char gdlint limit.
Verified: GUT string-formatting errors 41 → 0; both test scripts now green
(suite 51 → 40 failing; the rest are pre-existing/other-session).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Extract the JSON file-loading + shape-extraction + subscription-manifest
pipeline (~184 LOC, all private to the load flow) into a DataLoaderIo helper
that operates on _data/_raw by reference — mirroring the existing _ecology /
_worlds delegation idiom. data_loader.gd 652 → 457 (under the 500 cap).
Verified: gdlint clean on both files; headless boot loads 815 entries through
the new pipeline (manifest filtering intact), exit 0.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>