Index: 47 open (8 critical, 39 major), 6 resolved. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
40 lines
1.5 KiB
Markdown
40 lines
1.5 KiB
Markdown
---
|
|
issue: 004
|
|
title: "POST /api/disputes/:id/resolve (dashboard) does not trigger escrow release — only updates Dispute model"
|
|
severity: critical
|
|
domain: Dispute
|
|
labels: [bug, backend, escrow, major]
|
|
status: resolved
|
|
resolved: 2026-05-29
|
|
fix: "DisputeService.resolveDispute now calls releaseHoldResolve(purchaseRequestId) after saving, clearing escrow hold and unblocking payment release"
|
|
created: 2026-05-29
|
|
source: Doc vs Code Audit 2026-05-29
|
|
---
|
|
|
|
# 🔴 POST /api/disputes/:id/resolve (dashboard) does not trigger escrow release — only updates Dispute model
|
|
|
|
**Severity:** critical
|
|
**Domain:** Dispute
|
|
**Labels:** bug, backend, escrow, major
|
|
|
|
## Description
|
|
|
|
The API claims resolveDispute 'triggers refund/release/split escrow action.' DisputeService.resolveDispute only updates the Dispute document. The separate POST /api/disputes/:purchaseRequestId/resolve (releaseHold router) is required to actually unblock escrow. Due to the route shadowing bug, the correct handler may never be reached.
|
|
|
|
## Current Behavior
|
|
|
|
DisputeService.resolveDispute only updates the Dispute document. Escrow remains blocked until a separate correct API call is made to the releaseHold router.
|
|
|
|
## Expected Behavior
|
|
|
|
Dispute resolution should atomically update the Dispute record AND release/refund the escrow as indicated by the action field.
|
|
|
|
## Affected Files
|
|
|
|
- `backend/src/services/disputeService.ts`
|
|
- `backend/src/controllers/disputeController.ts`
|
|
|
|
## References
|
|
|
|
- [Doc vs Code Audit Report](../09%20-%20Audits/Doc%20vs%20Code%20Audit%20Report%20-%202026-05-29.md)
|