Conversation
- Add canonical effect key `if_calm_draw_else_calm` for InnerPeace card - Keep `if_calm_draw_3_else_calm` as backwards-compatible alias - Update WATCHER_CARD_EFFECTS mapping to use canonical key - Add comprehensive tests for canonical effect: - Test: In Calm stance draws 3 cards (base) - Test: In Calm stance draws 4 cards (upgraded) - Test: From Neutral/Wrath enters Calm stance - Fix conftest.py to use dynamic project root path for worktrees Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
This PR is being reviewed by Cursor Bugbot
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| # Calm/Wrath conditionals | ||
| "if_calm_draw_3_else_calm": lambda s, c, cd, r: c.draw_cards(4 if c.is_upgraded else 3) if c.stance == "Calm" else c.change_stance("Calm"), | ||
| "if_calm_draw_else_calm": lambda s, c, cd, r: c.draw_cards(4 if c.is_upgraded else 3) if c.stance == "Calm" else c.change_stance("Calm"), | ||
| "if_calm_draw_3_else_calm": lambda s, c, cd, r: c.draw_cards(4 if c.is_upgraded else 3) if c.stance == "Calm" else c.change_stance("Calm"), # Alias |
There was a problem hiding this comment.
Duplicated lambda logic for alias instead of delegation
Low Severity
The if_calm_draw_3_else_calm alias duplicates the entire lambda logic instead of referencing the canonical if_calm_draw_else_calm handler. In cards.py, the alias correctly delegates to the main function, but here the logic is copy-pasted. Consider using _EFFECT_HANDLERS.get("if_calm_draw_else_calm") or a shared reference.


Summary
Test Results
7 InnerPeace tests passing
Files Changed
🤖 Generated with Claude Code
Note
Low Risk
Low-risk change scoped to Watcher effect naming and test setup; main risk is any remaining references to the old effect key, mitigated by keeping an alias in both the registry and executor dispatch table.
Overview
Fixes a Watcher
InnerPeaceeffect key mismatch by standardizing onif_calm_draw_else_calm(draw 3/4 in Calm, otherwise enter Calm) and updating the card-to-effects mapping to use the canonical name.Adds a backwards-compatible alias so existing callers of
if_calm_draw_3_else_calmcontinue to work (implemented in botheffects/cards.pyregistration andeffects/executor.pyhandler table), and expands tests to cover the canonical effect while making pytest imports path-independent.Written by Cursor Bugbot for commit acec475. This will update automatically on new commits. Configure here.