Skip to content

feat: enforce auth and state checks for commitment settlement#377

Merged
1nonlypiece merged 2 commits into
Commitlabs-Org:masterfrom
MissBlue00:issue-264
Apr 26, 2026
Merged

feat: enforce auth and state checks for commitment settlement#377
1nonlypiece merged 2 commits into
Commitlabs-Org:masterfrom
MissBlue00:issue-264

Conversation

@MissBlue00
Copy link
Copy Markdown

  • Add ownership validation (403 Forbidden when caller is not owner)
  • Add read-before-write to validate eligibility
  • Enforce actor matches owner (session principal)
  • Handle invalid states (VIOLATED, EARLY_EXIT → 400 BadRequest)
  • Already settled returns 409 Conflict
  • Add tests for 401, 403, 409, 400, 200 scenarios

closes: #264

- Add ownership validation (403 Forbidden when caller is not owner)
- Add read-before-write to validate eligibility
- Enforce actor matches owner (session principal)
- Handle invalid states (VIOLATED, EARLY_EXIT → 400 BadRequest)
- Already settled returns 409 Conflict
- Add tests for 401, 403, 409, 400, 200 scenarios
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 24, 2026

Someone is attempting to deploy a commit to the 1nonly's projects Team on Vercel.

A member of the Team first needs to authorize it.

@1nonlypiece 1nonlypiece merged commit 1e571f8 into Commitlabs-Org:master Apr 26, 2026
0 of 2 checks passed
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.

Backend - Harden settlement endpoint with ownership and state machine checks

2 participants