memhog: no description swallow, real values, and the usage operands - #162
Open
sadigaxund wants to merge 5 commits into
Open
sadigaxund wants to merge 5 commits into
sadigaxund wants to merge 5 commits into
Conversation
…ered memhog's flag rows carry no column gap, so its whole screen was wrong: a fabricated value name on -f/-H, the root description swallowing every row, and no positionals at all. Widens S-165's bound to cover a usage line too, recovers -f/-H's real value and description from the usage line's own evidence, and flattens the nested [policy [nodeset]] tail into ordered optional positionals for an unlabelled single-line synopsis. Fixed along the way: a table row with two candidate lines (lsof's -T) could glue a neighbour's text into the wrong flag; now refused unless exactly one candidate row exists. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ands r12/usage-operands keeps S-175 (its PR is already open). S-176-to-S-177 done before S-175-to-S-176 so the two renames never collide. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
savelog's -r rolldir row uses the document's own ' - ' separator like every sibling row, but rolldir is long enough that the gap before the dash narrows to one space. The fabrication guard read that as a bare- word guess and threw the real value away recovering the description. A document where other option rows show the same ' - ' separator now keeps the row's own value and recovers only the description from it, checked ahead of the bare-word-guess branch. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
host's own -c/-N/-t/-W/-R/-m/-p lost their real usage-named values under the earlier version of this rule, which only knew a glued uppercase run or an already-dash-separated row. One rule now reads every usage spelling: glued run, spaced placeholder, glued optional group, and no placeholder at all (alone, in an alternation, or in a bundle) all come from extract_usage_flags's own grammar, never a second reading built for this repair. A letter no usage line names gets no change at all. Fixes host, kpartx and numastat the same way; savelog's -r keeps its value and gains its description through the same lookup. Also refuses a row packing a second flag by a real column gap (lsof's own multi-column -T/-U/-v summary), which the previous version read as one row's description and destroyed -T's real value. Adds corpus/host/9.18.39, passing from the start. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
lsof's `-F [f] select fields; -F? for help` printed `[f]` twice: once as the flag's Optional value, once again opening the description the same rule had just recovered. Bare, bracketed and angled spellings of the leading value are now stripped alike. 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.
Stops a headingless option table landing in the root description, stops a row with no placeholder reading its description's first word as a value — the row's own text is never trusted for that now, only the tool's own usage line — and recovers an unlabelled single-line synopsis's own operand tail. Every one of memhog's five printed lines was wrong or lost in the tree, which is why the fixture's own note calls for a full revision.
Sweep numbers, full
PATH, 2270 tools matched againstcf5912f:memhog0 to 3,xfs_rtcp0 to 2,blkdeactivate,dbiprofanddbus-cleanup-sockets0 to 1 each. Zero flag losses, zero flag gains, zero subcommand movement, zero positional losses. All nine control tools byte-identical on their#fp2records:git,gcc,aarch64-linux-gnu-g++-13,ar,pnpm,systemctl,tar,find,docker.host(16 rows),kpartx(11),numastat(6),vm-support(3),memhog(3),savelog(1). 30 fabricated values are dropped and 8 more are replaced by the real name the usage line spells (host-c class,-N ndots,-t type,-W time,-R number,-m flag,-p port;memhog-f FILE); no boolean gains a placeholder anywhere.host,kpartx,memhog,numastatandvm-supportmove from low-confidence to ok.corpus/memhog/2.0.18promotes out of[xfail]withmust_contain_positionals, threemust_describeentries andmust_value_nameall passing;corpus/host/9.18.39is added, passing from the start.Stated remainder:
host's-A,-s,-U,-4and-6are named in no usage line at all, so they keep their pre-existing fabricated value and no description — 5 rows on 1 tool, recorded in the fixture's own header rather than claimed fixed. Fixing them needs evidence this rule does not have.Two losses were found by field-level lists rather than by any count bar and fixed before this branch shipped.
savelog's-r rolldir - use rolldir instead of . to roll fileshad its real value thrown away while its description was recovered; reading the value off the usage line keeps both.lsof's-F [f] select fields; -F? for helpgained its description with[f]printed twice, once as the value and once opening the description; a leading bare, bracketed or angled repeat of the usage value is now stripped.lsof-Fis the only change to that fixture besides its root description splitting into the two paragraphs its help really has.