Read a usage block's command table as subcommands with their own flags - #153
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 --conciseis a second form ofcreate, 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 rundmsetup 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, --majortocreateand--addnodeonresume, --addnodeoncreatetoresume, 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#fp2tree fingerprint is identical between baseline and branch for all nine.One measurement note for the reviewer:
existence_fabrication_toolsgoes 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.