fix(parser): parse compound activation conditions#5115
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
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.
[MED] Current head is not queueable because CI is red in parser-condition coverage. Evidence: the failed Rust tests jobs in run 28725528734 show parser::oracle_condition::tests::parses_you_control_conditions no longer returns ParsedCondition::YouControlLegendaryCreature, parser::oracle_condition::tests::parses_controls_creature_with_keyword_both_scopes now returns a generic QuantityComparison instead of ControlsCreatureWithKeyword, and the deadly_rollick_ir snapshot changed from YouControlSubtypeCountAtLeast to a generic object-count comparison.
Why it matters: this PR touches the shared condition parser, and those canonical condition variants are consumed downstream by the parser/IR pipeline. Please update the grammar so the existing specific conditions still win for those sibling cases, or update the architecture intentionally with discriminating coverage and snapshot changes if the generic representation is deliberate.
I did not push a maintainer fix because this cross-repository PR has maintainerCanModify=false.
# Conflicts: # crates/engine/src/parser/oracle_condition.rs
|
Updated this branch with current origin/main (4827c91) and resolved the parser-condition merge conflict by keeping upstream's later generic you control ordering. That removes the early qualified-presence shadowing that made the specific YouControlLegendaryCreature, ControlsCreatureWithKeyword, and Deadly Rollick commander condition paths regress. Local checks: cargo fmt --all; WSL cargo test -p engine --lib parses_you_control_conditions; WSL cargo test -p engine --lib parses_controls_creature_with_keyword_both_scopes; WSL cargo test -p engine --lib deadly_rollick (all passed). |
matthewevans
left a comment
There was a problem hiding this comment.
Maintainer sweep approval for current head f635f6efa039424f3fe61b320150817017c3bf50.
I rechecked the stale requested-change item against the current diff. The branch is current with origin/main, hard-stop classification is clean, the previous parser-condition regressions are addressed by keeping the specific you control condition paths ahead of the generic quantity fallback, and the parse-diff sticky reports no card-parse changes. Required Rust/card-data checks are still pending, so auto-merge is enabled for the merge queue to wait on them.
matthewevans
left a comment
There was a problem hiding this comment.
Maintainer re-review: current head is clean; prior parser-condition blocker is resolved and CI is green.
Summary
if, such asActivate only if this land entered this turn or if you control a basic land.orparse as source-zone conditions, such ason the battlefield or in your graveyard.you control a ...restriction conditions sobasic landbecomesObjectCount(Land + HasSupertype(Basic), controller You) >= 1rather than a literal subtype-like string.Hidden LairandSkyblade's Boonfrom root chore: update coverage stats and badges #28 indocs/parser-misparse-backlog.md.Root Cause
parse_connector_splitsplit restriction conditions onor, then parsed each fragment as atomic condition text. That failed when Oracle repeated the condition marker on the second branch (or if you control ...) or used source-zone shorthand (or in your graveyard). After the compound parse failed, the fallback atomic parser kept only the first recognized leaf it could scan.Parse Audit
Focused before/after export covered all 17 root #28 backlog cards:
Fixer, Techno TerrorGarenbrig SquireGoremandGrizzled WolverineHermit of the NatterknollsHidden LairHighspire Bell-RingerHurkyl's Final MeditationIchneumon DruidMACH-1, Swooping ScoundrelShadowheart, Sharran ClericSkarrgan HellkiteSkyblade's BoonTomb TyrantTrade CaravanUthros Research CraftUthros, Titanic GodcoreRaw changed card keys:
hidden lairskyblade's boonIntentional deltas:
Hidden Lair: second mana ability restriction changes fromSourceEnteredThisTurnonly toOr(SourceEnteredThisTurn, ObjectCount(basic land you control) >= 1).Skyblade's Boon: activated ability restriction changes fromSourceInZone(Graveyard)only toOr(SourceInZone(Battlefield), SourceInZone(Graveyard)).coverage-parse-diffon the focused exports reported no signature-level card-parse changes, which is expected for this internal activation-condition shape.Verification
cargo fmt --all./scripts/check-parser-combinators.shcargo test -p engine --features cli --lib parses_compound_or_if_restriction_fragments -- --nocapturecargo test -p engine --features cli --lib parses_compound_source_zone_shorthand -- --nocapturecargo test -p engine --features cli --lib restriction_condition -- --nocapturetarget/debug/card-data-validate /tmp/phase-root28-after.jsontarget/debug/coverage-parse-diff /tmp/phase-root28-base.json /tmp/phase-root28-after.json --markdown /tmp/phase-root28-diff.md --json /tmp/phase-root28-diff.jsoncargo clippy -p engine --all-targets -- -D warningsgit diff --check