chore(repo): bump vitest, add smol top-level vitest config - #6567
chore(repo): bump vitest, add smol top-level vitest config#6567kanadgupta wants to merge 14 commits into
Conversation
0149fcc to
d4a592a
Compare
d4a592a to
1ca743d
Compare
1ca743d to
0458190
Compare
There was a problem hiding this comment.
🤖 AI Review
Verified 9 Claude and 3 Codex findings; three overlapping pairs deduplicate to 9 findings, all confirmed. The highest-risk issue is that @effect/vitest explicitly excludes Vitest 5. The PR also introduces broken test/CI wiring, an internally inconsistent Vitest plugin configuration, incidental runtime dependency drift, and several nits.
Findings
| Severity | Location | Category | Sources | Claim |
|---|---|---|---|---|
| 🟠 MAJOR | pnpm-lock.yaml:939 |
dependencies |
claude | The Vitest 5 upgrade runs @effect/vitest outside its declared peer range. |
| 🟡 MINOR | commitlint.config.js:16 |
ci-configuration |
claude+codex | The new deps scope passes commitlint but remains rejected by the pull-request title check. |
| 🟡 MINOR | apps/cli/vitest.config.ts:57 |
test-infrastructure |
claude | The per-project Dockerfile loader was removed even though the retained configuration says inline projects do not inherit root Vite configuration. |
| 🟡 MINOR | package.json:16 |
test-infrastructure |
claude+codex | The aggregate test:vitest script includes E2E projects but bypasses their required CLI build. |
| 🟡 MINOR | pnpm-lock.yaml:299 |
dependencies |
claude | The lockfile regeneration includes unrelated upgrades to shipped runtime dependencies. |
| ⚪ NIT | pnpm-workspace.yaml:34 |
style |
claude | The new Vitest catalog value is unquoted, unlike the value it replaces and nearly all sibling catalog values. |
| ⚪ NIT | packages/stack/src/state/ownership.integration.test.ts:271 |
style |
claude | This new call site uses cwd: cwd while the equivalent sibling changes use property shorthand. |
| ⚪ NIT | apps/cli/src/commands/experimental/stack/start/start.e2e.test.ts:52 |
comments |
claude+codex | The newly added cwd comments narrate the following assignments instead of explaining non-obvious rationale. |
| ⚪ NIT | pnpm-workspace.yaml:110 |
maintenance |
claude | The minimumReleaseAgeExclude entries for @types/bun@1.4.0 and bun-types@1.4.0 are stale after the lockfile moved to 1.4.1. |
Findings outside the diff
- 🟠 MAJOR
pnpm-lock.yaml:939— The Vitest 5 upgrade runs @effect/vitest outside its declared peer range. - ⚪ NIT
pnpm-workspace.yaml:110— The minimumReleaseAgeExclude entries for @types/bun@1.4.0 and bun-types@1.4.0 are stale after the lockfile moved to 1.4.1.
Stats
Claude findings: 9 · Codex findings: 3 · Confirmed: 9 · Refuted: 0 · Uncertain: 0
Models: claude-opus-5 + gpt-5.6-sol · Trigger: auto · Workflow run
This review runs once per PR. A maintainer can request another with a /ai-review comment.
| // isn't a turbo project (tools/release has no package.json) but is a real | ||
| // scope emitted by the automated release-notes-proposal commit. | ||
| const ESCAPE_SCOPES = ["ci", "repo", "misc", "release"]; | ||
| const ESCAPE_SCOPES = ["ci", "deps", "repo", "misc", "release"]; |
There was a problem hiding this comment.
🟡 MINOR · ci-configuration · source: claude+codex
The new deps scope passes commitlint but remains rejected by the pull-request title check.
Evidence: commitlint.config.js:16 adds deps, but .github/workflows/lint-pull-request.yml:47-62 says its scope list mirrors commitlint and omits deps. trusted/CLAUDE.md:149-151 requires these lists to remain synchronized.
Suggested fix: Add deps to the workflow's scopes list.
| resolve: workspacePackageResolve, | ||
| ssr: { resolve: workspacePackageSsrResolve }, | ||
| plugins: [dockerfileTextPlugin()], | ||
| test: { |
There was a problem hiding this comment.
🟡 MINOR · test-infrastructure · source: claude
The per-project Dockerfile loader was removed even though the retained configuration says inline projects do not inherit root Vite configuration.
Evidence: apps/cli/vitest.config.ts:19-23 documents non-inheritance; lines 55-56, 64-65, 72-73, and 85-86 still duplicate root resolve settings, but dockerfileTextPlugin now appears only at line 30. Dockerfile text imports remain at apps/cli/src/shared/services/dockerfile-images.ts:1 and apps/cli/src/shared/services/services.shared.unit.test.ts:4.
Suggested fix: If Vitest 5 still does not inherit root plugins, restore the plugin to each project. If inheritance changed, remove the obsolete duplication and update the comment.
| "test:unit": "pnpm exec turbo run test:unit:run --filter=!@supabase/cli-go --", | ||
| "test:integration": "pnpm exec turbo run test:integration:run --", | ||
| "test:e2e": "pnpm exec turbo run supabase#build && pnpm exec turbo run test:e2e:run --only --concurrency=1 --", | ||
| "test:vitest": "bun --bun vitest run --project '!supabase (live)'", |
There was a problem hiding this comment.
🟡 MINOR · test-infrastructure · source: claude+codex
The aggregate test:vitest script includes E2E projects but bypasses their required CLI build.
Evidence: package.json:16 excludes only supabase (live), while vitest.config.mts:5 loads all package configurations. apps/cli/vitest.config.ts:71-82 defines an e2e project, apps/cli-e2e/vitest.config.ts:5-13 is also E2E, and turbo.json:126-135 gives both E2E tasks a supabase#build dependency. packages/cli-test-helpers/src/harness.ts:95-112 explicitly fails when CLI artifacts are absent.
Suggested fix: Build supabase before invoking Vitest, or exclude E2E projects from this aggregate script.
| @@ -293,11 +296,11 @@ importers: | |||
| version: 0.5.0 | |||
| jose: | |||
| specifier: ^6.2.10 | |||
| version: 6.2.10 | |||
| version: 6.2.11 | |||
There was a problem hiding this comment.
🟡 MINOR · dependencies · source: claude
The lockfile regeneration includes unrelated upgrades to shipped runtime dependencies.
Evidence: pnpm-lock.yaml:297-299 moves apps/cli's direct jose dependency from 6.2.10 to 6.2.11, while lines 182-184 and 340-342 move @supabase/supabase-js from 2.112.4 to 2.115.0 without corresponding manifest range changes. The diff contains additional unrelated package drift.
Suggested fix: Regenerate the lockfile with a targeted Vitest update, or explicitly include and review the additional dependency upgrades as part of this PR's scope.
| "tldts": "^7.4.11" | ||
| "turbo": "2.10.12" | ||
| "vitest": "^4.1.11" | ||
| "vitest": ^5.0.0 |
There was a problem hiding this comment.
⚪ NIT · style · source: claude
The new Vitest catalog value is unquoted, unlike the value it replaces and nearly all sibling catalog values.
Evidence: pnpm-workspace.yaml:34 uses "vitest": ^5.0.0, while @vitest/coverage-v8 at line 25 and most surrounding catalog values are quoted; the previous Vitest value was also quoted.
Suggested fix: Use "vitest": "^5.0.0".
| ["--input-type=module", "-e", script], | ||
| { | ||
| cwd: process.cwd(), | ||
| cwd: cwd, |
There was a problem hiding this comment.
⚪ NIT · style · source: claude
This new call site uses cwd: cwd while the equivalent sibling changes use property shorthand.
Evidence: packages/stack/src/state/ownership.integration.test.ts:271 uses cwd: cwd; the new call sites at registry-lease.integration.test.ts:52, handles.integration.test.ts:782, and effect-stack.integration.test.ts:2006 use cwd shorthand.
Suggested fix: Change the property to cwd,.
| enabled = false | ||
| `; | ||
|
|
||
| // set the root to `apps/cli` root |
There was a problem hiding this comment.
⚪ NIT · comments · source: claude+codex
The newly added cwd comments narrate the following assignments instead of explaining non-obvious rationale.
Evidence: The comment at apps/cli/src/commands/experimental/stack/start/start.e2e.test.ts:52 merely describes line 53. Equivalent narration appears at packages/stack/src/public/effect-stack.integration.test.ts:1979, state/ownership.integration.test.ts:246, state/registry-lease.integration.test.ts:35, and supervisor/handles.integration.test.ts:761. trusted/CLAUDE.md:121-144 explicitly rejects code narration.
Suggested fix: Remove the comments or replace them with the reason the child process must run from the package root.
This reverts commit 42954e9.
0458190 to
786b3bf
Compare
Summary
cwdsetup in a few tests so they can be run from the roottest:vitestscript to the root to run all non-live testsChecklist
fix(cli): …).pnpm check:allpasses; relevant package tests pass for every touched workspace, andpnpm types:checkpasses for each touched TypeScript workspace (or workspace declaring it).