Repository navigation
fix: commands fail at once when nobody handles them - #6
Merged
Merged
Conversation
All 34 kernel command declarations used the `silent` dispatch policy: a call
with no handler registered neither resolved nor rejected, and a handler
registered later never picked it up, so `await cmd.promise` hung forever
with no error (e.g. pickers or clipboard on Node, a command called before
its fragment started).
They use `async` now: with no handler the promise rejects immediately with
CommandError { kind: "no-handlers", commandKey }. A listener that takes the
call without settling it (observe-only) still leaves it pending, as before.
Tests that asserted the old "stays unsettled" behaviour now assert the
rejection. READMEs describe the new failure mode.
Checked: all kernel tests; statewalker-ai, statewalker-shell-react and
statewalker-knowledge tests against this kernel (umbrella workspace).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DAiZN6XrTAdQpNN3eXEz2U
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.
All 34 kernel command declarations used the
silentdispatch policy. A call with no handler registered neither resolved nor rejected, and a handler registered later never picked it up. Soawait cmd.promisehung forever with no error: the pickers or clipboard on Node, or any command called before its fragment started.asyncnow. With no handler, the promise rejects immediately withCommandError { kind: "no-handlers", commandKey }.Possible impact on apps: code that calls these commands without awaiting or catching, where no handler exists, now gets an unhandled rejection instead of a silent hang.
Checked:
🤖 Generated with Claude Code
https://claude.ai/code/session_01DAiZN6XrTAdQpNN3eXEz2U