Repository navigation
A hook returns a string - #23
Merged
nigelgilbert merged 10 commits intoNov 22, 2026
Merged
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
nigelgilbert
marked this pull request as ready for review
November 22, 2026 11:18
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A hook now returns a string. Returning
None, or nothing, used to mean "leave it as it was". Now it fails like any other hook failure:To change nothing, a text hook does
return t. The five hooks, their signatures and their order are the same, and""still stops.What changed
sidecar/src/kiku_sidecar/lifecycle.py:callaccepts only astr,fireassigns the result directly, andhook_messagereturns the first message it gets.HookisCallable[[Any], str].test_server.pyandtest_lifecycle.pyreturn strings, and a new test covers a text hook with noreturn.docs/hooks.mdandsidecar/README.mddrop theNonerows, and six recipes get an explicit return.examples/returns a string on every path.For existing hook files
A hook that ends without a
returnnow stops the dictation with theTypeErrorabove. Addreturn t.Review
One review raised 7 candidates and 4 were kept and fixed: the
offline.pyrecipe now returns the label, the type and the message, and three wording fixes say anon_donereturn is not used. The details are indocs/factory-report-feature-hooks-return-str-1.md.Checks
In
sidecar/:pytest100 passed,pyright0 errors,ruff checkclean.🤖 Generated with Claude Code