From 855828b14bdcc20cafbc73b0774b66be16fff9f3 Mon Sep 17 00:00:00 2001 From: Greg Soucy Date: Fri, 20 Mar 2026 17:56:00 -0400 Subject: [PATCH] [runtime] tighten full-chain schema warmup retry test Why: CI needs the full-chain schema verification test to fail over to builtin schemas quickly enough for the existing verify retry to succeed. Contract impact: none --- runtime/tests/runtime-signing.test.mjs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/runtime/tests/runtime-signing.test.mjs b/runtime/tests/runtime-signing.test.mjs index 55e2ced..fc885f0 100644 --- a/runtime/tests/runtime-signing.test.mjs +++ b/runtime/tests/runtime-signing.test.mjs @@ -438,7 +438,7 @@ test("full chain clean -> summarize -> classify verifies with schema using parti RECEIPT_SIGNER_ID: "runtime.commandlayer.eth", VERIFY_SCHEMA_CACHED_ONLY: "1", VERIFY_MAX_MS: "12000", - SCHEMA_FETCH_TIMEOUT_MS: "3000", + SCHEMA_FETCH_TIMEOUT_MS: "50", SCHEMA_VALIDATE_BUDGET_MS: "3000", }); @@ -532,9 +532,11 @@ test("full chain clean -> summarize -> classify verifies with schema using parti let verifyAttempt = await verifyReceiptWithTimeout(finalReceipt); console.log("[chain] after verify response", verifyAttempt.res.status, verifyAttempt.json ?? verifyAttempt.text); - if (verifyAttempt.res.status === 202) { + const verifyRetryLimit = 2; + for (let attempt = 2; verifyAttempt.res.status === 202 && attempt <= verifyRetryLimit; attempt++) { console.log("[chain] verify warmup 202 response", verifyAttempt.json ?? verifyAttempt.text); - await new Promise((resolve) => setTimeout(resolve, 1200)); + const retryDelayMs = verifyAttempt.json?.retry_after_ms ?? 1200; + await new Promise((resolve) => setTimeout(resolve, retryDelayMs)); console.log("[chain] before verify request retry"); verifyAttempt = await verifyReceiptWithTimeout(finalReceipt); console.log("[chain] after verify response retry", verifyAttempt.res.status, verifyAttempt.json ?? verifyAttempt.text);