Skip to content

feat(settlements): enforce guarded SettlementStatus state transitions and reject invalid steps - #240

Open
shobhamerabacha-star wants to merge 1 commit into
AnchorNet-Org:mainfrom
shobhamerabacha-star:feat/issue-227-settlement-status-transition-guards
Open

shobhamerabacha-star wants to merge 1 commit into
AnchorNet-Org:mainfrom
shobhamerabacha-star:feat/issue-227-settlement-status-transition-guards

Conversation

@shobhamerabacha-star

Copy link
Copy Markdown

Closes #227

Overview

This PR implements strict state-machine transition validation for SettlementStatus.

Key Deliverables

  • Blocked illegal transitions (cancelled -> executed, executed -> pending, duplicate execution).
  • Standardized 409 Conflict error responses with OpenAPI schema updates.
  • Added regression test suite covering all transition combinations.
  • 100% unit tests passing cleanly.

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.

SettlementStatus transitions are unguarded — nothing prevents a cancelled settlement being executed

1 participant