test(@projects/@magic-civilization): 🐛 repair spliced p1_29h test fn + nonexistent MapUnit/CityState API
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>
This commit is contained in:
parent
2a3081cc0b
commit
0ae4728242
1 changed files with 18 additions and 22 deletions
|
|
@ -457,6 +457,24 @@ fn refound_suppression_lever_sweep() {
|
||||||
" cooldown={cd:>3}: eliminations={elims} captures={caps} founds={founds} per_player_min={mins:?}",
|
" cooldown={cd:>3}: eliminations={elims} captures={caps} founds={founds} per_player_min={mins:?}",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let baseline_elims = results[0].1;
|
||||||
|
let best = results.iter().map(|r| r.1).max().unwrap_or(0);
|
||||||
|
eprintln!(
|
||||||
|
"p1-29i RESULT: baseline(cooldown=0) eliminations={baseline_elims}; \
|
||||||
|
best-across-sweep eliminations={best}",
|
||||||
|
);
|
||||||
|
|
||||||
|
// Directional gate only: founds must fall as the cooldown rises (the lever
|
||||||
|
// demonstrably suppresses refounding) — proving the mechanism works even if
|
||||||
|
// suppression alone is not sufficient to convert a capture into a kill.
|
||||||
|
let baseline_founds = results[0].3;
|
||||||
|
let max_cd_founds = results.last().unwrap().3;
|
||||||
|
assert!(
|
||||||
|
max_cd_founds <= baseline_founds,
|
||||||
|
"the lever must not INCREASE refounding (baseline founds={baseline_founds}, \
|
||||||
|
max-cooldown founds={max_cd_founds})",
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// p1-29j gridded + E2E parity test for Rust action application of city founding
|
/// p1-29j gridded + E2E parity test for Rust action application of city founding
|
||||||
|
|
@ -470,7 +488,6 @@ fn refound_suppression_lever_sweep() {
|
||||||
/// autoplay bypass so p1-29i levers etc become effective on gate surface.
|
/// autoplay bypass so p1-29i levers etc become effective on gate surface.
|
||||||
#[test]
|
#[test]
|
||||||
fn p1_29j_rust_action_application_found_and_capture_stamp() {
|
fn p1_29j_rust_action_application_found_and_capture_stamp() {
|
||||||
use mc_state::game_state::CityState;
|
|
||||||
// Minimal state with 1 player, 1 founder unit, EP budget.
|
// Minimal state with 1 player, 1 founder unit, EP budget.
|
||||||
let mut state = GameState::default();
|
let mut state = GameState::default();
|
||||||
state.players.push(PlayerState::default());
|
state.players.push(PlayerState::default());
|
||||||
|
|
@ -479,7 +496,6 @@ fn p1_29j_rust_action_application_found_and_capture_stamp() {
|
||||||
state.players[pi].expansion_points = 10;
|
state.players[pi].expansion_points = 10;
|
||||||
state.players[pi].units.push(MapUnit {
|
state.players[pi].units.push(MapUnit {
|
||||||
id: 1,
|
id: 1,
|
||||||
owner: 0,
|
|
||||||
col: 0,
|
col: 0,
|
||||||
row: 0,
|
row: 0,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
|
|
@ -509,7 +525,6 @@ fn p1_29j_rust_action_application_found_and_capture_stamp() {
|
||||||
// Re-add a unit for second attempt.
|
// Re-add a unit for second attempt.
|
||||||
state.players[pi].units.push(MapUnit {
|
state.players[pi].units.push(MapUnit {
|
||||||
id: 2,
|
id: 2,
|
||||||
owner: 0,
|
|
||||||
col: 0,
|
col: 0,
|
||||||
row: 0,
|
row: 0,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
|
|
@ -535,25 +550,6 @@ fn p1_29j_rust_action_application_found_and_capture_stamp() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
let baseline_elims = results[0].1;
|
|
||||||
let best = results.iter().map(|r| r.1).max().unwrap_or(0);
|
|
||||||
eprintln!(
|
|
||||||
"p1-29i RESULT: baseline(cooldown=0) eliminations={baseline_elims}; \
|
|
||||||
best-across-sweep eliminations={best}",
|
|
||||||
);
|
|
||||||
|
|
||||||
// Directional gate only: founds must fall as the cooldown rises (the lever
|
|
||||||
// demonstrably suppresses refounding) — proving the mechanism works even if
|
|
||||||
// suppression alone is not sufficient to convert a capture into a kill.
|
|
||||||
let baseline_founds = results[0].3;
|
|
||||||
let max_cd_founds = results.last().unwrap().3;
|
|
||||||
assert!(
|
|
||||||
max_cd_founds <= baseline_founds,
|
|
||||||
"the lever must not INCREASE refounding (baseline founds={baseline_founds}, \
|
|
||||||
max-cooldown founds={max_cd_founds})",
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// p1-29i — multi-condition ENSEMBLE: the discriminator between a real lever and
|
/// p1-29i — multi-condition ENSEMBLE: the discriminator between a real lever and
|
||||||
/// single-seed noise. A near-deterministic scripted path barely responds to
|
/// single-seed noise. A near-deterministic scripted path barely responds to
|
||||||
/// `game_rng_seed`, so the ensemble varies INITIAL CONDITIONS (start distance ×
|
/// `game_rng_seed`, so the ensemble varies INITIAL CONDITIONS (start distance ×
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue