fix: skill load failures return None instead of queued sentinel (#14713)#14752
Closed
Bartok9 wants to merge 1 commit into
Closed
fix: skill load failures return None instead of queued sentinel (#14713)#14752Bartok9 wants to merge 1 commit into
Bartok9 wants to merge 1 commit into
Conversation
build_skill_invocation_message no longer returns a truthy error string that the CLI treated as successful input. Log a warning and return None so callers surface errors instead of queueing a sentinel. Gateway returns a user-visible message when a resolved skill fails to load. TUI gateway returns 5030 for skill and /plan load failures. Tests: regression for None on _load_skill_payload failure. Made-with: Cursor
Collaborator
Contributor
Author
|
Thanks for the context @alt-glitch. I've reviewed #14713, #11200, and #11408. This PR's fix is distinct — it specifically handles the case where |
Contributor
Author
|
After rebasing onto current main (upstream/m), this PR's changes are already present upstream — either merged directly or via salvage. Closing as resolved. Original fix by @Bartok9. |
5 tasks
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.
Summary
Fixes #14713.
build_skill_invocation_message()used to return a truthy string like[Failed to load skill: …]when_load_skill_payloadfailed. The CLI only checked truthiness, so that string was queued as normal user input while still printing success-style messaging for/plan.Changes
None(docstring updated). Same contract as “unknown skill” for callers that already branch on falsy messages.None, return an explicit user-facing error instead of falling through to the agent with stale/empty text._err(..., 5030, …)for skill slash and/planwhen the invocation message is missing (avoids falling through to “not a quick/plugin/skill command”).Tests
test_returns_none_when_payload_load_fails— patches_load_skill_payloadtoNoneand assertsbuild_skill_invocation_messagereturnsNone.Notes
Local pytest was not run (environment Python < 3.11); CI matrix should cover
tests/agent/test_skill_commands.py.Made with Cursor