fix(contract.live): 120 s per-test timeout for mint-bound probes - #76
Merged
Conversation
…obes vitest's 5 s default times out the /api/mint and /api/balance probes before the server's real ZK-proof generation completes (typical 10–20 s on DEV). The pre-merge version had a single 120 s timeout on the combined round-trip test; when the test was split into three endpoint-specific cases, only /api/info inherited the default — the other two needed the same explicit override. Confirmed by manual workflow_dispatch on develop (run 26004360092): /api/info green, /api/mint + /api/balance timed out at 5 s.
Contributor
[OK] Button-Inventory-Auditsrc/ testids: 69 literal + 7 template-literal pattern(s) A. testids in src/, not referenced in e2e/None. B. testids in e2e/, no literal in src/
C. /onClick without testid or aria-label
|
TaprootFreak
marked this pull request as ready for review
May 17, 2026 22:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #69.
What
The three live-contract tests (
info,mint,balance) inheritedvitest's 5 s default
testTimeout./api/minttriggers real ZK proofgeneration on the DEV server — typical 10–20 s end-to-end — so two of
the three tests aborted before the response landed.
The pre-merge version had a single 120 s timeout on the combined
mint → balance → sendSignedround-trip. When the test was refactoredinto three endpoint-specific cases (to remove the WASM dependency),
only
/api/infowas fast enough for the default; the other twoneeded the same explicit override carried over.
Reproduction
api-contract.ymlrun 26004360092— first manual
workflow_dispatchagainstdeveloppost-merge:GET /api/info✓POST /api/mint✗ timeout after 5 sGET /api/balance✗ timeout after 5 sFix
Pass
MINT_TIMEOUT_MS = 120_000as the per-test timeout argument onthe two mint-bound cases.
/api/infokeeps the default — it's a plainGET and finishes in well under a second.
Verification
api-contract.ymlrun 26004407114—
workflow_dispatchagainstfix/contract-live-timeouts:/api/mint→/api/balanceround-trip succeededTest plan
npm run lint— greennpm test— 175 passed / 3 skipped (3 contract.live still gatedby
RUN_API_CONTRACT)npm run build— greengh workflow runagainst this branch — green