test(engine): regression for CR 704.5m aura cleanup when host is exiled#6054
Merged
matthewevans merged 1 commit intoJul 16, 2026
Merged
Conversation
|
🚨 Contributor flagged. Click here for more info: Superagent Dashboard |
Contributor
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
matthewevans
left a comment
Member
There was a problem hiding this comment.
Reviewed — test-only regression coverage is substantively distinct; hold for current required Rust check.
✅ Clean
issue_5999_aura_exile_host.rsdrives the production cast/stack/optional-choice path and proves the CR 704.4 boundary: the Aura remains while Path to Exile is paused, then CR 704.5m removes it after the decision settles. Thesaw_optionalreach guard makes that timing assertion non-vacuous.- The direct SBA case complements, rather than replaces, existing target-leaves coverage: it pins the
Zone::Exilehost path, while the two full-pipeline cases cover unconditional and optional-rider resolution. - Existing
sba::check_unattached_aurasis the correct ownership seam; this PR adds no production behavior or duplicate mechanism. No parser-surface change means no parse-diff artifact is required.
Recommendation: hold this exact head until the required Rust aggregate finishes, then return it for the authorized handler approval/enqueue pass.
matthewevans
approved these changes
Jul 16, 2026
matthewevans
left a comment
Member
There was a problem hiding this comment.
Maintainer review complete: the registered production-pipeline tests cover the previously misleading optional-choice boundary and the direct SBA seam; required checks are green.
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.
Fixes #5999
Summary
Discord report (#5999): enchantment Auras stay on the battlefield when the permanent they are attached to is exiled.
Investigation showed the engine already handles this correctly on
main:sba::check_unattached_aurasputs an Aura into its owner's graveyard whenis_valid_attachment_targetfails (host not on the battlefield).OptionalEffectChoicewith the stack already empty; the Aura correctly remains on the battlefield until that rider is answered.apply_action→run_post_action_pipelineruns the SBA loop and the Aura goes to the graveyard.The gap was test coverage and a misleading initial repro driver:
advance_until_stack_empty()only passes priority and never answersOptionalEffectChoice, so the test stopped with the Aura still on the battlefield even though the engine was waiting for a legitimate player decision.Changes
crates/engine/tests/integration/issue_5999_aura_exile_host.rs— four regression tests:move_to_zone(host, Exile)thencheck_state_based_actions; Aura graves immediately.Exile target creature.through the full cast/resolve pipeline.crates/engine/tests/integration/main.rs— register the new module.No engine, parser, or frontend code changes — behavior was already correct.
Test plan
cargo fmt --all -- --check cargo test -p engine issue_5999Expected: all four integration tests pass.
Related aura SBA regressions (should remain green):
cargo test -p engine issue_2863Notes for reviewers
OptionalEffectChoicewhen the stack is empty but resolution is not finished (the exiled creature's controller must answer the land-search prompt).Exile target creature.) graveyard the Aura as soon as the spell fully resolves, with no intermediate pause.