Skip to content

[runtime] stabilize schema verify polling test#42

Open
GsCommand wants to merge 1 commit intomainfrom
codex/fix-schema-verification-test-timeout-and-retry-logic
Open

[runtime] stabilize schema verify polling test#42
GsCommand wants to merge 1 commit intomainfrom
codex/fix-schema-verification-test-timeout-and-retry-logic

Conversation

@GsCommand
Copy link
Contributor

Motivation

  • The full-chain schema verification step was intermittently aborting in CI because the test used a too-short timeout and only a single quick retry, which doesn't respect the runtime validator warmup model.
  • The goal is to make the test deterministic in CI without changing runtime code by making the verify helper more tolerant and by polling the verify endpoint a few times.

Description

  • Increased the /verify?schema=1 request helper AbortController timeout from 5000 ms to 10000 ms by updating verifyReceiptWithTimeout in runtime/tests/runtime-signing.test.mjs.
  • Replaced the previous single-retry flow with a polling loop that allows up to 3 attempts, logs each attempt with console.log messages like [chain] before verify request attempt N and [chain] after verify response attempt N, and stops early if a 200 response is observed.
  • When a 202 is returned the loop logs the warmup response and waits for the retry_after_ms value if present, otherwise falls back to 1200 ms before retrying.
  • Preserved the original chain-step logs for clean/summarize/classify and kept the final schema/hash/signature assertions unchanged, while improving failure messages to include the last status/body and any abort details.

Testing

  • Ran the modified test file with node --test runtime/tests/runtime-signing.test.mjs and the suite passed (all subtests succeeded).

Codex Task

Why: CI needs the chain test to tolerate validator warmup without aborting after a single short retry.
Contract impact: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant