Skip to content

testing.md: session.append cannot be stubbed in the kit - #16

Open
karanb192 wants to merge 1 commit into
mainfrom
kit-session-append
Open

karanb192 wants to merge 1 commit into
mainfrom
kit-session-append

Conversation

@karanb192

Copy link
Copy Markdown
Owner

Summary

  • Adds one kit rule to references/testing.md: on Claude Code 2.1.288 a test cannot answer session.append beneath the plugins, and says what to do instead.

Details

The engine skips any session.append answer that did not follow a next (its message: "an answer without next (the row is kept; next(e) keeps it)"), and a stub that calls next(e) fails with no implementation for session.append. There is no mock.session. The new bullet tells a builder to keep the rewrite in a pure module tested directly, drive the other hooks through $, and prove the session.append path with a headless claude -p run under the harness config plus a grep of the session .jsonl. Stamped observed, checked 2.1.288, with a recheck trigger. Found while building a redaction mod that hooks session.append.

Test plan

  • Read the new bullet under "Kit rules" in references/testing.md
  • node --test 'plugins/mod-builder/skills/mod-builder/tests/*.test.mjs' still passes (docs-only change)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant