Skip to content

fix(contract.live): 120 s per-test timeout for mint-bound probes - #76

Merged
TaprootFreak merged 1 commit into
developfrom
fix/contract-live-timeouts
May 17, 2026
Merged

fix(contract.live): 120 s per-test timeout for mint-bound probes#76
TaprootFreak merged 1 commit into
developfrom
fix/contract-live-timeouts

Conversation

@TaprootFreak

Copy link
Copy Markdown
Contributor

Follow-up to #69.

What

The three live-contract tests (info, mint, balance) inherited
vitest's 5 s default testTimeout. /api/mint triggers real ZK proof
generation 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 → sendSigned round-trip. When the test was refactored
into three endpoint-specific cases (to remove the WASM dependency),
only /api/info was fast enough for the default; the other two
needed the same explicit override carried over.

Reproduction

api-contract.yml run 26004360092
— first manual workflow_dispatch against develop post-merge:

  • GET /api/info
  • POST /api/mint ✗ timeout after 5 s
  • GET /api/balance ✗ timeout after 5 s

Fix

Pass MINT_TIMEOUT_MS = 120_000 as the per-test timeout argument on
the two mint-bound cases. /api/info keeps the default — it's a plain
GET and finishes in well under a second.

Verification

api-contract.yml run 26004407114
workflow_dispatch against fix/contract-live-timeouts:

  • All three tests green
  • Real /api/mint/api/balance round-trip succeeded
  • Schemas parsed against the live DEV server

Test plan

  • npm run lint — green
  • npm test — 175 passed / 3 skipped (3 contract.live still gated
    by RUN_API_CONTRACT)
  • npm run build — green
  • Manual gh workflow run against this branch — green

…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.
@github-actions

Copy link
Copy Markdown
Contributor

[OK] Button-Inventory-Audit

src/ testids: 69 literal + 7 template-literal pattern(s)
e2e/ testids referenced: 69

A. testids in src/, not referenced in e2e/

None.

B. testids in e2e/, no literal in src/

  • nav-settings -- generated from template literal nav-${label.toLowerCase()}
  • nav-wallet -- generated from template literal nav-${label.toLowerCase()}
  • wallet-receive-btn -- generated from template literal wallet-${icon}-btn
  • wallet-send-btn -- generated from template literal wallet-${icon}-btn

C. /onClick without testid or aria-label

  • src/app/settings/page.tsx:43 (wrapper-exempt) -- <button
  • src/app/settings/page.tsx:44 (wrapper-exempt) -- onClick={() => !disabled && setOn((v) => !v)}
  • src/components/onboarding/Onboarding.tsx:542 (feature-gated-exempt) -- <button
  • src/components/onboarding/Onboarding.tsx:543 (feature-gated-exempt) -- onClick={register}
  • src/components/onboarding/Onboarding.tsx:830 (feature-gated-exempt) -- <button
  • src/components/onboarding/Onboarding.tsx:831 (feature-gated-exempt) -- onClick={restore}
  • src/components/screens/WalletScreen.tsx:146 (feature-gated-exempt) -- <button
  • src/components/screens/WalletScreen.tsx:147 (feature-gated-exempt) -- onClick={async () => {

@TaprootFreak
TaprootFreak marked this pull request as ready for review May 17, 2026 22:33
@TaprootFreak
TaprootFreak merged commit f9c5660 into develop May 17, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant