From b95a50074467b9282d02e1bbacd1d870099df29d Mon Sep 17 00:00:00 2001 From: Natalie Date: Thu, 14 May 2026 21:52:45 -0700 Subject: [PATCH] =?UTF-8?q?fix(@projects/@magic-civilization):=20?= =?UTF-8?q?=F0=9F=90=9B=20resolve=20orphan=20priors=20test=20warnings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- ...ersonality-priors-building-priors-field.md | 25 +++++++++++++------ .../crates/mc-ai/tests/capture_scoring.rs | 3 --- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/.project/objectives/p1-42a-personality-priors-building-priors-field.md b/.project/objectives/p1-42a-personality-priors-building-priors-field.md index e81cdf58..b4e644f3 100644 --- a/.project/objectives/p1-42a-personality-priors-building-priors-field.md +++ b/.project/objectives/p1-42a-personality-priors-building-priors-field.md @@ -2,12 +2,13 @@ id: p1-42a title: "Reconcile capture_scoring.rs ↔ PersonalityPriors — building_priors field location" priority: p2 -status: stub +status: done scope: game1 category: ai owner: warcouncil created: 2026-05-14 updated_at: 2026-05-14 +acceptance_k_of_n: 3/3 blocked_by: [] follow_ups: [] parent: p1-42 @@ -50,13 +51,21 @@ weights). ## Acceptance -- [ ] `cargo check -p mc-ai --tests` green (no E0560 on `building_priors`). -- [ ] `cargo test -p mc-ai --test capture_scoring` runs and passes its 6 - existing assertions. -- [ ] Decision recorded in this objective body — option (a) keeps the door - open for personality-driven building scoring; option (b) lets the - catch-up test compile today and defers per-personality priors to a - separate JSON authoring pass. +- [x] `cargo check -p mc-ai --tests` green (no E0560 on `building_priors`). + Verified 2026-05-14: `Finished dev profile [unoptimized + debuginfo] + target(s) in 2.53s`, zero errors (73 doc-comment warnings only). +- [x] `cargo test -p mc-ai --test capture_scoring` runs and passes its + assertions. Verified 2026-05-14: `test result: ok. 8 passed; 0 failed; + 0 ignored; 0 measured; 0 filtered out`. +- [x] Decision recorded — chose **option (b)**, the minimum surgical fix: + removed the three orphan `building_priors:` lines from + `crates/mc-ai/tests/capture_scoring.rs` (lines 37, 55, 73). They had + no semantic effect (the test does not read them back), and + per-personality building scoring weights remain deferred under the + `p1-42` acceptance bullet on personality JSON weights. Option (a) + (threading `BuildingPriors` through `PersonalityPriors` + JSON + + `Default`) would have widened scope into the file-disjoint + `personality.rs` JSON loader; deferring keeps `p1-42a` tight. ## Source-of-truth rails diff --git a/src/simulator/crates/mc-ai/tests/capture_scoring.rs b/src/simulator/crates/mc-ai/tests/capture_scoring.rs index 0566472e..f5d0c0ff 100644 --- a/src/simulator/crates/mc-ai/tests/capture_scoring.rs +++ b/src/simulator/crates/mc-ai/tests/capture_scoring.rs @@ -34,7 +34,6 @@ fn raider() -> PersonalityPriors { promotion_offense_weight: 1.0, promotion_defense_weight: 1.0, promotion_mobility_weight: 1.0, - building_priors: mc_ai::tactical::state::BuildingPriors::default(), } } @@ -52,7 +51,6 @@ fn merchant() -> PersonalityPriors { promotion_offense_weight: 1.0, promotion_defense_weight: 1.0, promotion_mobility_weight: 1.0, - building_priors: mc_ai::tactical::state::BuildingPriors::default(), } } @@ -70,7 +68,6 @@ fn expansionist() -> PersonalityPriors { promotion_offense_weight: 1.0, promotion_defense_weight: 1.0, promotion_mobility_weight: 1.0, - building_priors: mc_ai::tactical::state::BuildingPriors::default(), } }