Test/5329 mana echoes shares type regression#5532
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Parse changes introduced by this PR✓ No card-parse changes detected. |
matthewevans
left a comment
There was a problem hiding this comment.
Thanks for the #5329 regression — the shape (engine fix in mana.rs/filter.rs + a registered integration test) is the right one. Two mechanical blockers before I can review the logic:
-
One-line compile error.
crates/engine/src/game/effects/mana.rs:2351importsuse crate::types::identifiers::{CardId, ObjectId};butObjectIdis unused. Under the workspace's-D warnings, an unused import is a hard compile error — that's why all three Rust gates (lint, both test shards) fail withcould not compileengine(lib test) due to 1 previous error, not the test itself. DropObjectIdfrom thatuse(keepCardId) and the build clears. -
Branch is BEHIND main. Please rebase onto
origin/main(or use the update-branch button) so CI runs against current main.
Once it's green I'll do the full architecture + rules pass on the shares-a-creature-type counting in filter.rs (CR 202.2 / the Mana Echoes trigger). Holding until then.
Unused import fails under -D warnings and blocked all Rust CI gates. Co-authored-by: Cursor <cursoragent@cursor.com>
7fcb3c5 to
480994a
Compare
matthewevans
left a comment
There was a problem hiding this comment.
Re-reviewed on head 480994ae: both mechanical blockers from the prior head are resolved — the -D warnings compile abort is gone (mana.rs import is CardId-only) and mod issue_5329_mana_echoes; is registered in integration/main.rs (not inert). This is clean test-only regression coverage (534 additions, 0 removals; all engine-file hunks under mod tests; parse_diff reports no card-parse changes), locking in the #5329 fix that already works on main. Coverage is discriminating: positive (3 Goblins → 3 colorless), negative (subtypeless entering creature → 0), the optional-stack-pause preservation case, and SharesQuality bound to TriggeringSource (the actual regression axis, not ParentTarget). Full CI rollup is settled green. Approving and enqueuing. Thanks for the thorough regression net.
Summary
Mana Echoes ("Whenever a creature enters, you may add an amount of {C} equal to the number of creatures you control that share a creature type with it.") was reported as producing zero mana. Investigation on current
mainshows the full stack path already works when:SharesQualitytoTargetFilter::TriggeringSource(notParentTarget).pending_optional_trigger_eventand restores it onDecideOptionalEffect { accept: true }.all_creature_typesis populated (deck load / test seed) soCreatureTypesharing resolves.No engine logic changes were required. This PR adds regression coverage so a future regression in parser binding, optional trigger-event plumbing, or shares-type counting is caught immediately.
Root cause of the original report (triage)
SharesQuality { reference: TriggeringSource }onObjectCountfilterobject_count_matching_idsreturns correct count withcurrent_trigger_eventsetbase_card_typesbefore subtypes were pushed, which broke subtype-based matching in some pathsChanges
Integration tests (
crates/engine/tests/integration/issue_5329_mana_echoes.rs)TriggeringSource.OptionalEffectChoice(nopass_both_playersfallback);enter_creature_from_handsyncsbase_card_typesafter subtypes.Unit tests
filter.rs:game_scenario_mana_echoes_shares_type_count_with_triggering_source,mana_echoes_optional_stack_pause_preserves_shares_type_countobject_count_shares_creature_type_with_triggering_source_for_mana_echoes,colorless_production_counts_creatures_sharing_type_with_triggering_sourceRegistration
mod issue_5329_mana_echoes;incrates/engine/tests/integration/main.rsVerification
Test plan
cargo test -p engine mana_echoes— 3 integration + lib unit tests greenCloses #5329