Skip to content

fix: reset in between prop tests to fix flakiness#7252

Open
brice-stacks wants to merge 2 commits into
stacks-network:developfrom
brice-stacks:fix/sip-031-prop
Open

fix: reset in between prop tests to fix flakiness#7252
brice-stacks wants to merge 2 commits into
stacks-network:developfrom
brice-stacks:fix/sip-031-prop

Conversation

@brice-stacks
Copy link
Copy Markdown
Contributor

Otherwise, it was possible for the simnet and the model to get out of sync, causing flakiness in the tests.

Description

Applicable issues

  • fixes #

Additional info (benefits, drawbacks, caveats)

Checklist

  • Test coverage for new or modified code paths
  • For new Clarity features or consensus changes, add property tests (see docs/property-testing.md)
  • Changelog fragment(s) or "no changelog" label added (see changelog.d/README.md)
  • Required documentation changes (e.g., rpc/openapi.yaml for RPC endpoints, event-dispatcher.md for new events)
  • New clarity functions have corresponding PR in clarity-benchmarking repo

Otherwise, it was possible for the simnet and the model to get out of
sync, causing flakiness in the tests.
@brice-stacks
Copy link
Copy Markdown
Contributor Author

Fixes #7251

@brice-stacks brice-stacks linked an issue May 29, 2026 that may be closed by this pull request
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the SIP-031 stateful property test to reset simnet state between fast-check runs, preventing the model and simulated chain from drifting across generated cases.

Changes:

  • Converts the stateful property test to async and reinitializes simnet before each generated command sequence.
  • Recreates the model per property iteration while sharing command statistics across runs.
  • Updates command-run reporting to accept the statistics map directly.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
contrib/core-contract-tests/tests/sip-031/sip-031.stateful.prop.test.ts Adds per-run simnet reset and per-run model initialization for the SIP-031 stateful property test.
contrib/core-contract-tests/tests/sip-031/commands/utils.ts Adjusts command-run reporting to consume the shared statistics map directly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread contrib/core-contract-tests/tests/sip-031/sip-031.stateful.prop.test.ts Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flakiness in SIP-031 prop tests

2 participants