fix(eve): resolve dev model module map from authored source#105
Open
oksr wants to merge 1 commit into
Open
Conversation
|
@oksr is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
9821e23 to
fcf090b
Compare
Model resolution used the raw module-map loader, which can't map a schedule's `.js` channel import to the dev snapshot's `.ts` source. Route it through loadRuntimeCompiledModuleMap, as the rest of the dev runtime does. Signed-off-by: oksr <hello@ofeks.dev>
Collaborator
|
Thanks a lot we'll take a look at this Monday. We're just wrapping up some plumbing on our side so we can officially accept outside contributions, safely run CI etc. |
ManuLosta
added a commit
to ManuLosta/carlitos
that referenced
this pull request
Jun 22, 2026
… LoadCompiledModuleMapError Channels importing from lib/ crash under eve dev because the raw module-map loader uses native ESM, which can't resolve the lib module (not in the compiled module map). Inlining the helper avoids the transitive import. Upstream fix pending in vercel/eve#105.
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.
Description
Fixes #104.
Under
eve dev, model resolution loaded the compiled module map with the raw loader (loadCompiledModuleMap). That loader statically re-imports authored entry modules, so arun-handler schedule importing a channel via a.jsspecifier crashed the turn withLoadCompiledModuleMapError(native ESM can't map the.jsspecifier to the dev snapshot's.tssource). Builds and production were unaffected.The fix routes model resolution through the runtime's existing
loadRuntimeCompiledModuleMap(now exported fromcompiled-agent-cache.ts), which already hydrates source-backed/dev runs through the authored-source loader and falls back to the raw loader for bundled/production. One call swapped; production path unchanged.How did you test your changes?
packages/eve/test/scenarios/schedule-channel-model-resolution.scenario.test.ts: spawns a realeve devsubprocess (with real, unmocked model resolution) for an agent whoserun-handler schedule imports a channel, then asserts a turn starts and resolution does not raiseLoadCompiledModuleMapError. It fails before the fix with the exact error and passes after. (In-process tests can't catch this: vitest's resolver maps.js→.ts, and the model mock seam skips the load.)run-handler schedule that delivers to a Telegram channel failed withLoadCompiledModuleMapErrorundereve devbefore the fix, and after it the session resolved the model, ran the turn, and delivered the message.pnpm typecheck,pnpm lint,pnpm guard:invariants,pnpm test:unit,pnpm test:integration,pnpm test:scenarioall pass.PR Checklist
CONTRIBUTING.mdevepackagegit commit --signoff)