Skip to content

[finding] dispatch-gates usage line still advertises --tier --residue as combinable after the pair became a refusal #15036

Description

@claude

Found while implementing #14753 (refuse --tier --residue). Filed unassigned, out of scope for that PR, and deliberately not fixed there — that card's triage scoped the change to one refusal arm plus its pins and said do not change any other refusal, message, or behaviour.

The shape

scripts/pm/dispatch-gates.mjs prints one usage line on the path where the change set cannot be derived. Its grammar, with the two angle-bracket placeholders spelled out as FILE and PATH:

usage: node scripts/pm/dispatch-gates.mjs [--residue] [--tier | --commands | --json | --ran FILE] [--repo owner/name] [PATH ...] | --changed | --self-test

--residue sits OUTSIDE the alternation group, which is the notation's way of saying it combines with every member of it. The alternation itself carries the other exclusions accurately: --commands against --json, --ran against both, --ran against --tier, and (since #14294) --tier against --commands / --json are all expressed by those four being alternatives.

After #14753 that leaves exactly one refused combination the usage line still advertises as legal: --tier --residue, which now exits 2 with dispatch-gates: --tier derives no gate family, so --residue would have nothing to list. Pass one.

Reproduce

node scripts/pm/dispatch-gates.mjs --tier --residue scripts/measure-partial-retirement-annotation.mjs ; echo "EXIT=$?"
# EXIT=2 — the pair the usage line presents as combinable

The usage line itself is reached only on the derivation-failure path (run it on the base branch with no paths, so changedPathsFromGit() refuses).

Not claimed

  • No claim that anyone has hit it. Found by reading the argv chain while adding the refusal beside it. The line prints on one error path, and a caller who types the pair gets a precise refusal naming both flags — this costs a reader a second's confusion, not an answer.
  • No remedy recommended. Restructuring the grammar so --residue attaches to the three modes it still modifies and not to --tier is not mechanical: the obvious spellings all make a one-line usage string longer or lumpier, and this file's own convention is that a message's shape is a design call for its owner. Deleting [--residue] from the line instead would understate it. Filed rather than fixed for that reason.
  • Pre-existing in a different form. Before dispatch-gates: --tier --residue silently drops --residue — the neighbouring silent-flag-drop that #14294's repair does not reach #14753 the same line advertised the same pair, and the pair was accepted and silently dropped — so this is not a regression the refusal introduced, it is the half of the old inaccuracy the refusal did not reach.

Refs

Generated by Claude Code


Generated by Claude Code

Activity

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

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions