fix(harness): declare pi-mcp-adapter peer deps so the pi harness runs - #41
Merged
Conversation
itelo
force-pushed
the
itelo/pi-typebox-fix
branch
from
August 21, 2026 14:40
b9bbdb9 to
8032bc8
Compare
pi-coding-agent pins typebox exactly, so npm nested it under the coding-agent and left no top-level copy. pi-mcp-adapter also imports typebox and resolves it from its own dir, so on any clean install it threw `Cannot find module 'typebox'` the moment the pi harness loaded the MCP adapter — the pi run failed instantly with an empty diff. CI missed it because the eval (the only runtime exercise of pi) doesn't run in CI. Declare typebox (pinned 1.1.38) as a direct dep so it hoists to top-level where pi-mcp-adapter can find it. Also make the eval surface failures instead of hiding them: the real runner captures the step-failure reason (runIntegration reports it as an event, not a throw), threads it onto the case result, and run.ts prints a Failures section.
itelo
force-pushed
the
itelo/pi-typebox-fix
branch
from
August 21, 2026 14:45
c04023b to
3430be5
Compare
This was referenced Aug 21, 2026
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
Real runtime bug in the pi harness (from #38).
pi-coding-agentpinstypeboxexactly, so npm nested it undernode_modules/@earendil-works/pi-coding-agent/node_modules/typeboxand left no top-leveltypebox.pi-mcp-adapteralso importstypeboxand resolves it from its own dir → walks up to a top-level copy that isn't there → throwsCannot find module 'typebox'the instant the pi harness loads the MCP adapter. SoSEAM_WIZARD_HARNESS=pi npm run evalfailed in ~1s with an empty diff on every case.Why CI missed it: the eval is the only thing that exercises pi's runtime, and it doesn't run in CI — typecheck/build/tests don't execute
pi-mcp-adapter.Fix
typebox(pinned1.1.38) as a direct wizard dependency, so it hoists to top-level wherepi-mcp-adaptercan resolve it. Verified:require.resolve('typebox', { paths: ['node_modules/pi-mcp-adapter'] })now succeeds, and the lockfile has a top-levelnode_modules/typebox.runIntegrationreports step failures as events (not throws), so the real runner now captures the reason, threads it onto the case result, andrun.tsprints aFailures:section. Anorow is never a dead end again.Testing
SEAM_WIZARD_HARNESS=pi npm run eval(can't run in CI/sandbox).Security & Compliance