Skip to content

Read a usage block's command table as subcommands with their own flags - #153

Merged
sadigaxund merged 3 commits into
mainfrom
r11/command-table-usage
Sep 13, 2026
Merged

sadigaxund merged 3 commits into
mainfrom
r11/command-table-usage

Conversation

@sadigaxund

Copy link
Copy Markdown
Collaborator

A usage block that lists every command with that command's own flags is read as a command table now, so dmsetup and dmstats reach the tree as 33 and 11 subcommands carrying their own flags and positionals, instead of a four-flag root with two command rows misread as group labels. A bracket group standing where a value would stand is also no longer read as one, so -h, --help [-c|-C|--columns] and -v, --verbose [-v|--verbose ...] come out as the booleans they are.

Every recovered command word is checked against the tool's own --help: dmsetup writes exactly the 33 emitted (create --concise is a second form of create, not a 34th command) and dmstats exactly the 11. The command words stay invocation-attested and are never probed, so nothing in this family can run dmsetup remove.

Fleet sweep against the 0b30c15 baseline, 2269 tools matched, 0 appeared, 0 disappeared: 0 flag losses, 0 subcommand losses, 121 flags gained across 2 tools (dmsetup 4 to 65, dmstats 8 to 68) and 44 subcommands across the same 2 (dmsetup 0 to 33, dmstats 0 to 11), both moving low-confidence to ok. The raw-shape family was 15 tools and the rule fires on 2: cryptsetup, veritysetup, integritysetup, modprobe, ethtool, fwupdmgr, fwupdtool, fail2ban-client and claude appear nowhere in the diff. The two root flags the diff records as removed are relocations, -j, --major to create and --addnodeonresume, --addnodeoncreate to resume, each landing under the command whose own row writes it. Eight of the nine named controls are byte-identical on the first capture; docker differs on its own screen by 6 lines, half of them the lazy-extraction placeholder, and the #fp2 tree fingerprint is identical between baseline and branch for all nine.

One measurement note for the reviewer: existence_fabrication_tools goes 56 to 58, dmsetup with 30 findings and dmstats with 2. Every name it flags is written literally by the tool, in angle brackets, on the command row the positional comes from, so design §7 rule 7 holds; the oracle attests a positional by position and its notion of a synopsis line does not yet include a command-table row inside a usage block. Left for a ruling rather than widened here.

sadigaxund and others added 3 commits September 13, 2026 13:22
dmsetup/dmstats print a bare Usage: label, the tool's own name and global
flags, then one command per line with its own flags/operands. Recovered
as invocation_attested subcommands (never heading_attested); a nested
bracket group of pure flag spellings no longer invents a flag value.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Keep-both in CHANGELOG, docs/shapes.md (S-169 and S-170 before S-171), the
detector registry and the sections module list. S-169's blank-line stanza
continuation becomes continue_usage_block_across_blank, since scan_usage_section
carries main's seed split as well and reached 155 lines.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
S-150 skipped the blank line under a bare `Usage:` before S-169 could read
the stanza past it, which cost dmsetup and dmstats all 44 of their commands.
The skip now gives that recognizer first refusal, only on a real blank gap
so fdisk keeps its first form. Both snapshots lose the bare `Usage:` entry
S-150 refuses, and nothing else.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@sadigaxund
sadigaxund merged commit 65b2589 into main Sep 13, 2026
17 checks passed
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