Skip to content

test(spells): isolate health assertions from regeneration - #442

Merged
Mathih13 merged 1 commit into
mainfrom
fix/scripted-noop-fixture-regeneration
Sep 7, 2026
Merged

Mathih13 merged 1 commit into
mainfrom
fix/scripted-noop-fixture-regeneration

Conversation

@Mathih13

@Mathih13 Mathih13 commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Scheduled regeneration could change the no-op spell fixture's target from 50 health to 52 before its assertion. The heal fixture also capped health at the expected result, which could hide an incorrect heal amount.

Keep exact health and power readings stable by placing the fixtures in combat before setting their baselines. Preserve existing unit flags and leave headroom above the expected heal result. All assertions remain exact.

Verification:

  • A controlled five-second delay reproduced the failure, then passed after the fix.
  • All four scripted spell tests passed against private Standalone nodes.
  • Full ./lyracore preflight, focused formatting, and diff checks passed.

This fixes the durable CI failure found while validating #419. No production realm was accessed.

Implemented and reviewed by GPT-5.6 and GPT-6 in Codex.

Summary by CodeRabbit

  • Tests
    • Updated scripted spell effect test scenarios to prevent scheduled health regeneration for players and summoned wolves.
    • Improved healing and partial-failure test stability by consistently freezing regeneration during execution.

@coderabbitai

coderabbitai Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 7d83a2d3-64ad-45f7-a1df-64d9cd99a6f8

📥 Commits

Reviewing files that changed from the base of the PR and between afaf3f8 and c5ef477.

📒 Files selected for processing (1)
  • module/tests/scripted_spell_effect.rs

Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

Scripted spell effect integration tests now disable scheduled regeneration for players and spawned wolves. A generalized helper applies indefinite in-combat state to any entity. Healing and partial-failure fixtures also set explicit maximum health values.

Changes

Scripted spell effect test fixtures

Layer / File(s) Summary
Generalized regeneration prevention and test fixtures
module/tests/scripted_spell_effect.rs
The regeneration helper now accepts any entity GUID and preserves entity flags. Healing, no-op, script-gate, and partial-failure tests prevent scheduled regeneration for the relevant entities. The healing wolf uses a maximum health of 1000, and the partial-failure fixture sets wolf health directly.

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

Merge Risk: ⚪ Minimal · up to c5ef4

Scripted spell tests now isolate exact health assertions from scheduled regeneration for players and spawned wolves. No current merge-blocking risk is evident.

🚥 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 and concisely describes the main change: preventing regeneration from affecting scripted spell health assertions.
Docstring Coverage ✅ Passed Docstring coverage is 83.33% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 1 files.
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 fix/scripted-noop-fixture-regeneration

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

@Mathih13
Mathih13 merged commit 704ad73 into main Sep 7, 2026
7 checks passed
@Mathih13
Mathih13 deleted the fix/scripted-noop-fixture-regeneration branch October 11, 2026 18:20
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