fix: enforce disabled_assets in v1 request-external-match#1428
Merged
Conversation
Live deploy validation showed request-external-match still bypassed the shared disabled-assets guard even though the sibling quote, assemble, and malleable paths already enforced it. Add the missing pair check in the direct-match path so the endpoint fails consistently with the rest of the rollout. Constraint: Keep the fix surgical against the already-deployed v1 rollout Rejected: Broader harness and wallet-route test expansion | not required for the production bug fix Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep disabled-asset enforcement aligned across all external-match entry points Tested: Live deploy validation identified the failing endpoint before patch Not-tested: Local compile/test verification remains noisy due unrelated workspace feature-resolution issues
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 remaining v1 disabled-assets gap in
POST /v0/matching-engine/request-external-match.Problem
PR #1427 deployed most of the v1 disabled-asset protections successfully, but live validation showed that direct external-match requests could still proceed for disabled pairs. In production, a disabled
AAVE/USDCrequest returned204 No Contentinstead of400 token is not supported.Root cause
ExternalMatchProcessor::request_match_bundle(...)did not call the shared disabled-pair guard, even though the sibling quote / assemble / malleable-match paths already did.Fix
Add the missing:
self.validate_pair_not_disabled(&external_order)?;to:
workers/api-server/src/http/external_match/processor.rsValidation
Live deploy validation before this patch showed:
GET /v0/supported-tokensfiltered disabled assets correctlyrequest-malleable-external-matchrejected disabled assets correctlyrequest-external-matchstill bypassed the guardThis patch makes
request-external-matchconsistent with the rest of the rollout.