Repository navigation
Accept Avenia liveness targets without a validation token and tolerate low liquidity in the quote smoke test - #1476
Merged
Merged
Conversation
Avenia stopped sending validateLivenessToken when it creates a SELFIE-FROM-LIVENESS document target. The response schema still required it, so getUploadUrls and getSelfieLivenessUrl answered 502 and the BRL KYC document step could not start. No client reads the token, so it becomes optional and is passed through when Avenia sends it.
A drained pool is an operational state, not a deployment regression. While it lasts, the nightly quote smoke test failed on every run and hid any new failure behind a known one. Only the exact low-liquidity answer is tolerated and logged; every other non-201 still fails.
✅ Deploy Preview for vortexfi canceled.
|
✅ Deploy Preview for vrtx-dashboard canceled.
|
✅ Deploy Preview for vortex-sandbox ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
The exception also covered BUY and matched the message anywhere in any non-201 body. It now needs a SELL quote, HTTP 500 and the exact message, and shows as a warning annotation on the run.
Covers getSelfieLivenessUrl, getUploadUrls and kyb/documents, and names kyb/documents in the spec item, since it parses the same provider response.
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
Both nightly workflows have been red for more than a week.
external-api-contracts: Avenia no longer returns
validateLivenessTokenwhen it creates aSELFIE-FROM-LIVENESSdocument target. Our response schema required the field. As a result,POST /v1/brla/getUploadUrlsandGET /v1/brla/getSelfieLivenessUrlanswer 502, as doesPOST /v1/brl/kyb/documentsfor a liveness document, and BRL individual KYC can't get past the document step. Nothing reads the token: the frontend, the dashboard andpackages/kycuse onlylivenessUrl. So the field becomes optional and is passed through when Avenia sends it.e2e: the live quote smoke test fails. On 19, 20 and 23 November only the USDT → BRL SELL quote failed, with "low liquidity" on staging and production. That reflects pool state, not a deployment regression. While it lasts, every nightly is red, and any new failure is hidden behind the known one. The smoke test now treats that exact SELL answer as inconclusive and shows it as a warning annotation on the run. Every other failure, including low liquidity on BUY, still fails the test.
On 21 and 22 November all four quotes, BUY included, answered a generic 500. In the same nights' contract runs a price-feed read reverted. That is a separate issue, this PR does not address it, and such nights stay red.
Changes
validateLivenessTokenis now optional in the Avenia response schema, inLivenessDocumentResponse, and in theBrGetSelfieLivenessUrlResponseandBrKYCDataUploadwire types. Adds a regression unit test that fails without the fix.deployed-quotes.e2e.test.tsturns a low-liquidity SELL (HTTP 500 and the exact message) into a warning annotation instead of a failure. New controller tests cover responses without the token ongetSelfieLivenessUrl,getUploadUrlsandkyb/documents.05-integrations/brla.mditem 27, the smoke-test paragraph inoperations-testing.md,vortex.openapi.jsonwith its generated types, and the wire-contract snapshot. In the OpenAPI file the field is now optional, with a provider-neutral description in both schemas.docs:api:checkpasses, including its secret scan. That file is ready to import into Apidog, which still lists the field as required.Compatibility
The
validateLivenessTokenresponse field ofgetUploadUrls,getSelfieLivenessUrlandkyb/documentsis now omitted when Avenia omits it. Today those routes return 502 in that case, so no working integration loses anything. The SDK surface is unchanged.Tests
bun typecheck,bun verify,docs:api:checkandwire-contract:checkall pass. The full API suite below was run before them.apps/apifull suite (bun run test:coverage): 3,292 pass and the coverage gate passes (lines 84.24%, functions 85.39%). Another worktree's run sharedvortex_testat the same time and caused duplicate-key and deadlock failures. Each affected file passed when rerun alone (8 files, 240 tests).packages/shared333 pass,packages/kyc86,test:sdk190,test:consumer-kit127,test:frontend236,test:stocks446,test:gold71RUN_LIVE_TESTS=1): 6 pass, with both SELL quotes reported as inconclusivecontracts.ymlon0d1bfc5c2(run): 47 pass, 0 fail, 28 skip. The Avenia document test passes live, including the read-back and listing checksbun typecheck,bun verify,docs:api:checkandwire-contract:checkall pass