Skip to content

ci: proptest nightly#7023

Merged
federico-stacks merged 17 commits intostacks-network:developfrom
federico-stacks:ci/proptest-nightly
Apr 15, 2026
Merged

ci: proptest nightly#7023
federico-stacks merged 17 commits intostacks-network:developfrom
federico-stacks:ci/proptest-nightly

Conversation

@federico-stacks
Copy link
Copy Markdown
Contributor

@federico-stacks federico-stacks commented Mar 23, 2026

Description

This PR add proptest worflow that run all the proptests in the code base using an elevated case count.
In case of test execution failure:

  • the workflow saves the test regressions files as artifact and take them into account in a next run.
  • send a slack notification to the github-ci-nightly channel (a notification is also sent for unexpected worflow error)

This workflow add also support for proptest tests written with madhouse-rs setting the env variable MADHOUSE=1

Applicable issues

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 is updated
  • 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

@federico-stacks federico-stacks self-assigned this Mar 23, 2026
@BowTiedRadone
Copy link
Copy Markdown
Contributor

@federico-stacks It'd be a great idea to also run https://github.com/stacks-network/madhouse-rs tests as part of this nightly workflow. For example, #6912 adds some madhouse-rs scenario tests. We can pick a naming convention (e.g. prop_scenario_) and I can update them so they get picked up.

@federico-stacks
Copy link
Copy Markdown
Contributor Author

federico-stacks commented Mar 25, 2026

@federico-stacks It'd be a great idea to also run https://github.com/stacks-network/madhouse-rs tests as part of this nightly workflow. For example, #6912 adds some madhouse-rs scenario tests. We can pick a naming convention (e.g. prop_scenario_) and I can update them so they get picked up.

Actually if they are normal #[test] (as it seems to be), you can tag them with #[tag(t_prop)] (as described in the doc: https://github.com/stacks-network/stacks-core/blob/develop/docs/property-testing.md), and they would be gathered automatically.

@federico-stacks
Copy link
Copy Markdown
Contributor Author

@BowTiedRadone one more reasoning about the madhause-rs tests. would yhey be still dependent from PROPTEST_CASES env variable? Just wanted to undertand if we can threat them as "native" proptest tests, or if we could need a dedicated process.

@BowTiedRadone
Copy link
Copy Markdown
Contributor

@federico-stacks They depend on both PROPTEST_CASES and MADHOUSE env vars.

A madhouse-rs test should ideally run in two modes:

  • Without MADHOUSE=1: runs the commands in the scenario as-is with randomly generated arguments.
  • With MADHOUSE=1: treats the listed commands as a selection pool and generates randomized sequences from them alongside random arguments.

By default, madhouse-rs runs one proptest case. Setting MADHOUSE=1 alongside PROPTEST_CASES=N will produce N randomized sequences from the listed commands.

@federico-stacks
Copy link
Copy Markdown
Contributor Author

@federico-stacks They depend on both PROPTEST_CASES and MADHOUSE env vars.

A madhouse-rs test should ideally run in two modes:

  • Without MADHOUSE=1: runs the commands in the scenario as-is with randomly generated arguments.
  • With MADHOUSE=1: treats the listed commands as a selection pool and generates randomized sequences from them alongside random arguments.

By default, madhouse-rs runs one proptest case. Setting MADHOUSE=1 alongside PROPTEST_CASES=N will produce N randomized sequences from the listed commands.

@BowTiedRadone So, if we want to run them in this workflow, we also need to set MADHOUSE=1 env variable, if I understand correctly.

@BowTiedRadone
Copy link
Copy Markdown
Contributor

@federico-stacks Exactly. That's correct and I believe should be the only addition.

@federico-stacks federico-stacks marked this pull request as ready for review March 27, 2026 11:17
@federico-stacks federico-stacks requested a review from wileyj March 27, 2026 11:17
@coveralls
Copy link
Copy Markdown

coveralls commented Mar 27, 2026

Coverage Report for CI Build 24389109761

Coverage decreased (-0.03%) to 85.685%

Details

  • Coverage decreased (-0.03%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 1819 coverage regressions across 61 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

1819 previously-covered lines in 61 files lost coverage.

Top 10 Files by Coverage Loss Lines Losing Coverage Coverage
stackslib/src/net/inv/epoch2x.rs 222 79.44%
stackslib/src/net/chat.rs 200 92.93%
stacks-node/src/nakamoto_node/miner.rs 134 87.08%
stackslib/src/net/api/postblock_proposal.rs 107 82.16%
stackslib/src/clarity_vm/database/marf.rs 99 60.67%
clarity/src/vm/contexts.rs 75 92.36%
clarity/src/vm/functions/database.rs 75 92.36%
stackslib/src/net/codec.rs 69 91.63%
stackslib/src/net/p2p.rs 69 74.04%
stackslib/src/clarity_vm/database/ephemeral.rs 61 56.82%

Coverage Stats

Coverage Status
Relevant Lines: 217886
Covered Lines: 186696
Line Coverage: 85.69%
Coverage Strength: 17128954.37 hits per line

💛 - Coveralls

Comment thread .github/workflows/proptest-nightly-tests.yml
Copy link
Copy Markdown

@radu-stacks radu-stacks left a comment

Choose a reason for hiding this comment

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

Looking good! Left only a few suggestions and nits.

Comment thread .github/workflows/proptest-nightly-tests.yml Outdated
Comment thread .github/workflows/proptest-nightly-tests.yml
Comment thread .github/workflows/proptest-nightly-tests.yml Outdated
Comment thread .github/workflows/proptest-nightly-tests.yml Outdated
Comment thread .github/workflows/proptest-nightly-tests.yml
Copy link
Copy Markdown

@radu-stacks radu-stacks left a comment

Choose a reason for hiding this comment

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

Only 2 comments left from my side:

Comment thread .github/workflows/proptest-nightly-tests.yml Outdated
Comment thread .github/workflows/proptest-nightly-tests.yml Outdated
Comment thread .github/workflows/proptest-nightly-tests.yml
@federico-stacks federico-stacks requested a review from wileyj April 13, 2026 16:20
Copy link
Copy Markdown
Collaborator

@wileyj wileyj left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Copy Markdown

@radu-stacks radu-stacks left a comment

Choose a reason for hiding this comment

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

LGTM

@federico-stacks federico-stacks added this pull request to the merge queue Apr 15, 2026
Merged via the queue into stacks-network:develop with commit ed9a4ff Apr 15, 2026
325 of 327 checks passed
@federico-stacks federico-stacks deleted the ci/proptest-nightly branch April 15, 2026 06:42
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.

5 participants