8000 improves the reliability and clarity of the "successful save halves damage" test for Fireball by Mnehmos · Pull Request #6 · Mnehmos/mnehmos.rpg.mcp · GitHub
[go: up one dir, main page]

Skip to content

improves the reliability and clarity of the "successful save halves damage" test for Fireball - #6

Merged
Mnehmos merged 3 commits into
stagingfrom
main
Dec 13, 2025
Merged

Mnehmos merged 3 commits into
stagingfrom
main

Conversation

@Mnehmos
@Mnehmos Mnehmos commented Dec 13, 2025
Copy link
Copy Markdown
Owner

This pull request improves the reliability and clarity of the "successful save halves damage" test for Fireball in the spellcasting test suite. The test now uses a retry mechanism to reduce flakiness due to randomness and ensures that the wizard's spell slot usage matches SRD constraints. Additionally, the random seed is made unique per retry to further reduce the chance of repeated failures.

Test reliability and determinism improvements:

  • Added a retry mechanism (retry: 5) to the Fireball save test to minimize flakiness from random number generation, and updated comments to clarify the probability of test failure.
  • Changed the random seed in handleCreateEncounter to include a timestamp, ensuring each retry uses a different RNG sequence.

Test logic and clarity improvements:

  • Adjusted the wizard's spell slot setup to match SRD constraints for a level 5 wizard, and limited Fireball casts to two per test run.
  • Simplified the test flow by removing unnecessary warnings and checks, and clarified the expectation that at least one successful save should occur (with retries if necessary).

@Mnehmos
Mnehmos merged commit b489e36 into staging Dec 13, 2025
6 checks passed
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

0