Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions LIVE_PRECOMPILE_TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,18 +186,7 @@ SKIP_ACTIVATE=POLICY_REGISTRY make fork-tests \
The inactive-dispatch tests (`test/unit/PolicyRegistry/dispatch_inactive.t.sol`)
also normalize the feature to inactive themselves, so they're correct under the
default run too; `SKIP_ACTIVATE` additionally validates the never-activated
baseline. One assertion (that an unknown selector is classified *before* the
activation gate rather than masked by `FeatureNotActivated`) encodes a fix that
isn't in the Rust impl yet, so it's gated behind `POLICY_DISPATCH_FIX`:

```bash
SKIP_ACTIVATE=POLICY_REGISTRY POLICY_DISPATCH_FIX=true make fork-tests \
ARGS="--match-contract PolicyRegistryDispatchInactive"
```

Run it that way against a build that carries the dispatch-ordering fix (e.g. via
the [patch] local-clone override below) to enforce the regression; leave it
unset against stock builds so the default run stays green.
baseline.

## When the precompiles update — the loop

Expand Down
4 changes: 1 addition & 3 deletions test/unit/PolicyRegistry/dispatch_inactive.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,8 @@ contract PolicyRegistryDispatchInactiveTest is PolicyRegistryTest {
}

/// @notice An unknown selector is classified, not masked by the activation gate.
/// @dev Gated behind `POLICY_DISPATCH_FIX`: stock builds still return `FeatureNotActivated` here
/// until the dispatch-ordering fix is in the pinned impl.
function test_dispatch_revert_unknownSelectorNotMaskedByActivation(bytes4 selector) public {
vm.skip(!(_forkMode() && vm.envOr("POLICY_DISPATCH_FIX", false)));
vm.skip(!_forkMode());
vm.assume(!_isKnownSelector(selector));
_ensureInactive();

Expand Down
Loading