fix(engine): validate complete flashback costs#5780
Merged
matthewevans merged 3 commits intoJul 14, 2026
Conversation
Contributor
|
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
approved these changes
Jul 14, 2026
matthewevans
left a comment
Member
There was a problem hiding this comment.
Approved — complete non-mana flashback costs now gate legal actions at the prepared-cast authority.
✅ Clean
crates/engine/src/game/casting.rs:12039-12046delegates toAbilityCost::is_payable, the established recursive non-mana cost gate already used by the Escape and Evoke prechecks in this module.crates/engine/tests/integration/flashback_nonmana_payability.rs:82-96reaches the legal-action surface for both the unpayable and payable Group Project cases;:101-117drives payment and resolution;:125-150keeps Festival of Embers' independent graveyard permission available.crates/engine/tests/integration/main.rs:129registers the integration module. The current-head parse-diff reports no card-parse changes, and the required Rust and Frontend checks are green.
Recommendation: approve and enqueue.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Checks the whole nonmana flashback cost before advertising a graveyard cast. This keeps spells such as Group Project out of legal actions when the player cannot tap enough creatures, while preserving payable flashback casts and other graveyard-cast permissions.
Files changed
crates/engine/src/game/casting.rscrates/engine/tests/integration/flashback_nonmana_payability.rscrates/engine/tests/integration/main.rsCR references
Implementation method (required)
Method: /engine-implementer
Track
Developer
LLM
Model: codex-5
Thinking: high
Tier: Standard
Verification
Required checks ran clean, or the exact CI-owned alternative is stated below.
Gate A output below is for the current committed head.
Final review-impl below is clean for the current committed head.
Both anchors cite existing analogous code at the same seam.
cargo fmt --all -- --check— passed.cargo test -p engine --test integration flashback_nonmana_payability -- --nocapture— 3 passed, 0 failed.cargo clippy-strict— passed for the workspace and all targets.cargo test -p engine— 16,554 unit tests and 3,012 integration tests passed../scripts/gen-card-data.sh— generated and validated 35,397 card faces; 31,851 of 34,626 cards fully implemented.cargo coverage— 31,346 of 35,397 cards supported (88.6%).cargo semantic-audit— 32,417 cards audited; 294 existing findings.Tilt was unavailable in this checkout, so the documented direct Developer-track fallback was used.
Gate A
Gate A PASS head=9ccaf70f7aebe19e7193d27c42c25c6d07a4d218 base=8e424583e9167324bdcd77667a6bee0469ebfe70
Anchored on
crates/engine/src/game/casting.rs:1032— Escape delegates its complete residual cost toAbilityCost::is_payable.crates/engine/src/game/casting.rs:9572— Evoke checks the complete nonmana residual before offering the variant.Final review-impl
Final review-impl PASS head=9ccaf70f7aebe19e7193d27c42c25c6d07a4d218
Claimed parse impact
None.
Validation Failures
Initial
./scripts/setup.sh --agentdid not complete its optional WASM bootstrap when the shared disk filled. Thecasting-stack-conditionsreference check also reports two stale function-name anchors already absent on upstream (pay_and_pushandpay_ability_cost); all other references and every required gate above passed.CI Failures
None.