Skip to content

[runtime] Harden chain verify warmup handling#36

Open
GsCommand wants to merge 1 commit intomainfrom
codex/fix-verify-step-in-chain-test
Open

[runtime] Harden chain verify warmup handling#36
GsCommand wants to merge 1 commit intomainfrom
codex/fix-verify-step-in-chain-test

Conversation

@GsCommand
Copy link
Contributor

Motivation

  • The chain test was aborting the /verify?schema=1 request too early and did not handle a schema validator cold start, causing flaky AbortError failures in CI.
  • Increase the verify window and add retry logic so the test tolerates validator warmup without changing runtime code.
  • Make the verify step deterministic in CI by explicitly waiting and retrying on a 202 warmup response.

Description

  • Increased the AbortController timeout for the chain verify helper from 5000ms to 10000ms in runtime/tests/runtime-signing.test.mjs to avoid premature aborts.
  • Replaced the single /verify?schema=1 fetch with a bounded retry helper that logs the response status before parsing JSON, and on 202 logs validator warming, waits 1200ms, and retries once.
  • Centralized warmup handling inside the test helper and removed the previous ad-hoc retry at the call site, while leaving all final assertions intact and not modifying any runtime implementation files.

Testing

  • Ran the updated test file with node --test runtime/tests/runtime-signing.test.mjs and the suite passed locally.
  • The updated test exercised the new timeout and retry path and completed without AbortError or flaky failures.

Codex Task

Why: keep the signing chain test deterministic while schema validator startup can briefly return 202 in CI.

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