Skip to content

fix: remove evals/promptfoo from workspace to fix concurrent execution hang#1125

Merged
stack72 merged 1 commit intomainfrom
fix/exclude-promptfoo-from-workspace
Apr 6, 2026
Merged

fix: remove evals/promptfoo from workspace to fix concurrent execution hang#1125
stack72 merged 1 commit intomainfrom
fix/exclude-promptfoo-from-workspace

Conversation

@stack72
Copy link
Copy Markdown
Contributor

@stack72 stack72 commented Apr 6, 2026

Summary

  • Remove evals/promptfoo from the deno.json workspace array
  • Add --exclude evals to scripts/compile.ts compile flags
  • Regenerate deno.lock (shrinks from 6578 → 1527 lines)

Root Cause

Commit 356fab3 regenerated deno.lock, which fully resolved the evals/promptfoo workspace member's dependency tree for the first time. This pulled in:

promptfoo@0.121.3 → drizzle-orm@0.45.2 → better-sqlite3@12.8.0

better-sqlite3 is a native Node.js addon (C++ SQLite binding). When deno compile --unstable-bundle builds the swamp binary, this native addon gets included in the dependency resolution graph and interferes with Deno's built-in node:sqlite DatabaseSync — causing concurrent model method run processes to hang indefinitely.

Evidence:

Fix

Remove evals/promptfoo from the workspace so its transitive deps don't pollute the shared deno.lock. The evals directory retains its own package.json and can manage deps independently via npm install.

Test plan

  • deno check main.ts — passes
  • deno.lock has zero references to sqlite, drizzle, better-sqlite3, or promptfoo
  • CI tests pass
  • After binary release, swamp-uat Tier 3 concurrency tests pass

🤖 Generated with Claude Code

…ecution hang

The evals/promptfoo workspace member pulled better-sqlite3 (a native
Node.js addon) into deno.lock as a transitive dependency via
drizzle-orm. When deno compile --unstable-bundle built the binary, this
native addon interfered with Deno's built-in node:sqlite DatabaseSync,
causing concurrent model method run processes to hang indefinitely.

This was introduced in 356fab3 when deno.lock was regenerated and fully
resolved promptfoo's dependency tree for the first time (lock grew from
1536 to 6578 lines). The previous build (287b665) worked because its
lock file had never resolved those transitive deps.

Changes:
- Remove evals/promptfoo from deno.json workspace array
- Add --exclude evals to scripts/compile.ts for defense-in-depth
- Regenerate deno.lock (1527 lines, zero sqlite/drizzle references)

The evals directory retains its own package.json and can manage deps
independently via npm install.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Code Review

Blocking Issues

None.

Suggestions

None — this is a clean, well-scoped fix. The root cause analysis is thorough and the change is minimal: removing the workspace member, regenerating the lockfile, and adding the compile exclusion. The --exclude evals addition to scripts/compile.ts is consistent with the existing exclude pattern already in place for other dev-only directories.

@stack72 stack72 merged commit 23deeec into main Apr 6, 2026
10 checks passed
@stack72 stack72 deleted the fix/exclude-promptfoo-from-workspace branch April 6, 2026 20:20
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