Skip to content

fix(queue): --queue rejected every value in 0.19.5 - #16

Merged
3m1n3nc3 merged 1 commit into
mainfrom
fix/queue-option-choices
Oct 20, 2026
Merged

3m1n3nc3 merged 1 commit into
mainfrom
fix/queue-option-choices

Conversation

@3m1n3nc3

@3m1n3nc3 3m1n3nc3 commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Problem

In 0.19.5, ark queue:work --queue rejects every value, including a plain queue name that worked in 0.19.4:

$ ark queue:work --queue=webhook
error: option '--queue <queue>' argument 'webhook' is invalid. Allowed choices are a name, a comma-separated priority list, or * for every queue..

Any deployment that passes --queue fails to start its worker, and a supervised worker crash-loops.

Cause

musket reads [a, b] or a trailing : a, b, c in an option's description as the option's allowed choices (/: ([^:[\]]+(?:,[^:[\]]+)*)$/ in its Signature). The description added in #15, "The queue(s) to process: a name, a comma-separated priority list, or * for every queue.", ends in exactly that pattern. #15's tests drove Worker directly, so they never went through the command's signature parser.

Fix

  • Reword the description without the : list: "The queue(s) to process. One name, a comma-separated priority list, or * for every queue."
  • Add packages/queue/tests/queue-work-command.test.ts. It parses the real queue:work signature with musket's Signature.parseOptions and checks that no option declares choices. It fails on the 0.19.5 description and passes on the fix.
  • Docs: quote the * in the examples ('--queue=*', '--queue=webhook,*'). Unquoted, zsh aborts with "no matches found" and bash may glob-expand it.
  • CHANGELOG: Fixed entry under Unreleased.

All 26 queue tests pass; typecheck, lint and Prettier are clean.

musket reads a trailing `: a, b, c` (or `[a, b]`) in an option's
description as its allowed choices. The new `--queue` description ended
in one, so `queue:work` refused every queue name, including a plain
`--queue=webhook`:

  error: option '--queue <queue>' argument 'webhook' is invalid.
  Allowed choices are a name, a comma-separated priority list, ...

Reword the description without the `: ` list, and add a test that runs
the real signature through musket's parser and pins that no queue:work
option declares choices (it fails on the 0.19.5 description).

Also quote the `*` in the docs' examples: unquoted, zsh aborts with
"no matches found" and bash may glob-expand it.
@3m1n3nc3
3m1n3nc3 merged commit 814f951 into main Oct 20, 2026
3 checks passed
@3m1n3nc3
3m1n3nc3 deleted the fix/queue-option-choices branch October 20, 2026 23:30
@codecov

codecov Bot commented Oct 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant