-
-
Notifications
You must be signed in to change notification settings - Fork 155
fix(engine): bind "cast the exiled cards" to the cards actually exiled #7034
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Bind the filter context to the tracked-set members, not to
ability.targets.The helper stops reading
ability.targetsfor candidate ids, then builds theFilterContextfrom that same pollutedability.FilterContext::from_ability(ability)carriesability.targets, which for Sanar is the whole reveal window the chain seam injected. A residual leg in the tracked-set filter that performs an object-scope read (aParentTarget-relative comparison, a same-name or shares-a-type leg) therefore evaluates against the injected window rather than against the published set. The two sibling sites in this same resolver already avoid that: lines 429-435 and lines 502-504 both clone the ability and replacetargetswith the exact candidate set before constructing the context.Mirror that pattern so the context and the candidates describe the same set.
🛡️ Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed and fixed — but not on this PR. The merge queue landed #7034 before the fix could be pushed (queued branches reject updates, and by the time I dequeued it had already merged), so all three findings ship in follow-up #7035.
Verified rather than accepted: both sibling sites in
cast_from_zonealready clone-and-rescope the ability before building the context, one of them under the same CR 607.2a — so the third site was genuinely inconsistent. It is latent today (all 51 cards bindfilter: Any, which reads no object scope), closed so it stays that way. Theassembly.rscitation was a real miss on my side: my sweep used a hand-listed file set that omitted it. And the three added exile shapes each pass both the positive and negative assertions, which is what establishes they are genuinely uncaused.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Length of output: 689
@matthewevans, I verified that#7035is open and targets this exact correction incrates/engine/src/game/effects/cast_from_zone.rs.The follow-up also includes
crates/engine/src/parser/oracle_effect/assembly.rsandcrates/engine/src/parser/oracle_effect/tests.rs. Since#7035is not merged yet, I will leave this finding unresolved on#7034until the fix lands.✏️ Learnings added
You are interacting with an AI system.