Skip to content

Add VaultModeTag field to TokenizedAssetStatusResponse - #302

Closed
rouzwelt wants to merge 1 commit into
2026-07-28-orchestrator-mint-recoveryfrom
2026-07-28-orchestrator-mint-api
Closed

rouzwelt wants to merge 1 commit into
2026-07-28-orchestrator-mint-recoveryfrom
2026-07-28-orchestrator-mint-api

Conversation

@rouzwelt

@rouzwelt rouzwelt commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Motivation

The liquidity bot needs to know which minting path each asset uses — either depositing directly into the vault (VaultDirect) or routing through the ST0xOrchestrator (Orchestrator) — so it can determine which assets require a signed MintAuthV1 to be delivered before their mints can be submitted. Previously, the GET /tokenized-assets/<underlying>/status response had no way to communicate this, leaving the liquidity bot without a reliable signal.

Solution

A new VaultModeTag enum (vault_direct | orchestrator) is introduced in the DTO crate and added as a vault_mode field on TokenizedAssetStatusResponse. The field is additive and defaults to VaultDirect when absent, so responses from servers that predate the field remain valid — a server that predates the field can only ever mint vault-direct, making the default truthful.

The status endpoint now reads the per-asset vault mode from the server's Config and maps it to the tag via a From<VaultMode> for VaultModeTag conversion. The orchestrator address is intentionally dropped in this mapping; the liquidity bot only needs the tag, and the issuance bot's config remains the single source of truth for addresses during the cutover.

VaultModeTag is also registered in the OpenAPI schema and TypeScript bindings exports, with wire format enforced as snake_case (matching TokenizedAssetStatus).

Closes RAI-1619

Checks

By submitting this for review, I'm confirming I've done the following:

  • added comprehensive test coverage for any changes in logic
  • made this PR as small as possible
  • linked any relevant issues or PRs

Summary by CodeRabbit

  • New Features

    • Tokenized asset status responses now indicate the vault mode: vault_direct or orchestrator.
    • API documentation and generated type definitions include the new vault mode information.
  • Bug Fixes

    • Older responses without vault mode information remain compatible and default to direct vault mode.
    • Status reporting now accurately reflects mixed vault-mode configurations across assets.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@rouzwelt, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 52 seconds

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 88f842f0-7b1d-41e8-902e-c19c64445c2b

📥 Commits

Reviewing files that changed from the base of the PR and between 967e847 and 02ad0e7.

📒 Files selected for processing (4)
  • crates/client/src/lib.rs
  • crates/dto/src/lib.rs
  • src/openapi.rs
  • src/tokenized_asset/api.rs

Walkthrough

Changes

Tokenized-asset vault mode status

Layer / File(s) Summary
Vault mode response contract
crates/dto/src/lib.rs, src/openapi.rs
Adds VaultModeTag, adds vault_mode to TokenizedAssetStatusResponse, preserves legacy deserialization, exports TypeScript bindings, and validates the OpenAPI schema.
Status endpoint mode resolution
src/tokenized_asset/api.rs, crates/client/src/lib.rs
Resolves per-underlying vault modes from Config, maps them to response tags, and updates direct, orchestrator, and client response tests.

Possibly related PRs

Suggested labels: enhancement

Suggested reviewers: juanirios, 0xgleb

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change to TokenizedAssetStatusResponse.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 2026-07-28-orchestrator-mint-api

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

