Skip to content

Fix Raubahn, Bull of Ala Mhigo - #7399

Merged
matthewevans merged 6 commits into
phase-rs:mainfrom
keloide:fix/raubahn-ward-power-cost
Aug 14, 2026
Merged

Fix Raubahn, Bull of Ala Mhigo#7399
matthewevans merged 6 commits into
phase-rs:mainfrom
keloide:fix/raubahn-ward-power-cost

Conversation

@keloide

@keloide keloide commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Address maintainer review feedback by repairing Raubahn's regression test against the engine's real combat and trigger authorities, and removing unrelated generic Ward parser changes. The base parser already normalizes Raubahn's name to ~ and supports its source-power Ward cost; this PR now provides compiling regression evidence and removes the stale backlog entry.

Files changed

  • crates/engine/tests/integration/main.rs — registers the Raubahn integration test.
  • crates/engine/tests/integration/raubahn_bull_of_ala_mhigo.rs — full-card parser, combat target-slot, and runtime Ward coverage using CombatState and trigger_definitions.
  • docs/parser-misparse-backlog.md — removes the already-supported card from root cause 16.

Track

Developer

LLM

Model: gpt-5.6
Tier: Frontier
Thinking: high

Implementation method (required)

Method: /engine-implementer

CR references

CR 702.21a (Ward) and CR 608.2h (current information/LKI at resolution).

Verification

  • Required checks ran clean, or the exact CI-owned alternative is stated below.

  • Gate A output below is for the current committed head.

  • Final review-impl below is clean for the current committed head.

  • Both anchors cite existing analogous code at the same implementation seams.

  • cargo fmt --all — PASS.

  • git diff --check — PASS.

  • ./scripts/check-parser-combinators.sh — PASS; Gate A output below.

  • cargo test -p phase-engine --test integration raubahn_bull_of_ala_mhigo --no-fail-fast — local compiler was terminated by SIGTERM while compiling phase-engine; CI-owned replacement run is pending.

  • Current-head parse-diff accounting — no production parser file is changed in this follow-up, so no card parse behavior is intentionally changed; the CI card-data/coverage job will provide the current-head artifact.

Gate A

Gate A PASS head=cfe998add675f208737916ef8b9a36f800360cad base=e2355987c9a89fee6a8b9c6b39d9bbb7641ac45d

Anchored on

  • crates/engine/tests/integration/incredible_hulk_enrage_attacking.rs:109 — existing live-combat regression setup uses state.combat = Some(CombatState { ... }) with AttackerInfo.
  • crates/engine/tests/integration/infantry_shield_mobilize_grant.rs:74 — existing live-trigger regression reads trigger_definitions.iter_unchecked() and the stored trigger definition.
  • crates/engine/tests/integration/issue_3864_swords_two_targets.rs:36 — existing integration coverage builds production target slots with build_target_slots and asserts their legal targets.

Final review-impl

Final review-impl PASS head=cfe998add675f208737916ef8b9a36f800360cad

Claimed parse impact

None. The base parser already supports Raubahn's normalized source-power Ward payload; this follow-up changes only regression coverage and backlog bookkeeping.

Scope Expansion

None.

Validation Failures

  • cargo test -p phase-engine --test integration raubahn_bull_of_ala_mhigo --no-fail-fast — the local rustc process compiling phase-engine was terminated by signal 15 before producing Rust diagnostics. The corrected test source now uses existing CombatState and trigger_definitions fields.

CI Failures

The prior CI run failed with E0609 for the nonexistent test fields, which this head fixes. Replacement Rust lint/card-data/test checks are pending on the updated head.

Summary by CodeRabbit

  • Bug Fixes

    • Corrected parsing for Raubahn, Bull of Ala Mhigo’s dynamic Ward and attack-trigger abilities.
    • Improved handling of optional Equipment targets and required attacking-creature targets.
    • Ensured valid target slots are constructed for affected abilities.
  • Tests

    • Added regression coverage to prevent related parsing issues from returning.
  • Documentation

    • Updated the parser mis-tokenization backlog to reflect the resolved issue.

@keloide
keloide requested a review from matthewevans as a code owner August 14, 2026 15:43
@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 9a5d5eb2-5c6c-4616-9cce-97dd6b1fbe2a

📥 Commits

Reviewing files that changed from the base of the PR and between 0fd87c1 and c213804.

📒 Files selected for processing (1)
  • docs/parser-misparse-backlog.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/parser-misparse-backlog.md

📝 Walkthrough

Walkthrough

