Skip to content

[runtime] improve chain test failure diagnostics#35

Merged
GsCommand merged 1 commit intomainfrom
codex/update-chain-test-to-improve-logging-and-timeout-handling
Mar 20, 2026
Merged

[runtime] improve chain test failure diagnostics#35
GsCommand merged 1 commit intomainfrom
codex/update-chain-test-to-improve-logging-and-timeout-handling

Conversation

@GsCommand
Copy link
Contributor

Motivation

  • The full-chain clean->summarize->classify->verify test could hit the 20s suite timeout without exposing which network call stalled, making CI failures silent and hard to debug.
  • The change is test-only and intended to reveal the exact stalled step and handle a known validator warmup 202 path without touching runtime logic.

Description

  • Added simple console.log statements before and after each network call in the chain (clean, summarize, classify, verify) so CI output shows the last completed step via runtime/tests/runtime-signing.test.mjs.
  • Reduced request-level timeouts to 5s by using AbortController timeouts for both runVerb(...) and the final /verify?schema=1 helper to fail faster than the overall suite timeout.
  • Introduced verifyReceiptWithTimeout(...) that mirrors runVerb error handling, returns { res, text, json }, and throws clear messages like verify failed: AbortError or verify failed: HTTP <status>: ... on errors.
  • Implemented a one-time retry when /verify?schema=1 returns 202 with reason === "validator_not_warmed_yet", including logging the 202 response and waiting 1200ms before retrying, and ensured the test prints accumulated server stderr on failure.

Testing

  • Ran node --test runtime/tests/runtime-signing.test.mjs and the test suite passed locally (all tests OK).
  • The change is minimal and only affects test diagnostics and timeouts; no runtime or protocol contracts were modified.

Codex Task

Why: expose the exact stalled network step in CI before the full-chain signing test hits its suite timeout.
Contract impact: none
@GsCommand GsCommand merged commit b4f8a16 into main Mar 20, 2026
1 check failed
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