Skip to content

Add Exuberant Wolfbear - #7204

Merged
matthewevans merged 2 commits into
phase-rs:mainfrom
keloide:card/exuberant-wolfbear
Aug 10, 2026
Merged

Add Exuberant Wolfbear#7204
matthewevans merged 2 commits into
phase-rs:mainfrom
keloide:card/exuberant-wolfbear

Conversation

@keloide

@keloide keloide commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds parser support for Exuberant Wolfbear's inverted-transitive base power/toughness trigger. The target is parsed through the existing target grammar, so only a controlled Human is selected and the temporary P/T change uses the existing continuous-effect pipeline.

Files changed

  • crates/engine/src/parser/oracle_effect/subject.rs
  • crates/engine/src/parser/oracle_tests.rs
  • crates/engine/tests/integration/exuberant_wolfbear_base_pt_target.rs
  • crates/engine/tests/integration/main.rs

Track

Developer

LLM

Model: gpt-5-6
Tier: Frontier
Thinking: high

Implementation method (required)

Method: /engine-implementer

CR references

CR 603.2, CR 603.3d, CR 603.5, CR 115.1, CR 208.1, CR 613.4b, and CR 514.2.

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 seam.

  • cargo fmt --all — PASS

  • git diff --check — PASS

  • ./scripts/check-parser-combinators.shGate G PASS; Gate A PASS head=6066103d48d5abca7d8cbc7565bae68e48b497c9 base=ee76bc54aee4941f20c126b49c5d6b54a36d86c5

  • cargo test -p phase-engine exuberant_wolfbear --librustc terminated with SIGTERM before test execution; no compiler diagnostics (recorded below).

Gate A

Gate A PASS head=6066103d48d5abca7d8cbc7565bae68e48b497c9 base=ee76bc54aee4941f20c126b49c5d6b54a36d86c5

Anchored on

  • crates/engine/src/parser/oracle_effect/subject.rs:1136 — existing base-P/T clause parser owns axes, value lowering, target threading, and GenericEffect emission.
  • crates/engine/src/parser/oracle_effect/subject.rs:3531 — existing subject_filter_application preserves target-versus-mass semantics.

Final review-impl

Final review-impl PASS head=6066103d48d5abca7d8cbc7565bae68e48b497c9

Claimed parse impact

Exuberant Wolfbear.

Scope Expansion

None.

Validation Failures

None.

CI Failures

cargo test -p phase-engine exuberant_wolfbear --lib could not complete because the environment terminated the phase-engine rustc process with signal: 15, SIGTERM after compilation began. No test result or compiler diagnostic was emitted. Tilt was unavailable (exit 127).

Summary by CodeRabbit

  • New Features

    • Improved support for targeted base power and toughness changes.
    • Added support for effects that modify a target’s base power and toughness until end of turn.
  • Bug Fixes

    • Correctly handles optional attack triggers and legal target selection.
    • Ensures effects apply only to eligible targets and can be declined without unintended changes.
  • Tests

    • Added regression and integration coverage for these behaviors.

@keloide
keloide requested a review from matthewevans as a code owner August 10, 2026 12:30
@coderabbitai

coderabbitai Bot commented Aug 10, 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: 1b6334da-8f74-441e-b6c6-9db66f5533d1

📥 Commits

Reviewing files that changed from the base of the PR and between 6066103 and d9c6f01.

📒 Files selected for processing (1)
  • crates/engine/tests/integration/exuberant_wolfbear_base_pt_target.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • crates/engine/tests/integration/exuberant_wolfbear_base_pt_target.rs

📝 Walkthrough

Walkthrough

The parser now supports explicit-target inverted-genitive base power and toughness effects. Tests cover Exuberant Wolfbear targeting, duration, optional resolution, cleanup, and unsupported durationless forms.

Changes

Targeted base power and toughness effects

