feat(parser): compound bare-color cost-mod subject "<color> spells and <color> spells cost less" (Prophecy Familiar cycle)#5138
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for parsing compound bare-color cost-modification subjects (e.g., 'Blue spells and red spells') in static abilities, mapping them to an Or of HasColor filters. This change correctly handles the Prophecy Familiar cycle and prevents color restrictions from being silently dropped. A unit test has been added to verify this behavior. I have no feedback to provide as there are no review comments and the implementation is clean and compliant with the repository's guidelines.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
Initial code pass did not turn up a blocker in the touched parser seam, but I am holding approval/enqueue until the parser/card-level evidence exists for this head. This PR changes parser source, and right now the parse-diff sticky is absent while card-data is still running, so I cannot verify the card-level blast radius yet. Please also fill in the PR proof sections so the summary, files changed, track, LLM usage, and verification are visible from the PR itself. |
…d <color> spells cost less" (Prophecy Familiar cycle)
The Familiar cycle — Nightscape ("Blue spells and red spells you cast cost {1}
less to cast"), Stormscape, Sunscape, Thornscape, Thunderscape Familiar — used a
two-BARE-color compound subject that fell through both the single-bare-color path
(parse_named_color) and parse_type_phrase (which only decomposes compounds whose
operands carry a type noun). The subject resolved to None, silently DROPPING the
color restriction so EVERY spell was cheapened, not just the two colors.
Add parse_cost_mod_compound_color_subject in oracle_static/static_helpers.rs:
decompose "<color>[ spells] and <color>[ spells]" (>=2 colors, full consumption)
into the same Or of HasColor typed filters the noun-bearing compounds already
produce. A lone bare color and noun-bearing operands both decline and fall
through unchanged. No new variant, no new runtime.
CR 105.1 (colors) + CR 601.2f (cost modification).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ea8dcd0 to
c95971e
Compare
|
Filled in the PR proof sections (Summary / Files changed / CR references / Track / LLM / Verification / Scope Expansion / Validation Failures / CI Failures) on this head ( On the parser/card-level evidence: this was previously behind on |
Parse changes introduced by this PR✓ No card-parse changes detected. |
|
The current head is green, but I am holding this rather than approving because the card-level evidence now contradicts the PR's stated impact. The PR says this should narrow the five Prophecy Familiar-cycle cards, and the author follow-up expected those five card parses to change. The current Please either explain why the real card parse output is unchanged despite the bug claim, or adjust the PR to make the intended card-level change visible. A parser unit test alone is not enough for approval when the claimed production card impact is absent from the parse-diff evidence. |
matthewevans
left a comment
There was a problem hiding this comment.
[MED] The PR's claimed card-level fix is not present in the parse-diff evidence. Evidence: the current coverage-parse-diff sticky for head c95971e2cfe99b5ce844d3579742791b9b23aaf4 says No card-parse changes detected, while the PR body/follow-up says the five Prophecy Familiar-cycle cards should narrow from all spells to their two colors. Why it matters: for parser-source changes, the card-level diff is required review evidence; a unit test alone does not prove the claimed production card impact. Suggested fix: either make the intended real card parse change visible in parse-diff, or explain/retitle the PR as a regression-test-only change with evidence for why current production card data is already correct.
|
The real card parse output is changed — the I verified the actual card-level blast radius by running the full Baseline
This PR head (c95971e) — fixed:
So the fix does change real card data; the parse-diff simply can't see inside |
matthewevans
left a comment
There was a problem hiding this comment.
Reviewed the follow-up against head c95971e2cfe99b5ce844d3579742791b9b23aaf4.
The earlier block is resolved: the coverage parse-diff sticky is blind to StaticMode::ModifyCost.spell_filter, and the PR's code/test prove the real parser output changes from spell_filter: None to an Or of HasColor filters for the Prophecy Familiar bare-color compound subject. The change is local to the existing cost-mod parser seam, uses existing typed filters and nom parsing, CI is green, and the added parser-pipeline assertion would fail if the color restriction were still dropped.
Summary
Adds parser support for compound bare-color cost-modification subjects —
"<color>[ spells] and <color>[ spells] cost {N} less to cast"— used by the Prophecy Familiar cycle (Nightscape, Stormscape, Sunscape, Thornscape, Thunderscape Familiar). The two-bare-color compound subject fell through both the single-bare-color path andparse_type_phrase(which only decomposes compounds whose operands carry a type noun), so the subject resolved toNoneand the color restriction was silently dropped — cheapening every spell instead of only the two colors. This is a rules bug, not just a coverage miss. Decomposes the subject into the sameOrofHasColortyped filters the noun-bearing compounds already produce. No new variant, no new runtime.Files changed
crates/engine/src/parser/oracle_static/static_helpers.rscrates/engine/src/parser/oracle_static/tests.rsCR references
CR 105.1— the five colors (the bare-color operands)CR 601.2f— cost modification applied while casting the affected spellsTrack
Developer
LLM
Model: claude-opus-4-8
Thinking: high
Verification
Card-level before/after (full
parse_oracle_textpipeline, Nightscape Familiar, run on both refs):ModifyCost.spell_filtermain8d46028NoneSome(Or{ Typed{Card, HasColor Blue}, Typed{Card, HasColor Red} })CI on this head — all green:
Rust lint (fmt, clippy, parser gate)— ✅ SUCCESS (fmt,clippy -D warnings, parser-combinator gate)Rust tests (shard 1/2 + 2/2)— ✅ SUCCESS; includesstatic_compound_bare_color_spells_cost_less_narrows_to_or_of_colorsasserting theOr{HasColor Blue, HasColor Red}spell_filterCard data (generate, validate, coverage)— ✅ SUCCESSWASM/Tauri/Frontend/Lobby worker— ✅ SUCCESSScope Expansion
None.
Validation Failures
None.
CI Failures
None.