Skip to content

feat: 5926 Mint event retry#5990

Open
Pyatakov wants to merge 18 commits intodevelopfrom
feat/mint-event-retry
Open

feat: 5926 Mint event retry#5990
Pyatakov wants to merge 18 commits intodevelopfrom
feat/mint-event-retry

Conversation

@Pyatakov
Copy link
Copy Markdown
Contributor

@Pyatakov Pyatakov commented Apr 23, 2026

Description:

Adds the Mint Event Retry feature. The policy owner gets a dedicated UI panel inside the Policy Viewer and a pair of REST endpoints to inspect these requests and retry any that failed, without resubmitting the original VP or re-running policy logic.

Feature summary

  • Mint Requests panel in the Policy Viewer (Standard Registry only) with a paginated, filterable, sortable grid – columns for VP Message ID, Token, Token Type, Amount, Account, Minted progress ( / ), Transferred progress, Status chip (green/yellow/red), Process Date, and per-row actions.
  • Multi-criteria filtering by status (All / Pending / Error / Success – applied immediately), Account ID, and VP Message ID (applied via Apply / Clear buttons). Default sort is VP Message ID descending so newest requests appear first.
  • Error visibility: failed requests show a red "Error" chip with the full error message on hover.
  • One-click retry: a refresh icon on every failed row opens a confirmation dialog ("Are you sure you want to retry minting for VP {vpMessageId}?") and, on confirm, re-queues the mint/transfer pipeline for that VP. The grid refreshes so operators can watch the status and progress counts update.

The Mint Requests tab in the Policy Viewer is rendered only for Standard Registry users. Non-SR users with POLICIES_POLICY_READ can still hit GET .../mint-requests programmatically, scoped to requests they own.

Documentation

mint-event-retry-docs.md

Related issue(s):

Closes #5926

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Pyatakov and others added 16 commits April 23, 2026 14:35
Add end-to-end retry mint capability for VP messages.
Introduces a new API endpoint POST /:policyId/mint/:vpMessageId/retry (protected by POLICIES_POLICY_EXECUTE and POLICIES_POLICY_MANAGE) that calls PolicyEngine.retryMint.
The flow retries failed mint/transfer operations for the specified VP message.

Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
Introduce mint requests support across backend and frontend.
Adds a new API endpoint GET /:policyId/mint-requests with pagination and filters (status, tokenId).
On the frontend, a MintRequestsComponent was added to a policy viewer (tab shown for STANDARD_REGISTRY permission).
UI supports filtering, paging and retrying failed mints.

Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
Enhance API documentation for mint requests and related endpoints. Add concrete MINT_REQUEST example objects to improve Swagger UI and example payloads.

Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
Fix for the "Cannot read properties of null (reading 'dryRun')" error

Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
When the user confirms "Retry", the API call fires in the background (fire-and-forget) and the grid refreshes immediately via loadData(), so the UI is not blocked.

Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
Clear any previous error on the mint request before setting processDate and saving, ensuring stale errors don't persist across retries

Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
- Replace the Token ID filter with Account ID.
- Adjust CSS classes and table column widths.
- Change default ordering for mint requests from processDate to vpMessageId (DESC).

Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
Role-based filtering for mint requests, where non-owner users now see only their own mint requests, but SR retain visibility of all requests

Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
Prevent non-owners from retrying mint requests by validating policy.creator against the request owner in the policy engine and throwing a 403 error with a clear message. Add an ApiForbiddenResponse to the API docs for the retry endpoint. Also ensure the API gateway preserves existing error codes (only setting UNPROCESSABLE_ENTITY when none is present) so 403 errors propagate correctly.

Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
Retry endpoint returns immediately after sync validation (ownership,
cooldown, in-progress); mint/transfer runs in the background.

MintService.retry / retryRequest gain a `detached` flag and return
{ warnings, message? } so clients see cooldown / already-in-progress
conditions instead of silent no-ops. BlockTreeGenerator uses detached
for the REST path; block-execution callers keep the sync path.
Swagger and docs updated.

Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
@Pyatakov Pyatakov self-assigned this Apr 23, 2026
@Pyatakov Pyatakov requested review from a team as code owners April 23, 2026 14:30
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 23, 2026

Test Results

 32 files  +29   64 suites  +9   8m 34s ⏱️ + 8m 34s
 35 tests  - 32   35 ✅  - 32  0 💤 ±0  0 ❌ ±0 
165 runs  +98  165 ✅ +98  0 💤 ±0  0 ❌ ±0 

Results for commit 5adf4f1. ± Comparison against base commit 1fa9ec8.

♻️ This comment has been updated with latest results.

@Pyatakov Pyatakov deleted the branch develop April 24, 2026 14:50
@Pyatakov Pyatakov closed this Apr 24, 2026
@Pyatakov Pyatakov reopened this Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants