Skip to content

Feature/early exit validation ownership#529

Merged
1nonlypiece merged 5 commits into
Commitlabs-Org:masterfrom
MerlinTheWhiz:feature/early-exit-validation-ownership
May 28, 2026
Merged

Feature/early exit validation ownership#529
1nonlypiece merged 5 commits into
Commitlabs-Org:masterfrom
MerlinTheWhiz:feature/early-exit-validation-ownership

Conversation

@MerlinTheWhiz
Copy link
Copy Markdown
Contributor

Closes #434

Changes made:

  • src/app/api/commitments/[id]/early-exit/route.ts: added request-body validation, auth/ownership enforcement, and standard API error handling for contract failures.
  • src/lib/schemas/apiContracts.ts: added EarlyExitRequestBodySchema for reason and callerAddress.
  • src/lib/backend/services/contracts.ts: wired early-exit failures through normalizeContractError.
  • tests/api/early-exit.test.ts: added/updated coverage for valid request, invalid body, unauthorized, forbidden ownership, rate limit, and normalized contract error cases.
  • docs/backend-api-reference.md: documented early-exit auth, body schema, error cases, and corrected example payload.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 27, 2026

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

A member of the Team first needs to authorize it.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 27, 2026

@MerlinTheWhiz Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@MerlinTheWhiz MerlinTheWhiz force-pushed the feature/early-exit-validation-ownership branch from a135f57 to 4718791 Compare May 27, 2026 13:54
@MerlinTheWhiz MerlinTheWhiz force-pushed the feature/early-exit-validation-ownership branch from 60f6773 to 57f7e21 Compare May 27, 2026 14:40
@1nonlypiece 1nonlypiece merged commit 99d5205 into Commitlabs-Org:master May 28, 2026
1 check failed
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 - Add Zod validation and ownership checks to early-exit route handler

2 participants