fix(gateway): /kanban must not raise on unbalanced quotes in args - #94571
Open
Sahilvishnaliya wants to merge 1 commit into
Open
Sahilvishnaliya wants to merge 1 commit into
Sahilvishnaliya wants to merge 1 commit into
Conversation
Contributor
The /kanban handler called shlex.split(text) bare. Any unbalanced
quote in user-typed args (e.g. '/kanban deploy "v2', or an apostrophe
opening a quote) raised ValueError('No closing quotation') straight
out of the slash handler.
Every other shlex.split site in the gateway guards this: /resume
returns a parse-error message, and run.py's config parser falls back
to whitespace splitting. /kanban now uses the same whitespace-split
fallback.
Sahilvishnaliya
force-pushed
the
fix/kanban-slash-unbalanced-quote
branch
from
August 25, 2026 08:33
3df49dd to
bed6ae3
Compare
24 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.
Problem
The
/kanbanhandler calledshlex.split(text)bare. Any unbalanced quote in user-typed args —"/kanban deploy \"v2", or a first-token apostrophe likedon'topening a quote per POSIX parsing — raisedValueError: No closing quotationstraight out of the slash handler.Every other
shlex.splitsite in the gateway guards this exact failure:/resume(slash_commands.py:4876-4879): try/except ValueError → parse-error messagerun.pyprofile-arg parser (:9482-9485): try/except → whitespace-split fallbackrun.pyhome-detection (:30618-30621): same fallbackFix
Mirror the established fallback: on
ValueError, split on whitespace so the command still runs (quote-grouping lost, which is the correct degradation for malformed input).Verification
Swept all gateway/plugin
shlex.split(call sites — this was the only unguarded one; module parses clean.