Layer / File(s) Summary
Targeted inverted-genitive parser support
crates/engine/src/parser/oracle_effect/subject.rs
The subject parser recognizes explicit target syntax, preserves the target application, and routes it through base power and toughness effect construction.
Parser and integration validation
crates/engine/src/parser/oracle_tests.rs, crates/engine/tests/integration/exuberant_wolfbear_base_pt_target.rs, crates/engine/tests/integration/main.rs
Tests cover Exuberant Wolfbear’s target legality, dynamic values, end-of-turn duration, optional resolution, cleanup, and unsupported Brine Hag parsing. The integration module is registered.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant OracleEffectParser
  participant SubjectParser
  participant TargetParser
  participant BasePtEffect
  participant IntegrationTest
  OracleEffectParser->>SubjectParser: parse base power and toughness subject
  SubjectParser->>TargetParser: parse explicit target syntax
  TargetParser-->>SubjectParser: return target filter and target slot
  SubjectParser->>BasePtEffect: construct targeted modification
  IntegrationTest->>BasePtEffect: apply effect to selected Human
  BasePtEffect-->>IntegrationTest: retain values until end of turn
Loading

Possibly related PRs

  • phase-rs/phase#6220: Both PRs modify oracle-effect parsing and target-scoped power/toughness handling.

Suggested labels: enhancement, needs-maintainer

Suggested reviewers: matthewevans

🚥 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 clearly identifies the primary change: adding parser and integration support for Exuberant Wolfbear.
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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/engine/src/parser/oracle_effect/subject.rs`:
- Around line 1218-1225: Extend the effect model and lowering path to represent
descriptor-scoped, untargeted continuous effects with typed indefinite duration
provenance and an affected set captured when the effect begins. Update the
descriptor handling around the target-syntax gate in
crates/engine/src/parser/oracle_effect/subject.rs:1218-1225 to lower this
grammatical class instead of returning None, while preserving targeted
explicit-duration behavior. Update
crates/engine/src/parser/oracle_tests.rs:2939-2958 to assert the non-targeted
indefinite continuous representation rather than Unimplemented.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 186fbb8a-3f75-434b-91ca-80894e065eee

📥 Commits

Reviewing files that changed from the base of the PR and between ee76bc5 and 6066103.

📒 Files selected for processing (4)
  • crates/engine/src/parser/oracle_effect/subject.rs
  • crates/engine/src/parser/oracle_tests.rs
  • crates/engine/tests/integration/exuberant_wolfbear_base_pt_target.rs
  • crates/engine/tests/integration/main.rs

Comment thread crates/engine/src/parser/oracle_effect/subject.rs
@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown

Generated for head d9c6f01338e32a89801c5d9675b34bb911be80de.

Parse changes introduced by this PR · 1 card(s), 2 signature(s) (baseline: main ee76bc54aee4)

🟢 Added (1 signature)

  • 1 card · ➕ ability/set base power dynamic, set base toughness dynamic · added: set base power dynamic, set base toughness dynamic (affects=parent target, duration=until end of turn, grants=set base power dynamic, grants=set base toughness…
    • Affected (first 3): Exuberant Wolfbear

🔴 Removed (1 signature)

  • 1 card · ➖ ability/change · removed: change (duration=until end of turn)
    • Affected (first 3): Exuberant Wolfbear

@matthewevans matthewevans self-assigned this Aug 10, 2026
@matthewevans

Copy link
Copy Markdown
Member

Maintainer follow-up for d9c6f01.

I pushed a focused test fixup after confirming the two failed Rust shards: the test expected the optional-resolution prompt before trigger target selection, but the engine correctly surfaces TriggerTargetSelection first. The updated test selects the legal controlled Human, then reaches and answers the you-may prompt.

I also reviewed CodeRabbit’s Brine Hag suggestion. This PR is correctly scoped to the explicit-target, until-end-of-turn form. Brine Hag’s descriptor-scoped indefinite effect needs a separate permanent-duration plus resolution-time affected-set primitive; lowering it through this target-slot change would be wrong, so the existing explicit unsupported-coverage test remains appropriate.

This is not an approval: I am holding for the required CI and the current-head parse-diff artifact to regenerate before the final review/enqueue decision.

@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: the parser uses the existing target grammar and continuous-effect seam; current-head parse diff is limited to Exuberant Wolfbear, the runtime integration coverage is discriminating, and current-head CI is green.

@matthewevans matthewevans added enhancement New feature or request quality For high-quality minimal to no-churn PRs labels Aug 10, 2026
@matthewevans
matthewevans added this pull request to the merge queue Aug 10, 2026
@matthewevans matthewevans removed their assignment Aug 10, 2026
Merged via the queue into phase-rs:main with commit 9dc3970 Aug 10, 2026
13 checks passed
@keloide keloide mentioned this pull request Aug 10, 2026
4 tasks
This was referenced Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request quality For high-quality minimal to no-churn PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants