Template tests assume core comes from the monorepo source and fail in a scaffolded workspace
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- node.js, typescript
調査の方向性
Start with the template Vitest configs and the failing specs named in the report: server/mcp-provider-schemas.spec.ts, server/plugins/identity-sso.spec.ts, and server/actions/connection-permissions.spec.ts. Check how they resolve @agent-native/core and mock paths in both the monorepo and a scaffolded workspace; the report also identifies 94 test files across 13 templates that reference ../packages/core/. Done means the affected template tests pass in a workspace created from packed packages as well as in the monorepo.
索引モデルが issue の本文から書いたものです。
説明
Environment: multi-app workspace (chat and dispatch) created with agent-native create, core 0.220.0 installed from npm, apps synced to @agent-native/[email protected] with agent-native template sync, vitest 4.1.12, Node 24.20. The code is unchanged on main at 3a7038f2ea.
What happens: pnpm test in the apps:
chatanddispatch:server/mcp-provider-schemas.spec.tsfails before running any test:FAIL server/mcp-provider-schemas.spec.ts > Chat MCP catalogs Error: Cannot find module '.../apps/chat/actions/hello' imported from .../apps/chat/.generated/actions-registry.tsdispatch: 3 of the 41 tests inserver/plugins/identity-sso.spec.tsfail withTypeError: Cannot read properties of undefined (reading 'headers').dispatch: all 13 tests inserver/actions/connection-permissions.spec.tsfail withrelation "org_members" does not exist.
Why: in the monorepo the templates depend on "@agent-native/core": "workspace:*", so core resolves to packages/core, outside node_modules, and I believe Vitest transforms it like project code. In a scaffolded workspace core lives in node_modules, so Vitest externalizes it and Node loads it directly. Adding test.server.deps.inline: [/@agent-native[\\/]core/] to the app's Vitest config makes the first two failures go away. Then:
loadTemplateMcpConformance(packages/core/src/mcp/provider-schema-conformance.ts:570) loads.generated/actions-registry.tsthrough the default loader, a nativeimport()(:492). The registry imports actions without extensions (../actions/hello), which Node's ESM resolver rejects. Sixteen templates have this spec.identity-sso.spec.tsmocksh3and@agent-native/core/*subpaths. My guess is that, with core externalized, those mocks don't reach the imports made from inside core.connection-permissions.spec.tsmocks../../../../packages/core/dist/db/client.js, a path that only exists in the monorepo. In a workspace the mock never applies and the test reaches a database without the tables.calendar(calendar-mcp-writes.spec.ts) andfactory(operation-executor-priming.spec.ts,operation-executor.core.spec.ts) mock the same kind of path. More broadly,git grepfinds 94 test files in 13 templates that reference../packages/core/paths. I haven't checked them one by one, but any that mocks or imports through such a path should break the same way in a workspace.
Workaround:
- For (1) alone, inline just the loader in the app's
vitest.config.ts; with it, all 15 test files inchatpass:test: { server: { deps: { inline: [ /@agent-native[\\/]core[\\/]dist[\\/](testing|mcp[\\/]provider-schema-conformance)\.js$/, ], }, }, }, - Inlining all of core (
/@agent-native[\\/]core/) also fixes (2). (3) has no config workaround.
Possible fix:
- Have the templates'
vitest.config.tsinline@agent-native/core, so the tests run the same way in the monorepo and in a workspace. - Mock core internals through a path that resolves in both layouts instead of
../../../../packages/core/.... - Running the template tests in a workspace scaffolded from the packed packages would catch this class of bug, along with #8239 (
happy-domresolved only through the monorepo, fixed in #8279).
- 主要言語
- TypeScript
- スター
- 7.7k
- フォーク
- 706
- 平均マージ
- 1日 11時間
- マージ済み PR(30日)
- 790
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
BuilderIO/agent-native のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
BuilderIO/agent-native#9217 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
BuilderIO/agent-native#9124 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
An `absolute` element near the end of a long page gives the toolkit main surface a second scrollbar対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
BuilderIO/agent-native#8846 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
WebMCP helper fails with “invalid input object” in Chrome 155対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
BuilderIO/agent-native#8460 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Skill deletion succeeds but leaves Settings unclickable対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
BuilderIO/agent-native#8109 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
BuilderIO/agent-native の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
ilan-pinto/roaring-lions#1552 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
bug: [React Native/Android] KeepAliveService never starts when CAMERA is not granted (Android 14+)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
cloudflare/realtimekit-ui#208 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
usebruno/bruno-vscode#235 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信