Skip to content

SIG-626: split prod baseline and advisory fork coverage#71

Merged
worjs merged 3 commits into
mainfrom
test/SIG-626-fork-coverage
Apr 14, 2026
Merged

SIG-626: split prod baseline and advisory fork coverage#71
worjs merged 3 commits into
mainfrom
test/SIG-626-fork-coverage

Conversation

@worjs
Copy link
Copy Markdown
Contributor

@worjs worjs commented Apr 14, 2026

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

  • Split deterministic baseline suites from test/foundry/fork/live/**, and make the default fork workflow run only the prod baseline while keeping live-state suites as advisory workflow_dispatch coverage.
  • Add fork-specific helper layers for created-market setup, live-market discovery, Redstone FFI submission, and sequential batch processing instead of duplicating setup logic across suites.
  • Keep position exposure gate no-ops out of scope; admin coverage stays on implemented owner/operator controls such as market creation gating, pause behavior, fee waterfall configuration, and capital stack flows.
  • Use an advisory-only Redstone FFI bridge for primary settlement smoke, while deterministic baseline settlement uses owner-controlled fallback paths that can finish unresolved ambient batches on the fork.

Risk Areas

  • test/foundry/fork/base/ForkProtocolTest.sol now 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.
  • The new baseline suites cover owner/operator pause paths, capital-stack funding and withdrawal, vault request/claim flow, and direct core payout claims on created markets. Review attention should go to timing warps, batch targeting, and payout assumptions.
  • .github/workflows/fork-test.yml and package.json now 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.

Copy link
Copy Markdown

@signals-reviewer signals-reviewer Bot left a comment

Choose a reason for hiding this comment

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

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.

@worjs worjs merged commit f313fee into main Apr 14, 2026
8 checks passed
@worjs worjs deleted the test/SIG-626-fork-coverage branch April 14, 2026 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant