GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(cli): hidden --mode aliases — vendor/host by mikolalysenko · Pull Request #130 · SocketDev/socket-patch

Conversation

@mikolalysenko

@mikolalysenko Mikola Lysenko (mikolalysenko) commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

What

Undocumented ergonomic aliases for scan --mode: --mode vendor parses as vendored, --mode host as hosted — two #[value(alias = …)] attributes on ScanMode. Help output is unchanged by design (aliases stay hidden).

Tests (cli_parse_scan, all RED-verified)

  • mode_alias_vendor_folds_to_vendor / mode_alias_host_folds_to_redirect — aliases fold to the right legacy boolean, and only that one.
  • mode_alias_host_with_vendor_boolean_errors_with_canonical_name — cross-mode contradiction via an alias still errors, and the message names the canonical mode (--mode hosted), never the alias spelling.
  • mode_aliases_hidden_from_help — renders scan's help and asserts the possible-values segment is exactly [possible values: hosted, vendored, agent] (segment match, since "vendored" contains "vendor"), and the long-help item list shows hosted:/vendored:/agent: and never the aliases. Env-hermetic via with_clean_env.

RED-guards: with the alias attributes removed the three fold tests fail at parse (clap InvalidValue); the help test was RED-verified by temporarily renaming a value to simulate a leak. 47/47 green on the branch; cargo fmt --check and clippy clean.

Split out from the strapi vendored-install debugging session per review request — unrelated to the redirect fix in #131's lineage.

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mikolalysenko @claude
feat(cli): hidden --mode aliases — vendor for vendored, host for …
7765405
…hosted

Ergonomic (deliberately undocumented) clap value aliases on ScanMode:
`--mode vendor` == `--mode vendored`, `--mode host` == `--mode hosted`.
Help output is unchanged — a test renders scan's help and asserts the
possible-values segment is exactly `hosted, vendored, agent` (segment
match, since "vendored" contains "vendor" as a substring), and that the
long-help item list never shows the alias spellings.

New cli_parse_scan tests (RED-verified by removing the alias attrs /
simulating a value-name leak):
- mode_alias_vendor_folds_to_vendor
- mode_alias_host_folds_to_redirect
- mode_alias_host_with_vendor_boolean_errors_with_canonical_name
  (cross-mode fold error keeps naming the canonical mode)
- mode_aliases_hidden_from_help (env-hermetic via with_clean_env)

Co-Authored-By: Claude Fable 5 <[email protected]>
@mikolalysenko
Mikola Lysenko (mikolalysenko) force-pushed the feat/scan-mode-aliases branch from cf7bd9a to 7765405 Compare July 24, 2026 15:53
Wenxin-Jiang
Wenxin Jiang (Wenxin-Jiang) approved these changes Jul 24, 2026
View reviewed changes
@mikolalysenko
Mikola Lysenko (mikolalysenko) merged commit df0d87c into main Jul 24, 2026
54 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@mikolalysenko
Mikola Lysenko (mikolalysenko) deleted the feat/scan-mode-aliases branch July 24, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Wenxin-Jiang Wenxin Jiang (Wenxin-Jiang) Wenxin-Jiang approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@mikolalysenko @Wenxin-Jiang
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.