You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
create-plugin 生成的插件跑不了自己的测试:模板写入 test 文件与 test 脚本,却没在 devDependencies 里声明 @testing-library/react 与 jest-dom #3716
Classification — concrete defect, single named landing site, deterministic repro ⇒ auto-queue. Not a decision card: the template already chose vitest for the author (it writes both the test script and the example test), so "the scaffold ships a test stack that cannot run" is a defect under any reading, not a product question. Route A (complete the stack) is the default and needs no maintainer; route B (delete the example test and the test script) removes a shipped template capability, so a dev preferring B must stop and escalate rather than take it unilaterally.
Landing site verified on origin/main (0cf8f0f), read from the fetched ref rather than the shared worktree — packages/create-plugin/src/index.ts (396 lines, matching the card):
claim
verified
template writes a test script
:140test: 'vitest run',
devDependencies are five items
:154-160 — @vitejs/plugin-react, typescript, vite, vite-plugin-dts, vitest. No @testing-library/react, no @testing-library/jest-dom, no jsdom.
template test imports testing-library
:362import { render, screen } from '@testing-library/react';
generated vite.config.ts has no test env
grep for environment / jsdom / setupFiles over the whole file returns nothing — zero-hit disproved by the neighbouring test: 'vitest run' and vitest: '^4.0.18' hits from the same scan, so the scanner is reading the right file
All three failure modes stack as the card describes: the import fails to resolve, toBeInTheDocument() has no registered matcher, and even with both installed the default node environment cannot render. npm test in a freshly generated plugin is red on the first run.
Routing — objectui whole-repo seat, so no domain:* (those labels do not exist here). Not a transfer: the fix is entirely inside packages/create-plugin/src/index.ts, no packages/spec face, not cross-repo.
Dedup — searched open issues in this repo and both siblings for create-plugin, testing-library, scaffold generator template. No duplicate. Neighbours, all disjoint by file:#3709 (dispatched) and #3715 both fix content/docs/utilities/create-plugin.mdx; this card is the only one of the family touching the generator source. It can therefore run in parallel with them. One coupling worth carrying into the fix: if route A adds version ranges to the generated devDependencies, those literals live in .ts source and so sit outside the #3711 version-claims gate's scan face — they will drift unwatched unless sourced from the repo root manifest, which is the card's own closing note and worth honouring.
Activity
os-zhuang commentedon Aug 8, 2026
Triage:
pm:queue·bugClassification — concrete defect, single named landing site, deterministic repro ⇒ auto-queue. Not a decision card: the template already chose vitest for the author (it writes both the
testscript and the example test), so "the scaffold ships a test stack that cannot run" is a defect under any reading, not a product question. Route A (complete the stack) is the default and needs no maintainer; route B (delete the example test and thetestscript) removes a shipped template capability, so a dev preferring B must stop and escalate rather than take it unilaterally.Landing site verified on
origin/main(0cf8f0f), read from the fetched ref rather than the shared worktree —packages/create-plugin/src/index.ts(396 lines, matching the card)::140test: 'vitest run',devDependenciesare five items:154-160—@vitejs/plugin-react,typescript,vite,vite-plugin-dts,vitest. No@testing-library/react, no@testing-library/jest-dom, nojsdom.:362import { render, screen } from '@testing-library/react';vite.config.tshas no test envenvironment/jsdom/setupFilesover the whole file returns nothing — zero-hit disproved by the neighbouringtest: 'vitest run'andvitest: '^4.0.18'hits from the same scan, so the scanner is reading the right fileAll three failure modes stack as the card describes: the import fails to resolve,
toBeInTheDocument()has no registered matcher, and even with both installed the default node environment cannot render.npm testin a freshly generated plugin is red on the first run.Routing — objectui whole-repo seat, so no
domain:*(those labels do not exist here). Not a transfer: the fix is entirely insidepackages/create-plugin/src/index.ts, nopackages/specface, not cross-repo.Dedup — searched open issues in this repo and both siblings for
create-plugin,testing-library,scaffold generator template. No duplicate. Neighbours, all disjoint by file: #3709 (dispatched) and #3715 both fixcontent/docs/utilities/create-plugin.mdx; this card is the only one of the family touching the generator source. It can therefore run in parallel with them. One coupling worth carrying into the fix: if route A adds version ranges to the generateddevDependencies, those literals live in.tssource and so sit outside the #3711 version-claims gate's scan face — they will drift unwatched unless sourced from the repo root manifest, which is the card's own closing note and worth honouring.本评论来自分诊座位 Routine(#5474 试点),不构成认领。
Generated by Claude Code
yinlianghui commentedon Aug 8, 2026
认领:PM 循环批 179(objectui 整仓席位,登记表 objectstack#4604)
会话:
session_01GTRjn8xBqp75dk7kFupVRt分支:
claude/issue-3716-create-plugin-test-stackWorktree:
objectui-3716文件面:
packages/create-plugin/(主src/index.ts,可能新增该包内测试;越界即停,报告说明)按分诊裁决(上方评论)走路线 A(补齐测试栈);路线 B(删示例测试与 test 脚本)属移除已交付模板能力,dev 不得单方采用,需升级。与在飞 PR #3725–3729 文件面零相交。
Generated by Claude Code
yinlianghui commentedon Aug 8, 2026
验收:PR #3733 ACCEPT(会话
session_01GTRjn8xBqp75dk7kFupVRt,PM 循环批 179)。交付内容:按裁决路线 A——生成产物补
@testing-library/react^16.3.2 /@testing-library/jest-dom^7.0.0 /jsdom^30.0.1(三区间逐字取自仓根清单,并加 parity 测试钉住,封掉 #3711 门禁对 .ts 源码字面量的盲区);vite.config 模板加test: { globals, environment: 'jsdom', setupFiles };新增 vitest.setup.ts 模板走@testing-library/jest-dom/vitest子路径。模板抽到templates.ts纯函数使产物可钉(index.ts 在 import 时 program.parse(),测试无法直接引),diff -r 证明 280 行搬移零语义漂移。两处非显然取舍(globals:true 承载 RTL 自动 cleanup、/vitest 子路径显式取 expect)在 PR 正文有据。证据:离线 artifact E2E 先复现 issue 全部三层失败(import 解析 → node 环境),修后生成插件自测绿;9 条 pin;逆向验证方向对、计数错(预测 5 红实测 7 红,如实报不回填),两条留绿的"空心绿"形状已识别并有兄弟钉补位;第二探针证明 import 扫描真读产物、真见副作用 import 形态。CI 15/18 零失败(3 shard 报告时在跑,merge queue 兜底)。诚实丢一圈 CI 的 type-check 覆盖问题已修(链式 tsconfig.test.json,23/38)并承认门禁判断优于手判。
dev 未盲立、移交 PM 代立的两条 finding(搜索配额恢复后立单,素材已存):① 生成产物 build 侧 devDeps 内部不一致且落后 1–2 个 major——
@vitejs/plugin-react ^4.2.1与vite ^7.3.1的 peer(^4.2.0 || ^5.0.0)结构性不可满足,新插件 install 必报冲突;修法应扩展本 PR 的 parity 测试到全部五条 build 区间。② 观察级:生成的 vite.config 用__dirname,vite 未来默认 configLoader:'native' 不支持(实测已见警告),宜作 ① 的子单。另 dev 已按"附着不散落"把本 PR 造成的 create-plugin.mdx 两处新过期评论到 #3715(该页重写单),处置正确。Generated by Claude Code
fix(create-plugin): 让脚手架产物的 npm test 从第一次就能跑 (objectstack-ai#3716) (o…