SIG-626: split prod baseline and advisory fork coverage#71
Conversation
There was a problem hiding this comment.
Summary
This PR splits fork test coverage into two tiers: a deterministic prod-baseline suite that runs on every push (blocking gate) and an advisory live-market suite that runs only via workflow_dispatch. It adds fork-specific helper layers (ForkProtocolTest, ForkLiveMarketTest, ForkRedstoneFFI) for created-market setup, live-market discovery, and Redstone FFI submission. Existing live-state tests (RouterFork, OperatorUpgradeFork) are moved under test/foundry/fork/live/ and refactored from hard revert("no active market") to graceful _tryFindActiveMarket() skip patterns. New baseline suites cover admin lifecycle (risk config gating, pause/unpause, fee waterfall, capital stack), core trade payouts (sponsored position claims, batch claim winner/loser), and vault batch flows (deposit/withdraw lifecycle, cancellation).
Issues
No issues found.
Suggestions
No suggestions.
Verdict
APPROVE: The code changes are test-only with no impact on production contracts. The new helper layers correctly use the contract interface (core.getMarket() replaces the raw staticcall + manual word-index decoding). Batch timing arithmetic, settlement fallback logic, and access-control test expectations align with the contract's onlyOwnerOrOperator modifier behavior (owner-only during pause). The CI split correctly gates the blocking path on deterministic tests and isolates live-state flakiness to advisory-only workflow_dispatch. No cross-repo impact — only test files and CI config are touched.
Context
SIG-626 expands fork coverage beyond upgrade and readability checks into deterministic protocol operations on the prod fork. It also separates the blocking prod-baseline path from advisory live-state coverage so the default fork gate stays actionable on public mainnet state.
Decisions
test/foundry/fork/live/**, and make the default fork workflow run only the prod baseline while keeping live-state suites as advisoryworkflow_dispatchcoverage.Risk Areas
test/foundry/fork/base/ForkProtocolTest.solnow resolves unresolved ambient batch markets before processing the next batch, including owner-side primary/secondary settlement fallback. Review attention should go to whether that helper changes the intended prod-state assumptions..github/workflows/fork-test.ymlandpackage.jsonnow treat prod baseline coverage as the blocking fork gate and move live-market suites to advisory execution. Review attention should go to whether that gate split matches the intended release policy.