fix(#683): claw skills remove/add/uninstall/delete emits typed error, exit 1#3095
Closed
code-yeongyu wants to merge 1 commit into
Closed
fix(#683): claw skills remove/add/uninstall/delete emits typed error, exit 1#3095code-yeongyu wants to merge 1 commit into
code-yeongyu wants to merge 1 commit into
Conversation
… exit 1 - Add unsupported skills action guard in parse_args for remove/add/uninstall/delete - Add unsupported_skills_action to classify_error_kind for structured JSON errors - Fix pre-existing compile errors (stale retry_after field, missing Team variant) - Add regression test unsupported_skills_actions_return_typed_error_683
47e9dcb to
99db1be
Compare
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 #683:
claw skills remove/add/uninstall/deleteno longer silently exits 0 with help text (stealth-success). Instead, it emits a typedkind:"unsupported_skills_action"structured error and exits 1.Changes
parse_args: Before dispatching skills commands, check if the first word isremove,add,uninstall, ordelete. If so, return a structured error string containing"unsupported skills action".unsupported_skills_actiontoclassify_error_kind()so JSON output surfaces the correct machine-readable kind.unsupported_skills_actions_return_typed_error_683which verifies all four forbidden actions error out and are classified correctly.retry_afterfield inApiError, missingTeamvariant inSlashCommand) so the crate builds.Verification
Test plan
claw skills remove→ exits 1, stderr contains"unsupported skills action: remove", JSON output haskind: "unsupported_skills_action"claw skills add→ same patternclaw skills uninstall→ same patternclaw skills delete→ same patternclaw skills list/claw skills install ./path/claw skills help→ continue to work normally