Repository navigation
Add admin dismissal for cross-chain setups that never got a quote - #11
Merged
Merged
Conversation
POST /api/admin/crosschain/{id}/dismiss {reason} closes a setup review
only when the attempt has no saved quote and no wallet send, the invoice
is expired or cancelled with no received ZEC, and the fee reservation is
unbound. Under BEGIN IMMEDIATE it records the dismissal in a new
crosschain_dismissals table; the attempt and fee rows are not modified.
operations::issues() skips dismissed rows unless the invoice confirms.
Setup failures now also log a coarse error kind (slot_timeout,
provider_timeout, provider_http_<code>, provider_rejected, ...) without
provider message text.
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.
Why
Any cross-chain setup failure marks the attempt
NEEDS_REVIEWand keeps the fee reservation, because the outcome might be ambiguous. Until now nothing could close such a review. The existingretryaction refuses attempts that have no saved quote. So a setup that provably never produced a deposit address stayed flagged forever and kept/api/healthatdegraded.Mainnet example: invoice
4f53e474…, a €1 USDC-on-Base checkout on 2026-10-24.stage="provider_quote", so no quote and no deposit address were issued.invoice_paymentsrow.Change
POST /api/admin/crosschain/{id}/dismisswith body{"reason": "..."}.X-Admin-Key.BEGIN IMMEDIATE; anything else returns 409 with the reason:NEEDS_REVIEWorCREATING;payload IS NULL(no quote was saved), and there is nosend_tokenand nosent_txid;expiredorcancelled, withreceived_zatoshis = 0and noinvoice_paymentsrows;reserved, with nocorrelation_id.crosschain_dismissalstable (invoice ID, prior state, reason, timestamp) through the tracked migrationcrosschain_dismissals_v2026_11_15. The attempt and fee rows are not modified or deleted.operations::issues()skips dismissed invoices while they are unconfirmed. If the invoice later confirms, it reappears for review.NEEDS_REVIEW, so the buyer view still shows "setup not sent".kind:slot_timeout,below_minimum,provider_timeout,provider_connect,provider_decode,provider_http_<code>,provider_rejected,provider_request,databaseorother. Provider message text is still never logged.Tests
cargo test --locked: 140 passed, 3 fixture-only tests ignored.scripts/check-dependency-exposure.pyandcargo auditwith the current ignores pass.Not deployed. Dismissing
4f53e474…on mainnet is a separate step, done after deploy.