Skip to content

Fix API status transitions and admin identity - #1423

Open
LoneWolfxm wants to merge 2 commits into
Haroldwonder:mainfrom
LoneWolfxm:fix/api-status-and-admin-identity
Open

Fix API status transitions and admin identity#1423
LoneWolfxm wants to merge 2 commits into
Haroldwonder:mainfrom
LoneWolfxm:fix/api-status-and-admin-identity

Conversation

@LoneWolfxm

@LoneWolfxm LoneWolfxm commented Aug 28, 2026

Copy link
Copy Markdown

Summary

Fixes the unreachable remittance status state machine and binds high-risk admin confirmation to verified per-admin JWT identities.

Changes

  • Route remittance status updates through RemittanceService, preserving transition validation and WebSocket emission semantics.
  • Require agent/admin authentication for status mutations and authenticated access to agent profiles.
  • Derive admin action initiators and confirmers from req.auth.userId; request-body identity fields can no longer be spoofed.
  • Back REST agent storage with PostgresAgentStore in production and initialize the schema during app bootstrap.
  • Add focused regression coverage and update the OpenAPI contract.

Related issues: #1299, #1300, #1301, #1302

Validation

  • OpenAPI validation passes.
  • Touched files report no editor diagnostics.
  • Vitest was blocked in the Debian 11 container by Rollup's GLIBC/native-binary mismatch.
  • Full API typecheck remains blocked by pre-existing unrelated repository errors.

closes #1299
closes #1300
closes #1301
closes #1302

## Summary

Fixes the unreachable remittance status state machine and binds high-risk admin confirmation to verified per-admin JWT identities.

## Changes

- Route remittance status updates through `RemittanceService`, preserving transition validation and WebSocket emission semantics.
- Require agent/admin authentication for status mutations and authenticated access to agent profiles.
- Derive admin action initiators and confirmers from `req.auth.userId`; request-body identity fields can no longer be spoofed.
- Back REST agent storage with `PostgresAgentStore` in production and initialize the schema during app bootstrap.
- Add focused regression coverage and update the OpenAPI contract.

Related issues: Haroldwonder#1299, Haroldwonder#1300, Haroldwonder#1301, Haroldwonder#1302

## Validation

- OpenAPI validation passes.
- Touched files report no editor diagnostics.
- Vitest was blocked in the Debian 11 container by Rollup's GLIBC/native-binary mismatch.
- Full API typecheck remains blocked by pre-existing unrelated repository errors.
@vercel

vercel Bot commented Aug 28, 2026

Copy link
Copy Markdown

@LoneWolfxm is attempting to deploy a commit to the Harold's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Aug 28, 2026

Copy link
Copy Markdown

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

None yet

Projects

None yet

1 participant