Title: test(args): regression coverage for BoolishValueParser on env bools by mikolalysenko · Pull Request #89 · SocketDev/socket-patch · GitHub
Open Graph Title: test(args): regression coverage for BoolishValueParser on env bools by mikolalysenko · Pull Request #89 · SocketDev/socket-patch
X Title: test(args): regression coverage for BoolishValueParser on env bools by mikolalysenko · Pull Request #89 · SocketDev/socket-patch
Description: Summary Follow-up to #82 (telemetry coverage + paid-tier fallback). PR #82 wired clap::builder::BoolishValueParser onto every bool global with an env attribute so SOCKET_OFFLINE=1, SOCKET_DEBUG=1, etc. parse correctly — previously they crashed clap with error: invalid value '1' for '--offline'. That commit shipped without paired regression tests; I added them on the same branch but they landed after the squash-merge cutoff. This PR is just those tests, rebased onto the current main. Two #[serial] tests in crates/socket-patch-cli/tests/cli_global_args.rs: bool_env_vars_accept_one_and_yes — SOCKET_OFFLINE=1, SOCKET_GLOBAL=yes, SOCKET_JSON=on, SOCKET_VERBOSE=1, SOCKET_SILENT=y, SOCKET_DRY_RUN=1, SOCKET_YES=yes, SOCKET_BREAK_LOCK=1, SOCKET_DEBUG=1, SOCKET_TELEMETRY_DISABLED=1 all parse as true. bool_env_vars_reject_zero_and_falsey — SOCKET_OFFLINE=0, SOCKET_DEBUG=false, SOCKET_TELEMETRY_DISABLED=no, SOCKET_JSON=off all parse as false. Guards against an over-eager parser flipping a bool on any non-empty string. The existing env_vars_populate_global_args is also marked #[serial] in this commit — env-var state is process-global, so without serialization the negative-case test flakes by inheriting SOCKET_OFFLINE=1 from the positive case running concurrently. Test plan cargo test -p socket-patch-cli --test cli_global_args clean against current main (post-refactor in #88). Both new tests pass; existing 4 tests in the file still pass. No production code changes — pure test coverage. Assisted-by: Claude Code:opus-4-7
Open Graph Description: Summary Follow-up to #82 (telemetry coverage + paid-tier fallback). PR #82 wired clap::builder::BoolishValueParser onto every bool global with an env attribute so SOCKET_OFFLINE=1, SOCKET_DEBUG=1, ...
X Description: Summary Follow-up to #82 (telemetry coverage + paid-tier fallback). PR #82 wired clap::builder::BoolishValueParser onto every bool global with an env attribute so SOCKET_OFFLINE=1, SOCKET_DEBUG=1, ...
Opengraph URL: https://github.com/SocketDev/socket-patch/pull/89
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:1d54de50-9479-742b-aa9f-e147df3de52a |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 955A:348BD7:494431F:66D99D0:6A4F802B |
| html-safe-nonce | fabfb5149a3ae2f629255b0b0bdf8d9cf2933dbc6d8e40e24568784e3733f661 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NTVBOjM0OEJENzo0OTQ0MzFGOjY2RDk5RDA6NkE0RjgwMkIiLCJ2aXNpdG9yX2lkIjoiNTMyNzM0NDYwMDk5MzQ2NDM2MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 96b1a8bdd9240d1454998977d893197546c690869cb61c4c152d0d4298131c51 |
| hovercard-subject-tag | pull_request:3763857618 |
| 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/89/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 Follow-up to #82 (telemetry coverage + paid-tier fallback). PR #82 wired clap::builder::BoolishValueParser onto every bool global with an env attribute so SOCKET_OFFLINE=1, SOCKET_DEBUG=1, ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9 |
| 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 |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4b249b445842943ed31549e027f57a8ade9881ed |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width