vitest plugin: check turn.complete, session.start and session.end $ answers against claude plugin test
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 54/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
调研方向
Start by reading call() in packages/vitest-plugin-claude-code-mod/src/testing/engine.ts and the existing conformance tests or pnpm test:e2e setup. For each of turn.complete, session.start, and session.end, compare the same stub under the Vitest plugin and claude plugin test, skipping when claude is unavailable. Done when all three tests confirm matching answers and a changeset is added for any behavior change.
由索引模型根据 Issue 内容生成。
描述
Problem
#147 fixed tool.call and #211 fixes prompt.submit: the vitest plugin answered a mod's own $.<event> call with { value } / { deny } where claude plugin test takes the event's own result shape. The same check has not been done for the other events with an own result shape that a mod can call on $: turn.complete, session.start, session.end. No test runs the same stub under both runners, so the two can drift again.
Proposal
For each of turn.complete, session.start, session.end: write a minimal mod that calls $.<event>(...), run it under claude plugin test with a stub answering the event's own result shape and with { value }, and record which one passes and what the mod receives. Where the vitest plugin differs, change call() in packages/vitest-plugin-claude-code-mod/src/testing/engine.ts to follow the engine (recommendation: follow the engine strictly, with a BREAKING minor changeset, as #211 did). Add one conformance test per event that uses the same stub under both runners.
Design points
Where a conformance test lives: recommendation is a test in the vitest plugin package that spawns claude plugin test and skips when claude is not on PATH, like pnpm test:e2e.
Package
@kwitsch/vitest-plugin-claude-code-mod
Scope
Only the three events listed; related: #33 (shape validator).
Acceptance
- For each of
turn.complete,session.start,session.end, a mod's own$.<event>call takes the same stub answer under the vitest plugin and underclaude plugin test. - A test per event exists and passes under both runners.
- A changeset is added for any behavior change.
Relations
- Originating PR: #211
- 主要语言
- TypeScript
- 星标
- 0
- 派生
- 0
- 平均合并
- 29 分钟
- 30 天内合并 PR
- 138
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
kwitsch/claude-code-plugin-tooling 的其他 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 74/100
kwitsch/claude-code-plugin-tooling#219 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 69/100
kwitsch/claude-code-plugin-tooling#210 ·
维护者通常 1 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 48/100
kwitsch/claude-code-plugin-tooling#209 ·
维护者通常 1 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 45/100
kwitsch/claude-code-plugin-tooling#208 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 52/100
kwitsch/claude-code-plugin-tooling#207 ·
维护者通常 1 天内回复
查看 kwitsch/claude-code-plugin-tooling 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 67/100
makecindy/cindy#15342 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
no-repo-link tool-submission
难度 1/5 1 小时以内 新手友好度 74/100
BraveOPotato/NoSignups#2618 ·
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 85/100
-
bug needs-triage
难度 2/5 1-3 小时 新手友好度 72/100
Priyanshu-byte-coder/devtrack#4067 ·
维护者通常 1 天内回复