Title: test(cli): pin ScanArgs flag surface (batch-size=100, download-mode=diff) by mikolalysenko · Pull Request #74 · SocketDev/socket-patch · GitHub
Open Graph Title: test(cli): pin ScanArgs flag surface (batch-size=100, download-mode=diff) by mikolalysenko · Pull Request #74 · SocketDev/socket-patch
X Title: test(cli): pin ScanArgs flag surface (batch-size=100, download-mode=diff) by mikolalysenko · Pull Request #74 · SocketDev/socket-patch
Description: Summary Adds clap parser snapshot tests for the scan subcommand to lock in every flag, short form, and default. Two load-bearing defaults are explicitly asserted because they're silent-regression risks: --batch-size default is 100 — downstream API batching depends on this. --download-mode default is "diff" — this diverges from repair's default. Coverage: Every flag in the scan contract table (--cwd, --org, --json, --yes/-y, --global/-g, --global-prefix, --batch-size, --api-url, --api-token, --ecosystems, --download-mode). Short-form variants for --yes and --global. --ecosystems CSV split for multi-value and single-value inputs. All three --download-mode values: diff, package, file. --batch-size edge cases: 1, 500, 0 (parser-accepted), negative (rejected with ValueValidation/InvalidValue). Unknown-flag failure asserts clap::error::ErrorKind::UnknownArgument. No changes to scan.rs — it's all async + network-touching helpers, not unit-testable. Stacked on #67 via tests/cli-contract-foundation. Test plan cargo build --workspace --all-features clean cargo clippy --workspace --all-features -- -D warnings clean cargo test --workspace --all-features --lib --tests — 21 new tests pass, full suite green --batch-size default 100 explicitly asserted --download-mode default "diff" explicitly asserted --ecosystems CSV split verified Unknown-flag failure asserts correct ErrorKind
Open Graph Description: Summary Adds clap parser snapshot tests for the scan subcommand to lock in every flag, short form, and default. Two load-bearing defaults are explicitly asserted because they're silent-regressi...
X Description: Summary Adds clap parser snapshot tests for the scan subcommand to lock in every flag, short form, and default. Two load-bearing defaults are explicitly asserted because they're silent-regr...
Opengraph URL: https://github.com/SocketDev/socket-patch/pull/74
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:b0c32ea4-9168-28e8-16ad-156600b847eb |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | BBC2:8F52B:1E4D492:29BD37D:6A4ECF57 |
| html-safe-nonce | 792519844528994fabc598782dc51f564948fa63a9f610ba0dd78a2d975a27df |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQkMyOjhGNTJCOjFFNEQ0OTI6MjlCRDM3RDo2QTRFQ0Y1NyIsInZpc2l0b3JfaWQiOiI2ODcwOTc2NzcxMTI4NTY0MDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 846c9a3f3d40e7bf6356fc10053fcce2a39b1f9adf4d851aab4eea22f6130e62 |
| hovercard-subject-tag | pull_request:3711915407 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/SocketDev/socket-patch/pull/74/files |
| twitter:image | https://avatars.githubusercontent.com/u/231686?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/231686?s=400&v=4 |
| og:image:alt | Summary Adds clap parser snapshot tests for the scan subcommand to lock in every flag, short form, and default. Two load-bearing defaults are explicitly asserted because they're silent-regressi... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/SocketDev/socket-patch git https://github.com/SocketDev/socket-patch.git |
| octolytics-dimension-user_id | 69326764 |
| octolytics-dimension-user_login | SocketDev |
| octolytics-dimension-repository_id | 1093661456 |
| octolytics-dimension-repository_nwo | SocketDev/socket-patch |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1093661456 |
| octolytics-dimension-repository_network_root_nwo | SocketDev/socket-patch |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e6a744804e8e70f97b4d5a18a94dcc63db22f97a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width