Skip to content

SIG-625: add fork test for operator upgrade lifecycle#70

Merged
worjs merged 1 commit into
mainfrom
test/SIG-625-fork-tests
Apr 13, 2026
Merged

SIG-625: add fork test for operator upgrade lifecycle#70
worjs merged 1 commit into
mainfrom
test/SIG-625-fork-tests

Conversation

@worjs
Copy link
Copy Markdown
Contributor

@worjs worjs commented Apr 13, 2026

Context

Fork test for the operator upgrade lifecycle introduced in SIG-625 (PR #69).
Validates that after upgrading TradeModule and deploying a new SignalsRouter on a production fork, the approved-operator pattern works end-to-end with real on-chain state.

Decisions

  • Uses ForkBaseTest base class for prod fork infrastructure (RPC, contract addresses, owner safe)
  • Tests all four lifecycle operations: increase, decrease, close, claim — each verifying events reference the trader address (not the router) and no spurious NFT transfers occur
  • Includes a negative test ensuring non-owners cannot abuse router approval to manipulate others' positions
  • Market settlement in claimPayout test uses markSettlementFailedfinalizeSecondarySettlement path (deterministic tick placement without oracle dependency)
  • Early-return pattern (if (address(router) == address(0)) return) gracefully skips when fork env lacks required contract addresses

Sibling PRs

Verify on prod fork:
- TradeModule upgrade via setModules preserves vault state
- Router lifecycle (increase/decrease/close/claim) emits actual user as trader
- No spurious NFT Transfer events to/from Router
- Non-owner caller rejected by Router owner guard
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

End-to-end fork test for SIG-625's operator upgrade lifecycle. Upgrades TradeModule on a production fork, deploys a new SignalsRouter, and verifies the full position lifecycle (increase, decrease, close, claim) works correctly with ERC721 approved operators — confirming that trade events reference the actual trader (not the router) and no spurious NFT transfers occur.

Cross-PR Context

Sibling PRs (SIG-625)

  • v1-contract PR #69 (MERGED): SIG-625: accept ERC721 approved operators for position lifecycle auth
  • Impact map check: This PR is test-only — no ABI, event, or interface changes. No downstream repo updates required.

Issues

No issues found.

Suggestions

No suggestions.

Verdict

APPROVE: Test-only PR with thorough coverage of the operator upgrade lifecycle. Event signature constants match the actual contract definitions. Settlement flow timing (submitWindow, claimDelay) is correct. The _findActiveMarket search, tick alignment, and log assertion helpers are all well-implemented.

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

End-to-end fork test for SIG-625's operator upgrade lifecycle. Upgrades TradeModule on a production fork, deploys a new SignalsRouter, and verifies the full position lifecycle (increase, decrease, close, claim) works correctly with ERC721 approved operators — confirming that trade events reference the actual trader (not the router) and no spurious NFT transfers occur.

Cross-PR Context

Sibling PRs (SIG-625)

  • v1-contract PR #69 (MERGED): SIG-625: accept ERC721 approved operators for position lifecycle auth
  • Impact map check: This PR is test-only — no ABI, event, or interface changes. No downstream repo updates required.

Issues

No issues found.

Suggestions

No suggestions.

Verdict

APPROVE: Test-only PR with thorough coverage of the operator upgrade lifecycle. Event signature constants match the actual contract definitions. Settlement flow timing (submitWindow, claimDelay) is correct. The _findActiveMarket search, tick alignment, and log assertion helpers are all well-implemented.

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

End-to-end fork test for SIG-625's operator upgrade lifecycle. Upgrades TradeModule on a production fork, deploys a new SignalsRouter, and verifies the full position lifecycle (increase, decrease, close, claim) works correctly with ERC721 approved operators — confirming that trade events reference the actual trader (not the router) and no spurious NFT transfers occur.

Cross-PR Context

Sibling PRs (SIG-625)

  • v1-contract PR #69 (MERGED): SIG-625: accept ERC721 approved operators for position lifecycle auth
  • Impact map check: This PR is test-only — no ABI, event, or interface changes. No downstream repo updates required.

Issues

No issues found.

Suggestions

No suggestions.

Verdict

APPROVE: Test-only PR with thorough coverage of the operator upgrade lifecycle. Event signature constants match the actual contract definitions. Settlement flow timing (submitWindow, claimDelay) is correct. The _findActiveMarket search, tick alignment, and log assertion helpers are all well-implemented.

@worjs worjs merged commit fc09ff3 into main Apr 13, 2026
23 checks passed
@worjs worjs deleted the test/SIG-625-fork-tests branch April 13, 2026 12:46
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