Skip to content

add dispute resolution integration tests for #272 - #667

Open
Franklivania wants to merge 1 commit into
ritik4ever:mainfrom
Franklivania:test/dispute-resolution
Open

add dispute resolution integration tests for #272#667
Franklivania wants to merge 1 commit into
ritik4ever:mainfrom
Franklivania:test/dispute-resolution

Conversation

@Franklivania

@Franklivania Franklivania commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Description

Adds integration test coverage and backend support for the full dispute → resolution flow (issue #272).

Contributors can dispute a submitted bounty; a configured arbiter can resolve it by releasing funds to the contributor (release: true) or refunding the maintainer (release: false). Supertest tests verify status transitions, audit log entries for both paths, and that a non-arbiter signer receives 401.

Changes:

  • POST /api/bounties/:id/resolve-dispute route with resolveDisputeSchema and OpenAPI registration
  • resolveDisputeBounty() in the bounty store (disputedreleased / refunded + audit logs)
  • Parameterized Stellar signature auth for maintainer, contributor (dispute), and arbiter (resolve) roles
  • Extended backend/test/api.dispute.test.ts with resolve and wrong-arbiter auth cases
  • Restored backend/src/middleware/auth.ts and backend/src/metrics.ts (were empty/incomplete on main, blocking app import and tests)

Closes #272

Type of change

  • Bug fix
  • New feature
  • Breaking change

Security Checklist

Please review the SECURITY_CHECKLIST.md and check off any items that apply. Reviewers must sign off on these items before merge.

  • Input validation changed
  • Auth modified
  • New external fetch
  • Dependency added
  • Secret handling

Test plan

  • cd backend && npm test -- test/api.dispute.test.ts — 9/9 pass (dispute, resolve release/refund, audit logs, wrong-arbiter 401)
  • cd backend && npm test -- test/authMiddleware.test.ts — maintainer signature auth unchanged
  • cd backend && npm test -- test/api.test.ts — lifecycle routes pass (open-issues timeout is pre-existing)

@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

@Franklivania is attempting to deploy a commit to the ritik4ever's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 26, 2026

Copy link
Copy Markdown

@Franklivania 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add integration test for the dispute and resolution flow

1 participant