Fix API status transitions and admin identity - #1423
Open
LoneWolfxm wants to merge 2 commits into
Open
Conversation
## 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.
|
@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. |
|
@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! 🚀 |
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.
Summary
Fixes the unreachable remittance status state machine and binds high-risk admin confirmation to verified per-admin JWT identities.
Changes
RemittanceService, preserving transition validation and WebSocket emission semantics.req.auth.userId; request-body identity fields can no longer be spoofed.PostgresAgentStorein production and initialize the schema during app bootstrap.Related issues: #1299, #1300, #1301, #1302
Validation
closes #1299
closes #1300
closes #1301
closes #1302