Skip to content

chore(repo): bump vitest, add smol top-level vitest config - #6567

Open
kanadgupta wants to merge 14 commits into
kanad-claude/cli-2422-knip-cleanupfrom
kanad-2026-09-10/vitest-5
Open

chore(repo): bump vitest, add smol top-level vitest config#6567
kanadgupta wants to merge 14 commits into
kanad-claude/cli-2422-knip-cleanupfrom
kanad-2026-09-10/vitest-5

Conversation

@kanadgupta

@kanadgupta kanadgupta commented Sep 11, 2026

Copy link
Copy Markdown
Member

Summary

  • upgrades this repo to vitest 5. as part of this...
    • addresses a few warnings as part of this upgrade
    • adds a tiny top-level config file so we can run tests from the root (this is one of those extremely small DX papercuts that's been bugging me like crazy 😅)
    • tweaks the cwd setup in a few tests so they can be run from the root
    • adds a test:vitest script to the root to run all non-live tests

Checklist

  • The PR title follows Conventional Commits (e.g. fix(cli): …).
  • Tests added or updated for the change.
  • From the repository root, pnpm check:all passes; relevant package tests pass for every touched workspace, and pnpm types:check passes for each touched TypeScript workspace (or workspace declaring it).

@kanadgupta kanadgupta added the run-ci Run full develop CI (tests) on drafts and non-develop PRs. label Sep 11, 2026
@kanadgupta
kanadgupta changed the base branch from develop to kanad-claude/cli-2422-knip-cleanup September 12, 2026 00:11
@kanadgupta
kanadgupta added this pull request to stack #6584 September 12, 2026 00:12
@kanadgupta kanadgupta changed the title chore(repo): bump vitest, effect, add smol top-level vitest config chore(repo): bump vitest, add smol top-level vitest config Sep 12, 2026
@kanadgupta
kanadgupta force-pushed the kanad-2026-09-10/vitest-5 branch from 0149fcc to d4a592a Compare September 12, 2026 00:27
@kanadgupta
kanadgupta force-pushed the kanad-2026-09-10/vitest-5 branch from d4a592a to 1ca743d Compare September 12, 2026 00:30
@kanadgupta
kanadgupta marked this pull request as ready for review September 12, 2026 00:37
@kanadgupta
kanadgupta requested a review from a team as a code owner September 12, 2026 00:37
@kanadgupta
kanadgupta force-pushed the kanad-2026-09-10/vitest-5 branch from 1ca743d to 0458190 Compare September 12, 2026 00:37

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 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.

Comment thread commitlint.config.js
// 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"];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

Comment thread apps/cli/vitest.config.ts
resolve: workspacePackageResolve,
ssr: { resolve: workspacePackageSsrResolve },
plugins: [dockerfileTextPlugin()],
test: {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

Comment thread package.json
"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)'",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

Comment thread pnpm-lock.yaml
@@ -293,11 +296,11 @@ importers:
version: 0.5.0
jose:
specifier: ^6.2.10
version: 6.2.10
version: 6.2.11

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

Comment thread pnpm-workspace.yaml
"tldts": "^7.4.11"
"turbo": "2.10.12"
"vitest": "^4.1.11"
"vitest": ^5.0.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚪ 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,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚪ 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚪ 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.

@kanadgupta
kanadgupta force-pushed the kanad-2026-09-10/vitest-5 branch from 0458190 to 786b3bf Compare September 12, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-ci Run full develop CI (tests) on drafts and non-develop PRs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant