From 0ae47282423235c79c652ff83c4f4fbe657d1ecb Mon Sep 17 00:00:00 2001 From: Natalie Date: Wed, 24 Jun 2026 20:10:14 -0400 Subject: [PATCH] =?UTF-8?q?test(@projects/@magic-civilization):=20?= =?UTF-8?q?=F0=9F=90=9B=20repair=20spliced=20p1=5F29h=20test=20fn=20+=20no?= =?UTF-8?q?nexistent=20MapUnit/CityState=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- .../tests/p1_29h_gridded_elimination.rs | 40 +++++++++---------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/src/simulator/crates/mc-player-api/tests/p1_29h_gridded_elimination.rs b/src/simulator/crates/mc-player-api/tests/p1_29h_gridded_elimination.rs index 45a207c3..fbe26e9b 100644 --- a/src/simulator/crates/mc-player-api/tests/p1_29h_gridded_elimination.rs +++ b/src/simulator/crates/mc-player-api/tests/p1_29h_gridded_elimination.rs @@ -457,6 +457,24 @@ fn refound_suppression_lever_sweep() { " 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 @@ -470,7 +488,6 @@ fn refound_suppression_lever_sweep() { /// autoplay bypass so p1-29i levers etc become effective on gate surface. #[test] 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. let mut state = GameState::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].units.push(MapUnit { id: 1, - owner: 0, col: 0, row: 0, ..Default::default() @@ -509,7 +525,6 @@ fn p1_29j_rust_action_application_found_and_capture_stamp() { // Re-add a unit for second attempt. state.players[pi].units.push(MapUnit { id: 2, - owner: 0, col: 0, row: 0, ..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 /// single-seed noise. A near-deterministic scripted path barely responds to /// `game_rng_seed`, so the ensemble varies INITIAL CONDITIONS (start distance ×