fix(@projects/@magic-civilization): 🐛 resolve orphan priors test warnings

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
Natalie 2026-05-14 21:52:45 -07:00
parent 4e4433a419
commit b95a500744
2 changed files with 17 additions and 11 deletions

View file

@ -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

View file

@ -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(),
}
}