rouzwelt commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label add-to-gt-merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@rouzwelt
rouzwelt force-pushed the 2026-07-28-orchestrator-mint-recovery branch from 86a7be6 to 3c2ef35 Compare July 28, 2026 22:32
@rouzwelt
rouzwelt force-pushed the 2026-07-28-orchestrator-mint-api branch from f37e1bb to 30cd0f5 Compare July 28, 2026 22:32
@rouzwelt
rouzwelt force-pushed the 2026-07-28-orchestrator-mint-recovery branch from 3c2ef35 to fb43bb8 Compare July 28, 2026 23:10
@rouzwelt
rouzwelt force-pushed the 2026-07-28-orchestrator-mint-api branch from 30cd0f5 to 1eef657 Compare July 28, 2026 23:10
@rouzwelt
rouzwelt force-pushed the 2026-07-28-orchestrator-mint-recovery branch from fb43bb8 to 80fe52e Compare July 29, 2026 00:03
@rouzwelt
rouzwelt force-pushed the 2026-07-28-orchestrator-mint-api branch 2 times, most recently from ff3025c to d3cf7ed Compare July 29, 2026 22:06
@rouzwelt
rouzwelt force-pushed the 2026-07-28-orchestrator-mint-recovery branch from 80fe52e to 6bb6340 Compare July 29, 2026 22:06
@rouzwelt
rouzwelt force-pushed the 2026-07-28-orchestrator-mint-recovery branch from e1aefa8 to 8bd41e6 Compare August 13, 2026 01:08
@rouzwelt
rouzwelt force-pushed the 2026-07-28-orchestrator-mint-api branch from 767c335 to 42110bd Compare August 13, 2026 01:08
@rouzwelt
rouzwelt force-pushed the 2026-07-28-orchestrator-mint-recovery branch from 8bd41e6 to d8e12f2 Compare August 13, 2026 21:34
@rouzwelt
rouzwelt force-pushed the 2026-07-28-orchestrator-mint-api branch from 42110bd to 67ccbbf Compare August 13, 2026 21:34
@rouzwelt rouzwelt mentioned this pull request Aug 14, 2026
3 tasks
@rouzwelt
rouzwelt force-pushed the 2026-07-28-orchestrator-mint-recovery branch from d8e12f2 to 9c8ddcd Compare August 14, 2026 03:43
@rouzwelt
rouzwelt force-pushed the 2026-07-28-orchestrator-mint-api branch from 67ccbbf to 0775962 Compare August 14, 2026 03:43
@rouzwelt
rouzwelt force-pushed the 2026-07-28-orchestrator-mint-recovery branch from 9c8ddcd to 91975f3 Compare August 14, 2026 15:16
@rouzwelt
rouzwelt force-pushed the 2026-07-28-orchestrator-mint-api branch from 0775962 to 146a480 Compare August 14, 2026 15:16
@graphite-app
graphite-app Bot force-pushed the 2026-07-28-orchestrator-mint-recovery branch from 91975f3 to f02fff2 Compare August 14, 2026 15:37
@graphite-app
graphite-app Bot force-pushed the 2026-07-28-orchestrator-mint-api branch from 146a480 to d27e83d Compare August 14, 2026 15:38
@graphite-app
graphite-app Bot force-pushed the 2026-07-28-orchestrator-mint-recovery branch from f02fff2 to cd867fb Compare August 14, 2026 17:12
@graphite-app
graphite-app Bot force-pushed the 2026-07-28-orchestrator-mint-api branch from d27e83d to 698f920 Compare August 14, 2026 17:12
@graphite-app
graphite-app Bot force-pushed the 2026-07-28-orchestrator-mint-recovery branch from cd867fb to d80069e Compare August 14, 2026 18:15
@graphite-app
graphite-app Bot force-pushed the 2026-07-28-orchestrator-mint-api branch from 698f920 to a2714d6 Compare August 14, 2026 18:16
@rouzwelt
rouzwelt force-pushed the 2026-07-28-orchestrator-mint-api branch from a2714d6 to 6ce2ad4 Compare August 14, 2026 20:47
@rouzwelt
rouzwelt force-pushed the 2026-07-28-orchestrator-mint-recovery branch from d80069e to 47bccc7 Compare August 14, 2026 20:47
@graphite-app
graphite-app Bot force-pushed the 2026-07-28-orchestrator-mint-recovery branch from 47bccc7 to ae6aa7c Compare August 14, 2026 21:10
@graphite-app

graphite-app Bot commented Aug 14, 2026

Copy link
Copy Markdown

Merge activity

  • Aug 14, 10:26 PM UTC: rouzwelt added this pull request to the Graphite merge queue.
  • Aug 14, 10:26 PM UTC: CI is running for this pull request on a draft pull request (#345) due to your merge queue CI optimization settings.
  • Aug 14, 10:27 PM UTC: Merged by the Graphite merge queue via draft PR: #345.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request externally-merged Graphite MQ merged this PR; Linear should treat the close as a merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants