add dispute resolution integration tests for #272 - #667
Open
Franklivania wants to merge 1 commit into
Open
Conversation
|
@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. |
|
@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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 receives401.Changes:
POST /api/bounties/:id/resolve-disputeroute withresolveDisputeSchemaand OpenAPI registrationresolveDisputeBounty()in the bounty store (disputed→released/refunded+ audit logs)backend/test/api.dispute.test.tswith resolve and wrong-arbiter auth casesbackend/src/middleware/auth.tsandbackend/src/metrics.ts(were empty/incomplete on main, blocking app import and tests)Closes #272
Type of 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.
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 unchangedcd backend && npm test -- test/api.test.ts— lifecycle routes pass (open-issues timeout is pre-existing)