This is in railcall_cli.py, verified against a fresh download from the
CLI's own repo (raw.githubusercontent.com/patl4588/railcall-cli/main/railcall_cli.py),
not the local install. A prior report already fixed this exact bug class
(a flag() helper matching only --name=value, silently ignoring
--name value and returning the default) in two other command handlers in
this same file. _market_list() -- the railcall market list command --
has its own separate, never-touched-by-that-fix inline parser with the
identical defect.
Reproduction steps:
- In railcall_cli.py, isolate _market_list()'s filter-parsing loop
(~line 3773-3781):
params = {"limit": "50"}
for a in args:
if "=" in a and a.startswith("--"):
k, v = a[2:].split("=", 1)
if k in ("category", "provider", "pattern", "trigger", "q", "limit", "offset"):
params[k] = v
- Call it with args = ["list", "--category", "Revenue"] (space-separated).
- Call it with args = ["list", "--category=Revenue"] (equals form).
Expected: both forms should set params["category"] = "Revenue" -- this
station's own CLI already supports space-separated flags elsewhere in the
identical file (the fixed flag() helper, and the --template/--dest parsing
in the workflow-run command), so a user has no way to know this particular
command is different.
Actual:
railcall market list --category Revenue -> {'limit': '50', 'featured': '1'}
railcall market list --category=Revenue -> {'limit': '50', 'featured': '1', 'category': 'Revenue'}
The space-separated form produces no filter at all -- "Revenue" is left as
a bare token the loop never looks at (it only matches tokens that both
start with "--" and contain "="), so the command silently falls back to
the default unfiltered/featured listing instead of erroring or filtering,
with nothing telling the user their flag had no effect.
Root cause: railcall_cli.py, _market_list() (~line 3773-3781). The loop's
condition "=" in a and a.startswith("--") only recognizes the
--name=value form; there is no branch for a == "--" + name followed by
consuming the next token, unlike the flag() helper used elsewhere in this
same file.
Suggested fix: give _market_list() the same two-form parsing flag() already
uses elsewhere in this file (or just call that shared helper instead of
duplicating a narrower one), so --category, --provider, --pattern,
--trigger, --q, --limit, and --offset all accept both --name=value and
--name value consistently with the rest of the CLI.