Skip to content

fix: enforce disabled_assets in v1 request-external-match#1428

Merged
sehyunc merged 1 commit intov1from
codex/fix-v1-disabled-request-external-match
Apr 2, 2026
Merged

fix: enforce disabled_assets in v1 request-external-match#1428
sehyunc merged 1 commit intov1from
codex/fix-v1-disabled-request-external-match

Conversation

@sehyunc
Copy link
Copy Markdown
Contributor

@sehyunc sehyunc commented Apr 2, 2026

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/USDC request returned 204 No Content instead of 400 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.rs

Validation

Live deploy validation before this patch showed:

  • GET /v0/supported-tokens filtered disabled assets correctly
  • depth endpoints rejected / omitted disabled assets correctly
  • quote endpoints rejected disabled assets correctly
  • request-malleable-external-match rejected disabled assets correctly
  • only request-external-match still bypassed the guard

This patch makes request-external-match consistent with the rest of the rollout.

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
@sehyunc sehyunc requested a review from akirillo April 2, 2026 22:39
@sehyunc sehyunc merged commit a132d7c into v1 Apr 2, 2026
1 of 5 checks passed
@sehyunc sehyunc deleted the codex/fix-v1-disabled-request-external-match branch April 2, 2026 22:55
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.

1 participant