Skip to content

test(checkpoint): bump session-checkpoint timeout to 10s - #250

Merged
kelsonpw merged 1 commit into
mainfrom
fix/test-tmpdir-flake
Apr 25, 2026
Merged

test(checkpoint): bump session-checkpoint timeout to 10s#250
kelsonpw merged 1 commit into
mainfrom
fix/test-tmpdir-flake

Conversation

@kelsonpw

@kelsonpw kelsonpw commented Apr 25, 2026

Copy link
Copy Markdown
Member

Summary

Fixes intermittent timeouts in src/lib/__tests__/session-checkpoint.test.ts that have been hitting reviewers across PRs (#241, #243, #244 all observed it; reproduces on origin/main independent of any branch).

Root cause: Each it() does await loadCheckpoint(...) which dynamic-imports ./registry.js. That import pulls in all 18 framework configs. Under parallel test-runner load it regularly exceeds vitest's default 5s testTimeout.

Fix: Set a 10s timeout on the affected describe block via vitest 4.x's options-object syntax (describe(name, { timeout }, fn)). Surgical — only this describe gets the bigger budget; everything else stays on the default 5s.

Why local, not vitest.config.ts

Bumping the global testTimeout in vitest.config.ts would also work, but PR #234 already modifies that file. Keeping the fix local to one test file avoids a guaranteed merge conflict and keeps the blast radius minimal.

Test plan

  • pnpm vitest run src/lib/__tests__/session-checkpoint.test.ts — 5 pass
  • pnpm vitest run src/__tests__/cli.test.ts src/lib/__tests__/session-checkpoint.test.ts — 38 pass under parallel load
  • pnpm test — full suite green (1237 passed, 17 skipped)
  • pnpm lint — clean

Out of scope

src/__tests__/cli.test.ts is also intermittently slow under parallel load (its custom 2s waitFor polling helper hits ceilings during full-suite runs), but that file is touched by 4 in-flight PRs (#234, #218, #209, #207). Fixing it now means a guaranteed conflict. Will land separately once those settle.

🤖 Generated with Claude Code


Note

Low Risk
Low risk: only adjusts a Vitest test timeout to reduce flaky failures, with no production code changes.

Overview
Reduces flaky timeouts in src/lib/__tests__/session-checkpoint.test.ts by applying a 10s per-describe timeout via Vitest’s options-object syntax.

No behavior assertions were changed; the update is scoped to this suite to accommodate slower loadCheckpoint() runs that dynamically import the framework registry under parallel test load.

Reviewed by Cursor Bugbot for commit d2f8249. Bugbot is set up for automated code reviews on this repo. Configure here.

The loadCheckpoint() tests dynamic-import ./registry.js, which pulls in
all 18 framework configs. Under parallel test-runner load this regularly
exceeds vitest's default 5s testTimeout, producing intermittent failures
across PRs (confirmed reproduces on origin/main, independent of any
in-flight branch).

Fix is local to the affected describe block via vitest 4.x's
options-object syntax. Keeps the change off vitest.config.ts (touched
by PR #234) so it doesn't collide with parallel work.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@kelsonpw
kelsonpw requested a review from a team April 25, 2026 19:31
@kelsonpw
kelsonpw requested a review from a team as a code owner April 25, 2026 19:31
@github-actions

Copy link
Copy Markdown
Contributor

🧙 Wizard CI

Run the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands:

Test all apps:

  • /wizard-ci all

Test all apps in a directory:

  • /wizard-ci django
  • /wizard-ci fastapi
  • /wizard-ci flask
  • /wizard-ci javascript-node
  • /wizard-ci javascript-web
  • /wizard-ci next-js
  • /wizard-ci python
  • /wizard-ci react-router
  • /wizard-ci vue

Test an individual app:

  • /wizard-ci django/django3-saas
  • /wizard-ci fastapi/fastapi3-ai-saas
  • /wizard-ci flask/flask3-social-media
Show more apps
  • /wizard-ci javascript-node/express-todo
  • /wizard-ci javascript-node/fastify-blog
  • /wizard-ci javascript-node/hono-links
  • /wizard-ci javascript-node/koa-notes
  • /wizard-ci javascript-node/native-http-contacts
  • /wizard-ci javascript-web/saas-dashboard
  • /wizard-ci next-js/15-app-router-saas
  • /wizard-ci next-js/15-app-router-todo
  • /wizard-ci next-js/15-pages-router-saas
  • /wizard-ci next-js/15-pages-router-todo
  • /wizard-ci python/meeting-summarizer
  • /wizard-ci react-router/react-router-v7-project
  • /wizard-ci react-router/rrv7-starter
  • /wizard-ci react-router/saas-template
  • /wizard-ci react-router/shopper
  • /wizard-ci vue/movies

Results will be posted here when complete.

@kelsonpw
kelsonpw merged commit 0bc2f89 into main Apr 25, 2026
13 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