Give flags to manifests that shipped with flags: [] - #109
Merged
Conversation
Eleven of fifteen realistic invocations of the flags:[] manifests were rejected. `netstat -ano` is the sharpest case: a first-reach Windows network diagnostic, and explicitly on the Phase 4 list, refused because its manifest declared no flags at all. Same defect already found twice this week in get-psdrive and again here. Fixed: netstat, tracert, get-volume, get-disk (Windows), and cat, who, w, lscpu (POSIX). Left alone: aws, docker, kubectl, svn, systemctl, whose empty lists are correct because flags live on their subcommand manifests. Adds allows_flag_bundling, because netstat surfaced a conflation in the schema. `shell: powershell` currently means both "runs on a Windows host" and "uses PowerShell parameter conventions", but netstat.exe and tracert.exe are native executables using DOS-style bundled switches - `netstat -ano` is -a -n -o. Bundling was disabled for all powershell manifests so `-Match` would not shred into -M -a -t -c -h, which is right for cmdlets and wrong for these. The field separates the two meanings rather than enumerating combos like -ano/-an/-ao, which is the combinatorial explosion the design rejected. Bundling stays opt-in and defaults to false, guarded by TestFlagBundlingStaysOptIn: netstat -zzz names -z, while where-object -NotARealParameter and get-volume -Bogus still name the whole parameter.
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.
Why
Eleven of fifteen realistic invocations of the
flags: []manifests were rejected.netstat -anois the sharpest case — a first-reach Windows network diagnostic, explicitlynamed on the Phase 4 list, refused because its manifest declared no flags at all.
This is the same defect found twice already:
get-psdrive(fixed in #108) and now these.An audit found 21 manifests with
flags: [].What changed
Fixed:
netstat,tracert,get-volume,get-disk(Windows), andcat,who,w,lscpu(POSIX).Left alone deliberately:
aws,docker,kubectl,svn,systemctl— their emptylists are correct, because flags live on the subcommand manifests.
New field:
allows_flag_bundlingnetstatsurfaced a conflation in the schema worth naming.shell: powershellcurrentlymeans both "runs on a Windows host" and "uses PowerShell parameter conventions" — but
netstat.exeandtracert.exeare native executables using DOS-style bundled switches,where
netstat -anois-a -n -o.Bundling was disabled for all
powershellmanifests so-Matchwouldn't shred into-M -a -t -c -h. That is right for cmdlets and wrong for native executables. This fieldseparates the two meanings, rather than enumerating combos (
-ano,-an,-ao, …) —the combinatorial explosion the original design explicitly rejected.
It is opt-in and defaults to false, so no existing manifest changes behavior.
Containment
TestFlagBundlingStaysOptInis the guard that matters:netstat -zzz→ names-z(bundling active where opted in)where-object -NotARealParameter→ names the whole parameterget-service -Nam→ names the whole flagget-volume -Bogus→ names the whole flagTesting
TestEmptyFlagListManifestsFixed,TestFlagBundlingStaysOptIn,TestAllowsFlagBundlingParsed,TestAllowsFlagBundlingDefaultsFalse.Full suite passes including
-race;go vetclean.Not verified
No real Windows host available, so these flag lists are from standard command
documentation and are not confirmed against live binaries.
netstat,tracert,cat,who,w, andlscpuare stable, long-documented interfaces;get-volumeandget-diskare the ones most worth a second look if a host becomes available.🤖 Generated with Claude Code