Skip to content

test(module): control fixture timing in durable tests - #709

Merged
Mathih13 merged 1 commit into
mainfrom
test/durable-fixture-timing
Oct 15, 2026
Merged

Mathih13 merged 1 commit into
mainfrom
test/durable-fixture-timing

Conversation

@Mathih13

@Mathih13 Mathih13 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

The durable tests can fail when background timers change their state before the next assertion. Energize can lose its granted rage, and Duel health can regenerate past one. The Distract test also waits for two short movement legs to overlap across separate CLI reads.

Pause regeneration and combat-log expiry in the energize and Duel fixtures. For Distract, start two nearby movement legs with controlled durations while creature ticks are paused, cast the real spell, then resume creature ticks. The test still checks the hold, expiry, patrol resumption and cancellation on Engagement.

The CI failures occurred in energize, Duel and Distract. This PR changes only test fixtures.

What you verified

  • All six durable tests in combat_log, duel_killing_blow and distract passed against private SpacetimeDB instances.
  • Temporary read delays reproduced the energize and Duel assertion failures before the fixes and passed with the fixes. A five-second delay before the Distract cast also passed. These diagnostic delays are not committed.
  • Workspace formatting and strict Clippy for the three test targets passed.
  • Independent Astra adversarial review found no actionable findings. It traced the real cast, melee and movement paths and checked that the assertions still depend on them.
  • All nine CI checks passed at c8deddd5, including the full durable suite and Rust checks.
  • Comment review passed for the three changed tests and their surrounding code. No comments were added or removed.

What you did not verify

These fixtures do not establish real-client behavior. The Distract fixture seeds the initial movement legs; it checks their interruption and scheduled resumption, not random selection of the initial legs.

Model: GPT-6 Astra, using Codex through T3 Code. GPT-6.1 Sol independently diagnosed the energize and Duel races.

@Mathih13
Mathih13 merged commit 67f5d83 into main Oct 15, 2026
9 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