Skip to content

fix(core): mcp imports agent-context from source, not the built package - #669

Merged
jimhoyd merged 1 commit into
mainfrom
claude/fix-dist-race
Sep 24, 2026
Merged

jimhoyd merged 1 commit into
mainfrom
claude/fix-dist-race

Conversation

@jimhoyd

@jimhoyd jimhoyd commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator

The 0.6.0 release rerun (run 36039045455) failed again only in verify (ubuntu-latest, 22, 2). test/manifest.test.ts could not load: ERR_MODULE_NOT_FOUND for dist/shipped-skills.js, imported from dist/agent-context.js. It failed the same way in the first release run.

Cause. packages/core/src/mcp.ts imported @jimhoyd/urlcode/agent-context, a self-reference that resolves to the built dist/. So every test that loads the MCP server from source depended on the build output, which other test files can rebuild concurrently. #668 removed one such rebuild, in test/install.test.ts; this removes the dependency itself.

Change. mcp.ts now imports ./agent-context.ts directly. scripts/package-smoke.ts already imports @jimhoyd/urlcode/agent-context from the packed package, so the claim that the public subpath is sufficient is still proven.

Evidence.

  • With dist/ removed entirely, test/manifest.test.ts and test/mcp.test.ts pass (24 tests).
  • The full root suite passes through npm, and lint is clean.

Nothing was published: the release stops in ci. Merging this reruns the 0.6.0 release.

🤖 Generated with Claude Code

packages/core/src/mcp.ts imported @jimhoyd/urlcode/agent-context, which resolves to
dist/, so every test loading the MCP server from source depended on the build output
another test file can rebuild concurrently. On Node 22 in the release matrix
test/manifest.test.ts failed to load with ERR_MODULE_NOT_FOUND for
dist/shipped-skills.js, twice. scripts/package-smoke.ts already proves the public
subpath sufficient from the packed package.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@jimhoyd
jimhoyd merged commit 7b987f9 into main Sep 24, 2026
23 checks passed
@jimhoyd
jimhoyd deleted the claude/fix-dist-race branch September 24, 2026 18:18
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