The PR adds Raubahn integration tests for dynamic Ward parsing and attack-trigger target construction. It registers the test module and removes Raubahn from the parser misparse backlog.

Changes

Raubahn integration coverage

Layer / File(s) Summary
Oracle parsing and target scenarios
crates/engine/tests/integration/raubahn_bull_of_ala_mhigo.rs, crates/engine/tests/integration/main.rs
The integration binary registers the new test module. Tests validate dynamic Ward parsing and ordered optional Equipment and required attacking-creature target slots.
Parser backlog update
docs/parser-misparse-backlog.md
The backlog count changes from 84 to 83, and Raubahn is removed from the card list.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to c2138

This PR adds localized Raubahn regression coverage and updates parser backlog documentation without changing production behavior; no actionable merge-blocking risk remains beyond normal checks and review.

Possibly related PRs

  • phase-rs/phase#6974: Covers parsing and testing attack-trigger target scopes in oracle_trigger, including dynamic attacking-creature targets.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title identifies the Raubahn regression addressed by the added coverage and backlog update.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@matthewevans matthewevans self-assigned this Aug 14, 2026
@matthewevans matthewevans added the bug Bug fix label Aug 14, 2026

@matthewevans matthewevans left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request changes — the current head has two blocking gaps.

🔴 Blocker

crates/engine/tests/integration/raubahn_bull_of_ala_mhigo.rs:130 writes GameObject.combat_status, and :134 reads GameObject.triggers; neither field exists. The current-head Rust lint and card-data jobs both fail with E0609 at those exact lines, so the integration test binary and card-data pipeline cannot build. Model combat through GameState.combat / CombatState and obtain the live trigger via trigger_definitions (and its definition reference) rather than nonexistent object fields.

🔴 Blocker

The claimed Raubahn parser behavior is already present in the base: crates/engine/src/parser/oracle_keyword.rs:732-744 recognizes the source-power Ward payload, and crates/engine/src/parser/oracle.rs:4135-4144 normalizes Raubahn's name to ~. This diff instead changes the generic Ward fallback at oracle_keyword.rs:746-830; for example it changes handling of Ward—discard a card at random (Alpharael). There is no current-head <!-- coverage-parse-diff --> artifact and no production test or parse accounting for that actual generic delta.

Recommendation: repair the test against the real combat/trigger authorities, then provide current-head parse-diff accounting and discriminating production evidence for every changed Ward payload class.

@matthewevans matthewevans removed their assignment Aug 14, 2026
@matthewevans matthewevans self-assigned this Aug 14, 2026
Preserve the current shared-engine P2P host authority introduced by phase-rs#7398 while retaining Raubahn Ward regression coverage.

Co-authored-by: @Lcola98 <75585494+keloide@users.noreply.github.com>
@matthewevans

Copy link
Copy Markdown
Member

Maintainer port complete — awaiting fresh current-head evidence.

This PR is now at cf1b211dad2dfbbc0bee9395b91ba3926c7780bc. I merged current main while preserving #7399's Raubahn regression coverage and the shared-engine P2P host authority from merged #7398; the final PR diff has no adapter/WASM host-path changes.

Please let CI and the <!-- coverage-parse-diff --> artifact complete for this exact head. The PR is deliberately not approved or enqueued; it will be re-reviewed once those current-head results are available.

Co-authored-by: Lcola98 <75585494+Lcola98@users.noreply.github.com>
@matthewevans matthewevans added test Add tests and removed bug Bug fix labels Aug 14, 2026
@matthewevans

Copy link
Copy Markdown
Member

Maintainer fixup 0fd87c12178f07cfe525722ac7d70c97096d22b9 removes the duplicate generic source-power Ward runtime test while retaining Raubahn’s parser and optional-Equipment/required-attacker coverage. The final PR is test/docs-only, so no coverage parse-diff is expected or required. Required CI is now running for this exact head; after it settles, the PR will be rechecked before any approval or enqueue.

Co-authored-by: Lcola98 <75585494+Lcola98@users.noreply.github.com>

@matthewevans matthewevans left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved for merge queue at c213804: the test-only Raubahn regression coverage is clean, and the Category 16 summary now matches its 83-card list.

@matthewevans
matthewevans enabled auto-merge August 14, 2026 19:07
@matthewevans matthewevans removed their assignment Aug 14, 2026
@matthewevans
matthewevans added this pull request to the merge queue Aug 14, 2026
Merged via the queue into phase-rs:main with commit cb40225 Aug 14, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Add tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants