test(parser): snapshot CastingRestriction, SolveCondition, and StriveCost item variants#5477
Conversation
…Cost item variants `CastingRestriction`, `SolveCondition`, and `StriveCost` are producible `OracleItemIr` variants that no lowered snapshot in this crate populated. Across every `*_lowered.snap` here and every `ParsedAbilities` snapshot in `parser/snapshots/`, `casting_restrictions` was always empty and `solve_condition` / `strive_cost` were always null. That is a hole in the parity oracle exactly where upcoming work lands: the source-order document builder rewrites the `OracleItemIr` -> `ParsedAbilities` fold, so without these three the fold could silently drop any of them and every existing snapshot would still pass. `result.strive_cost` is additionally re-read as a skip guard in the main line loop (`oracle.rs:4267`), so dropping it would change control flow, not just a serialized field. Fixtures use verbatim Oracle text: - Champion's Victory - casting restriction + bounce - Case of the Crimson Pulse - solve condition (CR 719.1) - Aerial Formation - strive cost Tests only; no production code touched.
There was a problem hiding this comment.
Code Review
This pull request adds three new snapshot tests (champions_victory, case_of_the_crimson_pulse, and aerial_formation) to crates/engine/src/parser/oracle_ir/snapshot_tests.rs to improve parity-oracle coverage for otherwise-unsnapshotted document item variants (CastingRestriction, SolveCondition, and StriveCost). There are no review comments, and I have no feedback to provide.
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.
Parse changes introduced by this PR✓ No card-parse changes detected. |
CastingRestriction,SolveCondition, andStriveCostare producibleOracleItemIrvariants that no lowered snapshot in this crate populated.Across every
*_lowered.snaphere and everyParsedAbilitiessnapshot inparser/snapshots/,casting_restrictionswas always empty andsolve_condition/strive_costwere always null.That is a hole in the parity oracle exactly where upcoming work lands: the
source-order document builder rewrites the
OracleItemIr->ParsedAbilitiesfold, so without these three the fold could silently drop any of them and every
existing snapshot would still pass.
result.strive_costis additionally re-read as a skip guard in the main lineloop (
oracle.rs:4267), so dropping it would change control flow, not just aserialized field.
Fixtures use verbatim Oracle text:
Tests only; no production code touched.