Skip to content

ship/storm ci review followups - #7044

Merged
matthewevans merged 7 commits into
mainfrom
ship/storm-ci-review-followups
Aug 5, 2026
Merged

ship/storm ci review followups#7044
matthewevans merged 7 commits into
mainfrom
ship/storm-ci-review-followups

Conversation

@matthewevans

@matthewevans matthewevans commented Aug 5, 2026

Copy link
Copy Markdown
Member
  • chore(ai): refresh decision cost baseline
  • fix(storm): address review and perf gate findings

Summary by CodeRabbit

  • New Features

    • Added a consistent Storm copy-count badge across hand, held-card, and drawer views.
    • Added tooltip support for Storm copy counts.
  • Bug Fixes

    • Improved triggered-ability handling for effects that copy triggers, including cases involving permanents that change zones.
    • Corrected interactions between Storm and trigger-doubling effects so copies are created appropriately.
    • Improved accuracy when determining the source of copied triggered abilities.

@matthewevans
matthewevans enabled auto-merge August 5, 2026 21:20
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@matthewevans, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 29 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0e8518e5-2baa-4102-a7e9-320ec4fb2a0e

📥 Commits

Reviewing files that changed from the base of the PR and between 2a4663c and a350494.

📒 Files selected for processing (2)
  • crates/engine/src/game/triggers.rs
  • crates/engine/tests/integration/veyran_storm_source_scope.rs
📝 Walkthrough

Walkthrough

The PR adds a reusable storm-copy badge to hand views and updates engine trigger doubling to use captured source context and LKI snapshots. Integration tests cover Veyran’s handling of controlled cast triggers and creature spell self-triggers.

Changes

Storm-copy badge UI

Layer / File(s) Summary
Shared storm-copy badge integration
client/src/components/hand/StormCopyBadge.tsx, client/src/components/hand/MobileHandDrawer.tsx, client/src/components/hand/MobileHeldHandCard.tsx, client/src/components/hand/PlayerHand.tsx
Adds StormCopyBadge with drawer, held, and fan variants. Hand components use it instead of inline storm-copy markup and remove unused translation hooks.

Storm trigger source scope

Layer / File(s) Summary
Source-aware trigger doubling
crates/engine/src/game/triggers.rs
Doubler filters validate captured source zone and incarnation. Battlefield-dependent filters use live objects or LKI snapshots.
Storm source regression coverage
crates/engine/tests/integration/veyran_storm_source_scope.rs, crates/engine/tests/integration/granted_storm_snapshot.rs, crates/engine/src/parser/oracle_static/tests.rs
Tests cover controlled cast triggers and creature spell self-triggers. Rule comments and citations are updated.
Performance baseline refresh
crates/phase-ai/baselines/perf-baseline.json
Updates the baseline revision, card-data hash, counters, and wall-clock measurement.

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

Sequence Diagram(s)

sequenceDiagram
  participant Veyran
  participant TriggerDoubling
  participant CapturedSource
  participant LkiSnapshot
  Veyran->>TriggerDoubling: evaluate trigger source
  TriggerDoubling->>CapturedSource: check zone and incarnation
  CapturedSource->>LkiSnapshot: use LKI when source left battlefield
  LkiSnapshot-->>TriggerDoubling: return source filter match
  TriggerDoubling-->>Veyran: apply doubling decision
Loading

Possibly related PRs

Suggested labels: bug

🚥 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 Storm-related review follow-ups and CI changes, which are present in the pull request.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ship/storm-ci-review-followups

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: 2

🤖 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/game/triggers.rs`:
- Around line 7805-7843: Update trigger_source_matches_doubler_filter so a
missing trigger.ability.trigger_source falls back to matches_target_filter
against the live trigger.source_id when the source is still available, instead
of immediately returning false; preserve the existing captured-context and LKI
handling when source context exists.

In `@crates/engine/tests/integration/veyran_storm_source_scope.rs`:
- Around line 65-93: Add an integration test alongside
veyran_does_not_double_cast_trigger_of_permanent_spell that removes Veyran
before the cast-trigger doubling step, using cast(...).commit() to exercise the
LKI path. Assert the trigger source is evaluated from its last-known battlefield
state and the controlled permanent’s cast trigger is doubled, while preserving
the existing non-doubling coverage.
🪄 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: 4d0a553b-ca05-476f-8349-7358b21b0b79

📥 Commits

Reviewing files that changed from the base of the PR and between 0db6292 and ad31f49.

📒 Files selected for processing (9)
  • client/src/components/hand/MobileHandDrawer.tsx
  • client/src/components/hand/MobileHeldHandCard.tsx
  • client/src/components/hand/PlayerHand.tsx
  • client/src/components/hand/StormCopyBadge.tsx
  • crates/engine/src/game/triggers.rs
  • crates/engine/src/parser/oracle_static/tests.rs
  • crates/engine/tests/integration/granted_storm_snapshot.rs
  • crates/engine/tests/integration/veyran_storm_source_scope.rs
  • crates/phase-ai/baselines/perf-baseline.json

Comment thread crates/engine/src/game/triggers.rs
Comment thread crates/engine/tests/integration/veyran_storm_source_scope.rs
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Generated for head a350494e510e8c12a2be850378cbb71a8b782de1.

Parse changes introduced by this PR

✓ No card-parse changes detected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant