Files
nick-doc/Issues/ISSUE-066-backend-payout-and-release-confirm-set-non-enum-status.md
Siavash Sameni dceaf82934 audit: 2026-05-30 full-codebase audit — report, issues, docs, runbooks
Full-codebase-audit 2026-05-30 outputs:
- Audit report: 09 - Audits/Full Codebase Audit - 2026-05-30.md
- 81 issue files ISSUE-055..135 (decisions + 1 skipped no-brainer).
- Scanner docs from scratch (was zero): architecture, data model, API ref, payment
  flow, operations runbook + repo README.
- Doc-sync updates across API reference, data models, flows, design system.
- Secret Rotation Runbook (08 - Operations) for the exposed credentials.
- Reusable workflow guide (07 - Development) + .claude/workflows/full-codebase-audit.js.

Issues remain status:open intentionally — the code fixes are uncommitted-then-committed
working-tree changes per repo and aren't "resolved" until merged/deployed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 18:48:04 +04:00

1.6 KiB

issue, title, severity, domain, labels, status, created, source
issue title severity domain labels status created source
066 Backend: payout/confirm and release/confirm need canonical terminal status — DEC-32 high Payment
bug
backend
state-machine
open 2026-05-30 Full Codebase Audit 2026-05-30

Backend: payout/confirm and release/confirm need canonical terminal status — DEC-32

Severity: high Domain: Payment Labels: bug, backend, state-machine

Description

NB-29 was applied as an interim fix (setting status:'completed'), but the correct terminal status for a released/paid-out payment has not been decided. The enum currently has no 'released' value. Until DEC-32 is resolved, the interim 'completed' value may be incorrect for payments that need to be distinguished from non-released completions.

Options

  1. Add 'released' to the Payment status enum and update all status-dependent logic (dashboards, filters, cleanup).
  2. Map release/payout to the existing 'completed' status plus a separate releasedAt/payout flag.
  3. Introduce a dedicated escrow/payout sub-state field instead of overloading status.

Recommendation

Decide the canonical representation (likely add 'released' to the enum or a dedicated payout state) and update dashboards/filters consistently. The NB-29 interim fix uses 'completed' — verify this does not cause dashboard overcounting or misclassification.

Affected Files

  • backend/src/services/payment/requestNetwork/requestNetworkRoutes.ts:526
  • backend/src/models/Payment.ts — enum definition

References