Skip to content

[runtime] tighten verify warmup polling and centralize cached-only warmup#46

Merged
GsCommand merged 1 commit intomainfrom
codex/tighten-test-durability-and-improve-warmup-handling
Mar 20, 2026
Merged

[runtime] tighten verify warmup polling and centralize cached-only warmup#46
GsCommand merged 1 commit intomainfrom
codex/tighten-test-durability-and-improve-warmup-handling

Conversation

@GsCommand
Copy link
Contributor

Motivation

  • Remove hidden timing assumptions from the full-chain schema verification test so it models cached-only validator warmup reliably.
  • Consolidate cached-only validator warmup entrypoint inside the runtime to reduce duplicated queue/start logic.
  • Preserve the /verify public contract while making failures clearer and deterministic.

Description

  • Update the full-chain test runtime/tests/runtime-signing.test.mjs to replace fragile single-retry logic with a bounded 3-attempt polling loop that treats 202 + validator_not_warmed_yet as an expected warmup state and respects retry_after_ms with a 1000ms fallback.
  • Increase request-level AbortController timeout for /verify calls in the test to 10000ms to avoid spurious aborts during warmup.
  • Keep strict final assertions (require verifyJson.checks.signature_valid === true, hash_matches === true, and schema_valid === true) and fail clearly if warmup never completes or an unexpected response is returned.
  • Replace manual warmQueue.add(verb) / startWarmWorker() calls in the /verify cached-only path with the canonical warmValidatorForVerb(verb) helper while preserving the 202 status, response body shape, schema_errors payload, and retry_after_ms behavior.

Testing

  • Ran node --test runtime/tests/runtime-signing.test.mjs and the test suite completed successfully with the full-chain test passing.
  • No other repo files were modified and existing verification/signing semantics and public /verify contract remain unchanged.

Codex Task

…n schema verification test resilient to cached-only validator warmup while routing verify warmup through the shared helper.\nContract impact: none
@GsCommand GsCommand merged commit bc9c97a into main Mar 20, 2026
1 check passed
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