Context
Spawned from PR #4299 multi-model review. Per the tracking issue #4296 this is a required gate before flipping Enforce mode on gateways.
PR #4299 adds a synchronous end-to-end regression test (`contract::governance::tests::governance_to_ban_list_end_to_end`) that drives a contract through evict → recover → re-feed → BanTriggered via `GovernanceManager`, runs decisions through `Ring::apply_ban_decisions`, and asserts the contract lands on a fresh `ContractBanList`. That covers the wiring at the unit level.
What is missing is a simulation-network test that:
- Spins up a small `run_simulation_direct` network (~5-10 nodes).
- Injects the May 21 incident pattern (one abuser contract that triggers repeated evictions via the rate-limit → MAD → eviction → ban chain).
- Asserts the full chain fires on each node observing the abuse:
- Rate limit rejects excess UPDATE traffic for the abuser.
- MAD detector flags the abuser in the cost distribution.
- State machine transitions Normal → Borderline → WouldEvict → Evicted.
- Re-eviction within ban_window triggers Banned.
- ContractBanList drops subsequent wire traffic for the abuser.
- Asserts non-abuser contracts in the simulation continue to function (no collateral damage).
Why this matters
The unit and pin tests in #4299 lock the wiring in place, but they cannot detect emergent issues from the chain running against real network traffic (timing assumptions, message ordering, multi-node consensus on who's the abuser). The deferred sim test is the only way to validate "Enforce mode actually works as designed in a real network" before flipping the gateway config.
Spawned from
[AI-assisted - Claude]
Context
Spawned from PR #4299 multi-model review. Per the tracking issue #4296 this is a required gate before flipping Enforce mode on gateways.
PR #4299 adds a synchronous end-to-end regression test (`contract::governance::tests::governance_to_ban_list_end_to_end`) that drives a contract through evict → recover → re-feed → BanTriggered via `GovernanceManager`, runs decisions through `Ring::apply_ban_decisions`, and asserts the contract lands on a fresh `ContractBanList`. That covers the wiring at the unit level.
What is missing is a simulation-network test that:
Why this matters
The unit and pin tests in #4299 lock the wiring in place, but they cannot detect emergent issues from the chain running against real network traffic (timing assumptions, message ordering, multi-node consensus on who's the abuser). The deferred sim test is the only way to validate "Enforce mode actually works as designed in a real network" before flipping the gateway config.
Spawned from
[AI-assisted - Claude]