Skip to content

Invariant tests intermittently failing in the Github CI with the latest stable release #11369

@smol-ninja

Description

@smol-ninja

Component

Other (please describe), Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge Version: 1.3.1-stable
Commit SHA: 08d3a4ad4d78b62bcb897350803bf96fc2cf6cc9
Build Timestamp: 2025-08-15T16:02:04.696620000Z (1755273724)
Build Profile: maxperf

What version of Foundryup are you on?

foundryup: 1.3.0

What command(s) is the bug in?

forge test --mt invariant

Operating System

Linux

Describe the bug

We are using the latest stable version of Foundry via foundry-toolchain@v1 in our Github CI. However, the recent Foundry upgrade appears to introduce some issues causing the invariant tests to intermittently fail when run in the CI. This is hard to reproduce locally, implying that the problem might be related to foundry-toolchain.

Also, the failures are inconsistent i.e. tests sometimes pass, but at other times they revert with the following error:

[FAIL: failed to set up invariant testing environment: Could not generate case]

An example from a recent CI run. The same invariant tests pass with v1.2.3 as can be seen here (ignore failing fork tests).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Completed

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions