Skip to content

fix(framework): resolve vite/vitest from apps/framework, not repo root - #156

Merged
Rodriguespn merged 2 commits into
mainfrom
prodrigues/fix-typecheck-main
Aug 3, 2026
Merged

fix(framework): resolve vite/vitest from apps/framework, not repo root#156
Rodriguespn merged 2 commits into
mainfrom
prodrigues/fix-typecheck-main

Conversation

@Rodriguespn

@Rodriguespn Rodriguespn commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Solves the lingering failed framework smoke test that was erroring because project-runner.ts looked for vite/vitest in the monorepo root's node_modules instead of apps/framework's, where pnpm actually installs them.

Note: no CI workflow runs pnpm check/typecheck (only biome format:check does), so this failure never surfaced in Actions — only locally, and silently, since the smoke script's error output is suppressed unless run with --debug.

Repro on main:

pnpm --filter @supabase-evals/framework test:framework -- --debug

Fails with Cannot find module '.../node_modules/vite/bin/vite.js'.

project-runner.ts pointed ROOT three directories up (to the monorepo
root) after the apps/framework move, so viteBuild/vitestRun looked for
node_modules/vite and node_modules/vitest where they don't exist under
pnpm's isolated layout, breaking every frontend eval scoring run
(smoke-framework.ts's failure was silenced by its debug-gated
console.error shim). Point ROOT at apps/framework and symlink its
node_modules into the workspace so vite/vitest can resolve themselves
and the eval fixture's deps (react, @vitejs/plugin-react, etc).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
evals Ignored Ignored Preview Aug 3, 2026 8:59am

Request Review

@Rodriguespn
Rodriguespn marked this pull request as ready for review August 2, 2026 17:03
@Rodriguespn
Rodriguespn requested review from a team and barryroodt August 2, 2026 17:03

@barryroodt barryroodt 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.

Good catch, and this passes the framework smoke test locally.

One issue before merge: each workspace now keeps a node_modules symlink under results/, and upload-artifact follows symlinks, so every frontend eval artifact will carry the framework dependencies. Could you add !results/**/node_modules/** to the upload step?

upload-artifact dereferences symlinks, so the node_modules symlink that
project-runner.ts now drops into each workspace under results/ would get
copied into every frontend eval's artifact. Addresses review feedback on PR #156.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Rodriguespn
Rodriguespn merged commit b8641b9 into main Aug 3, 2026
7 checks passed
barryroodt added a commit that referenced this pull request Aug 3, 2026
…ests-into-per-scorer-vitest-files

Conflict in apps/framework/harness/project-runner.ts: #156 and this branch
fix the same root cause (vite/vitest resolution) different ways.

#156 keeps the toolchain in apps/framework and symlinks its node_modules
into the workspace. This branch moves the toolchain to the root manifest so
the workspace under results/ resolves by walking up, which is the contract
copyToHost already documents. Kept this branch's resolvePackageBin, dropped
linkNodeModules: after the merge apps/framework/node_modules/vite no longer
exists, so #156's path would throw the very error it fixed.

Kept #156's eval-refresh.yml artifact exclusion. Vite still writes
node_modules/.vite into the workspace, so it is not vestigial.
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.

2 participants