vitest plugin: check turn.complete, session.start and session.end $ answers against claude plugin test
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 54/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- developer-experience, testing
Research direction
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.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 29m
- Merged PRs (30d)
- 138
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from kwitsch/claude-code-plugin-tooling
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
kwitsch/claude-code-plugin-tooling#219 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
kwitsch/claude-code-plugin-tooling#210 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
kwitsch/claude-code-plugin-tooling#209 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
kwitsch/claude-code-plugin-tooling#208 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 52/100
kwitsch/claude-code-plugin-tooling#207 ·
Maintainers usually reply within 1 day
All issues in kwitsch/claude-code-plugin-tooling
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
Codex使用可 かんたん コード
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ryuki-moro/Nicomaru#348 ·
Maintainers usually reply within 1 day
-
clawsweeper:fix-shape-clear clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:crash-loop issue-rating: 🦞 diamond lobster P2
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
openclaw/openclaw#211919 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
Bug
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day