vref screenshot remove --keep-asset home fails with VREF_INVALID_BOOLEAN instead of removing home: parseArgs binds the next non-flag token as the flag's value regardless of whether the flag takes one.
It fails safe — nothing is deleted — but the message is misleading, and it hits the safety flag specifically, which is the one people reach for when they are being careful. --force and --dry-run before a positional have the same problem.
The reason it was not fixed in #48: --keep-asset home and --dry-run yes are syntactically identical. Making boolean flags stop consuming the next token turns yes into a stray positional that is then silently ignored, and test/vref.test.ts ("rejects invalid boolean safety flag values before mutating files") requires that input to be refused.
Doing this properly means per-command positional arity: boolean flags stop consuming, and any positional beyond what the command expects is refused. That changes which error code several existing inputs produce, so it wants its own change rather than riding along with a feature.
vref screenshot remove --keep-asset homefails withVREF_INVALID_BOOLEANinstead of removinghome:parseArgsbinds the next non-flag token as the flag's value regardless of whether the flag takes one.It fails safe — nothing is deleted — but the message is misleading, and it hits the safety flag specifically, which is the one people reach for when they are being careful.
--forceand--dry-runbefore a positional have the same problem.The reason it was not fixed in #48:
--keep-asset homeand--dry-run yesare syntactically identical. Making boolean flags stop consuming the next token turnsyesinto a stray positional that is then silently ignored, andtest/vref.test.ts("rejects invalid boolean safety flag values before mutating files") requires that input to be refused.Doing this properly means per-command positional arity: boolean flags stop consuming, and any positional beyond what the command expects is refused. That changes which error code several existing inputs produce, so it wants its own change rather than riding along with a feature.