@biffo/cli 0.296.6 → 0.296.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/scripts/claim.sh +19 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@biffo/cli",
3
- "version": "0.296.6",
3
+ "version": "0.296.8",
4
4
  "description": "Biffo project scaffolding CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/scripts/claim.sh CHANGED
@@ -186,12 +186,25 @@ while [ $# -gt 0 ]; do
186
186
  # is a definite "no", not a malformed invocation), not this generic
187
187
  # "$flag requires a value" message.
188
188
  RELEASE=1
189
- if [ $# -ge 2 ]; then
190
- HOLDER="$2"
191
- shift 2
192
- else
193
- shift
194
- fi
189
+ # A FLAG IS NOT A TOKEN. This swallowed `$2` unconditionally, so the natural
190
+ # `--release --as <token>` set HOLDER to the literal string `--as`, and the real
191
+ # token then fell through to the positional slot and OVERWROTE THE ISSUE NUMBER.
192
+ #
193
+ # The result was the message `#<token> is not held by '--as'` -- which reads as "the
194
+ # holder does not match", not "you wrote the flags in the wrong order". Measured
195
+ # consequence, from the fleet's own journal: agents concluded no claim could ever be
196
+ # released, fell back to removing `in-progress` by hand, and mostly stopped bothering.
197
+ # Claims then accumulated for days -- tabsii-platform#567 sat claimed from 08-17 to
198
+ # 08-21 -- and every claimed issue is undispatchable, so the queue drained itself.
199
+ #
200
+ # `--release <token>` was always correct and always worked. The defect is that the
201
+ # WRONG form was accepted and mangled instead of refused. Accepting both is better
202
+ # than refusing one: `--as` already sets HOLDER, so simply not eating a flag makes
203
+ # `--release --as <token>` work too, and neither form can misparse.
204
+ case "${2:-}" in
205
+ -*|'') shift ;;
206
+ *) HOLDER="$2"; shift 2 ;;
207
+ esac
195
208
  ;;
196
209
  --guard)
197
210
  [ $# -ge 2 ] || missing_value "$1"