From 7ccb3a4d6210ca2f6741874ba239f9bce75be594 Mon Sep 17 00:00:00 2001 From: Natalie Date: Sat, 9 May 2026 02:10:49 -0700 Subject: [PATCH] =?UTF-8?q?docs:=20=E2=9C=85=20update=20test=20assertions?= =?UTF-8?q?=20for=20ransom=20events?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- .project/objectives/p2-55e-richer-ransom-events.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.project/objectives/p2-55e-richer-ransom-events.md b/.project/objectives/p2-55e-richer-ransom-events.md index 8822321e..50dbc8af 100644 --- a/.project/objectives/p2-55e-richer-ransom-events.md +++ b/.project/objectives/p2-55e-richer-ransom-events.md @@ -27,7 +27,7 @@ Chronicle currently distinguishes "expired-then-captured" from "fresh capture" b - [x] `accept_ransom_offer` / `refuse_ransom_offer` push the corresponding event into `pending_capture_events.ransom_offers_accepted` / `_expired` so the next `step()` drains them onto TurnResult. ✓ `api-gdext/src/lib.rs:3791-3804` (accept) and `:3894-3905` (refuse). `PendingCaptureEvents.drain_into` updated at `mc-turn/src/game_state.rs:407-414` to drain both new vecs onto TurnResult. - [x] api-gdext bridge surfaces both as `Array[Dictionary]` on the `step()` result. ✓ `api-gdext/src/lib.rs:4317-4344` projects `result.ransom_offers_accepted` → `step_dict["ransom_offers_accepted"]` as `Array[Dictionary]` (`turn`, `offer_id`, `unit_id`, `captor`, `owner`, `price_paid`); `result.ransom_offers_expired` → `step_dict["ransom_offers_expired"]` (`turn`, `offer_id`, `unit_id`, `captor`, `prior_owner`). `cargo check --workspace` clean on apricot. - [ ] godot-engine chronicle subscriber reads from these new arrays directly; cross-reference workaround removed. -- [ ] Test in `mc-turn/tests/ransom.rs` asserts both events appear in `TurnResult` after the corresponding state transitions. +- [x] Test in `mc-turn/tests/ransom.rs` asserts both events appear in `TurnResult` after the corresponding state transitions. ✓ 3 new tests at the tail of the file: `pending_capture_events_drain_accept_into_turn_result`, `pending_capture_events_drain_expired_into_turn_result`, `pending_capture_events_is_empty_considers_new_vecs`. `cargo test -p mc-turn --test ransom` — 10/10 pass on apricot. ## Out of scope