fix(parser): recognize "enter(s) the battlefield untapped" long-form external entry#4991
Conversation
…external entry
Vigorous Farming ("Lands you control enter the battlefield untapped.")
fell through to Unimplemented for the same reason Frozen Aether did before
the previous fix: CR 614.1c external-entry replacement effects are
templated by WotC in both a short form ("enter untapped") and the
fully-spelled long form ("enter the battlefield untapped"), and only the
short form was recognized.
Mirrors the tapped-side fix in the same two gates:
- `oracle_classifier::is_replacement_pattern` — added the long-form
untapped suffix alongside the existing short-form and tapped-long-form
checks.
- `oracle_replacement::parse_external_entry_suffix` — added long-form
"enter(s) the battlefield untapped" arms alongside the existing
short-form and tapped-long-form arms.
Added parser tests for both the real card (Vigorous Farming, single-type
subject) and the controller-scoped Or-filter subject shape.
clippy -D warnings clean; full engine test green (14714 lib + 1721
integration, 0 failures).
Model: claude-sonnet-5 (Claude Code)
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
matthewevans
left a comment
There was a problem hiding this comment.
Thanks for the focused fix. I’m requesting one test/evidence change before this can be approved.
[MED] The new tests bypass the classifier path that caused the bug. Evidence: crates/engine/src/parser/oracle_classifier.rs:727 adds the long-form replacement classifier, but the added tests at crates/engine/src/parser/oracle_replacement.rs:12246 call parse_replacement_line(...) directly. Why it matters: reverting only the classifier change would still leave these tests passing, so they do not prove the original full-Oracle fallthrough is fixed. Suggested fix: add a full parse_oracle_text/card-data coverage test for Lands you control enter the battlefield untapped. that fails if the line does not route through is_replacement_pattern, and wait for the current-head coverage-parse-diff sticky before requesting re-review.
For first-time engine/parser PRs, please also make sure the PR evidence follows docs/AI-CONTRIBUTOR.md so the review can verify the production route, not just the helper parser.
Parse changes introduced by this PR · 1 card(s), 2 signature(s) (baseline: main
|
Summary
Fixes
Vigorous Farming("Lands you control enter the battlefield untapped.") falling through toUnimplemented.Root cause: the untapped-entry counterpart of the gap fixed in #4988 (tapped-entry). CR 614.1c external-entry replacement effects are templated by WotC in both a short form ("enter untapped") and the fully-spelled long form ("enter the battlefield untapped"). Only the short form was recognized, so Vigorous Farming's Oracle text fell through to
Unimplemented.Mirrors the tapped-side fix in the same two gates, this time for the untapped state:
oracle_classifier::is_replacement_pattern: added the long-form untapped suffix.oracle_replacement::parse_external_entry_suffix: added long-form" enter(s) the battlefield untapped"arms, mirroring the existing short-form arms.This PR is independent of #4988 (different insertion points in the same functions; cherry-picked cleanly onto current
mainwith no overlap).Changes
crates/engine/src/parser/oracle_classifier.rs: classify the long-form untapped suffix as a replacement pattern.crates/engine/src/parser/oracle_replacement.rs: peel the long-form untapped suffix inparse_external_entry_suffix. Added parser tests for the real card (Vigorous Farming, single-type subject) and the controller-scoped Or-filter subject shape.Test plan
vigorous_farming_enters_the_battlefield_untapped_long_form,opponents_control_enters_the_battlefield_untapped_long_formspelunking_lands_you_control_enter_untapped,archelos_untapped_other_permanents_enter_untappedstill passclippy -D warningscleanenginetest suite green (14714 lib + 1721 integration tests, 0 failures)Model: claude-sonnet-5 (Claude Code)