fix: remove evals/promptfoo from workspace to fix concurrent execution hang#1125
Merged
fix: remove evals/promptfoo from workspace to fix concurrent execution hang#1125
Conversation
…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>
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
evals/promptfoofrom thedeno.jsonworkspace array--exclude evalstoscripts/compile.tscompile flagsdeno.lock(shrinks from 6578 → 1527 lines)Root Cause
Commit 356fab3 regenerated
deno.lock, which fully resolved theevals/promptfooworkspace member's dependency tree for the first time. This pulled in:better-sqlite3is a native Node.js addon (C++ SQLite binding). Whendeno compile --unstable-bundlebuilds the swamp binary, this native addon gets included in the dependency resolution graph and interferes with Deno's built-innode:sqliteDatabaseSync— causing concurrentmodel method runprocesses to hang indefinitely.Evidence:
20260406.174233.0-sha.287b665f—deno.lockhad 0 sqlite refs20260406.181921.0-sha.356fab32—deno.lockhad 5 sqlite refsmodel method run) passes on the good binary and hangs on the bad binaryFix
Remove
evals/promptfoofrom the workspace so its transitive deps don't pollute the shareddeno.lock. The evals directory retains its ownpackage.jsonand can manage deps independently vianpm install.Test plan
deno check main.ts— passesdeno.lockhas zero references tosqlite,drizzle,better-sqlite3, orpromptfoo🤖 Generated with Claude Code