René's URL Explorer Experiment


Title: test(cli): unit-test looks_like_uuid + parse_with_uuid_fallback by mikolalysenko · Pull Request #72 · SocketDev/socket-patch · GitHub

Open Graph Title: test(cli): unit-test looks_like_uuid + parse_with_uuid_fallback by mikolalysenko · Pull Request #72 · SocketDev/socket-patch

X Title: test(cli): unit-test looks_like_uuid + parse_with_uuid_fallback by mikolalysenko · Pull Request #72 · SocketDev/socket-patch

Description: Summary Locks in two of the most fragile undocumented surfaces in the socket-patch CLI: the bare-UUID rewrite shortcut (socket-patch → socket-patch get ) and the top-level Cli parser. Until now nothing guarded either — a flag rename or a subcommand-alias drop could land green and break every shipped wrapper silently. This PR is part of the CLI-contract unit-test campaign on top of PR #67 (tests/cli-contract-foundation). Coverage src/lib.rs::tests (inline) — 13 tests looks_like_uuid: canonical lowercase, all-uppercase, mixed-case UUIDs all return true 4-group and 6-group inputs return false 8-4-4-4-13 and 7-4-4-4-12 group-length variants return false non-hex characters in any group return false empty string returns false 32-hex-char string with no dashes returns false bare dashes (----, five empty groups) return false parse_with_uuid_fallback: socket-patch rewrites to Commands::Get { identifier } socket-patch --json forwards the flag to the synthesized get socket-patch not-a-uuid returns the ORIGINAL clap error (InvalidSubcommand), no rewrite attempted socket-patch list parses normally — fallback never runs socket-patch get already parses — no double-rewrite socket-patch --invalid-flag surfaces the original InvalidSubcommand error (not the rewrite's UnknownArgument) tests/cli_parse_main.rs (integration) — 14 tests Top-level error kinds: no subcommand → DisplayHelpOnMissingArgumentOrSubcommand --version → DisplayVersion --help → DisplayHelp unknown subcommand → InvalidSubcommand Every subcommand name in the contract parses (Apply, Rollback, Get, Scan, List, Remove, Setup, Repair) with the right positional-arg requirements (Get/Remove need ; Rollback's identifier is optional; the rest take none). Visible aliases prove out: socket-patch download parses as Commands::Get socket-patch gc parses as Commands::Repair Contract sections locked in CLI_CONTRACT.md — "Subcommands" table (all 8 names + the download / gc visible aliases) CLI_CONTRACT.md — "Bare-UUID fallback" paragraph (the 8-4-4-4-12 case-insensitive predicate and the rewrite shortcut) Test plan cargo build --workspace --all-features clean cargo clippy --workspace --all-features -- -D warnings clean cargo test --workspace --all-features --lib --tests — all pass (415 core + 17 cli lib + 14 cli_parse_main + e2e suites) Assisted-by: Claude Code:claude-opus-4-7

Open Graph Description: Summary Locks in two of the most fragile undocumented surfaces in the socket-patch CLI: the bare-UUID rewrite shortcut (socket-patch <UUID> → socket-patch get <UUID>) and the top-level ...

X Description: Summary Locks in two of the most fragile undocumented surfaces in the socket-patch CLI: the bare-UUID rewrite shortcut (socket-patch &lt;UUID&gt; → socket-patch get &lt;UUID&gt;) an...

Opengraph URL: https://github.com/SocketDev/socket-patch/pull/72

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:5ac666f5-9880-faed-617a-d231cc7f875f
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC8E8:153BC1:FB5B22:155CD93:6A4F0A2B
html-safe-nonce8162338267c2c9c89a015cd864b7d043d272cbc3c3d6f28ad283b3b0c862aefd
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOEU4OjE1M0JDMTpGQjVCMjI6MTU1Q0Q5Mzo2QTRGMEEyQiIsInZpc2l0b3JfaWQiOiI2ODI5MDEzNzE3NzA4OTAwOTA3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac22b3971907d3af090893da6954f26e2108ff0dcbb3aef3b7e2c041c816e021a8
hovercard-subject-tagpull_request:3711911904
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/SocketDev/socket-patch/pull/72/files
twitter:imagehttps://avatars.githubusercontent.com/u/231686?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/231686?s=400&v=4
og:image:altSummary Locks in two of the most fragile undocumented surfaces in the socket-patch CLI: the bare-UUID rewrite shortcut (socket-patch <UUID> → socket-patch get <UUID>) and the top-level ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/SocketDev/socket-patch git https://github.com/SocketDev/socket-patch.git
octolytics-dimension-user_id69326764
octolytics-dimension-user_loginSocketDev
octolytics-dimension-repository_id1093661456
octolytics-dimension-repository_nwoSocketDev/socket-patch
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1093661456
octolytics-dimension-repository_network_root_nwoSocketDev/socket-patch
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2b8f23afb982271f1b22258a94aede67a6b77760
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/SocketDev/socket-patch/pull/72/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FSocketDev%2Fsocket-patch%2Fpull%2F72%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FSocketDev%2Fsocket-patch%2Fpull%2F72%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=SocketDev%2Fsocket-patch
Reloadhttps://github.com/SocketDev/socket-patch/pull/72/files
Reloadhttps://github.com/SocketDev/socket-patch/pull/72/files
Reloadhttps://github.com/SocketDev/socket-patch/pull/72/files
Please reload this pagehttps://github.com/SocketDev/socket-patch/pull/72/files
SocketDev https://github.com/SocketDev
socket-patchhttps://github.com/SocketDev/socket-patch
Notifications https://github.com/login?return_to=%2FSocketDev%2Fsocket-patch
Fork 0 https://github.com/login?return_to=%2FSocketDev%2Fsocket-patch
Star 3 https://github.com/login?return_to=%2FSocketDev%2Fsocket-patch
Code https://github.com/SocketDev/socket-patch
Issues 1 https://github.com/SocketDev/socket-patch/issues
Pull requests 1 https://github.com/SocketDev/socket-patch/pulls
Actions https://github.com/SocketDev/socket-patch/actions
Models https://github.com/SocketDev/socket-patch/models
Security and quality 0 https://github.com/SocketDev/socket-patch/security
Insights https://github.com/SocketDev/socket-patch/pulse
Code https://github.com/SocketDev/socket-patch
Issues https://github.com/SocketDev/socket-patch/issues
Pull requests https://github.com/SocketDev/socket-patch/pulls
Actions https://github.com/SocketDev/socket-patch/actions
Models https://github.com/SocketDev/socket-patch/models
Security and quality https://github.com/SocketDev/socket-patch/security
Insights https://github.com/SocketDev/socket-patch/pulse
Sign up for GitHub https://github.com/signup?return_to=%2FSocketDev%2Fsocket-patch%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FSocketDev%2Fsocket-patch%2Fissues%2Fnew%2Fchoose
Mikola Lysenko (mikolalysenko)https://github.com/mikolalysenko
tests/cli-contract-foundationhttps://github.com/SocketDev/socket-patch/tree/tests/cli-contract-foundation
tests/cli-parse-mainhttps://github.com/SocketDev/socket-patch/tree/tests/cli-parse-main
Conversation 1 https://github.com/SocketDev/socket-patch/pull/72
Commits 2 https://github.com/SocketDev/socket-patch/pull/72/commits
Checks 4 https://github.com/SocketDev/socket-patch/pull/72/checks
Files changed https://github.com/SocketDev/socket-patch/pull/72/files
Please reload this pagehttps://github.com/SocketDev/socket-patch/pull/72/files
test(cli): unit-test looks_like_uuid + parse_with_uuid_fallback https://github.com/SocketDev/socket-patch/pull/72/files#top
Show all changes 2 commits https://github.com/SocketDev/socket-patch/pull/72/files
6cb84b8 test(cli): foundation for CLI-contract unit-test campaign mikolalysenko May 19, 2026 https://github.com/SocketDev/socket-patch/pull/72/commits/6cb84b8c4456cbcca1ceabb9beea386f1a0fe272
ab0b1ac test(cli): unit-test looks_like_uuid + parse_with_uuid_fallback mikolalysenko May 19, 2026 https://github.com/SocketDev/socket-patch/pull/72/commits/ab0b1ac8e7aeaa4e043c28b4de49b5a9064cfcd5
Clear filters https://github.com/SocketDev/socket-patch/pull/72/files
Please reload this pagehttps://github.com/SocketDev/socket-patch/pull/72/files
Please reload this pagehttps://github.com/SocketDev/socket-patch/pull/72/files
CLI_CONTRACT.md https://github.com/SocketDev/socket-patch/pull/72/files#diff-f4377a7f0221c73c8e1c3a219f5dbd8ee64094eb7786841ecea88ccd22daf130
Cargo.toml https://github.com/SocketDev/socket-patch/pull/72/files#diff-d975fab3956058ba8cc187ef25733f371f85ac13917e77e0bfa4c40c73ba5f7b
apply.rs https://github.com/SocketDev/socket-patch/pull/72/files#diff-613e6131c3d7005ade62351d4f879e7c817bafdc2f6d6fdd87e2b259bebfb9bf
list.rs https://github.com/SocketDev/socket-patch/pull/72/files#diff-808f74b0c8422b914537c7fbdc380059d5bf4a4a60fe317d2d850a43a6448a8f
remove.rs https://github.com/SocketDev/socket-patch/pull/72/files#diff-37716ed3bf0ced8c6011d60b918d7bf9ab7b8a118ce8245507dfe9332e54b27c
repair.rs https://github.com/SocketDev/socket-patch/pull/72/files#diff-cc48894cd3c0ab1d1fbdaae98591be3e7ab527d344e47eeafb2f7c0783391c35
rollback.rs https://github.com/SocketDev/socket-patch/pull/72/files#diff-49bed4b7989d1153ce40e98f6686a0343d4aef1e9a8f241abfb0d6e006cda233
lib.rs https://github.com/SocketDev/socket-patch/pull/72/files#diff-d4989724ce35f9d98a4444f57ad1c5aa8e4d19c2e55380b6cb39cf1e3139ffc8
main.rs https://github.com/SocketDev/socket-patch/pull/72/files#diff-df6d5aa728e15b07a84996ad4e4dc5ddc46be7d2a186da53c67257c729fe33e7
cli_parse_main.rs https://github.com/SocketDev/socket-patch/pull/72/files#diff-ba439fdf562ce2b404bb37fb7edc0e7e15ffd8aa778bcf546ceb83952ed1737d
operations.rs https://github.com/SocketDev/socket-patch/pull/72/files#diff-412872bbcaf0808c9201a327034774848091983c7a6995ca91dbff80b89d2917
crates/socket-patch-cli/CLI_CONTRACT.mdhttps://github.com/SocketDev/socket-patch/pull/72/files#diff-f4377a7f0221c73c8e1c3a219f5dbd8ee64094eb7786841ecea88ccd22daf130
View file https://github.com/SocketDev/socket-patch/blob/ab0b1ac8e7aeaa4e043c28b4de49b5a9064cfcd5/crates/socket-patch-cli/CLI_CONTRACT.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/SocketDev/socket-patch/pull/72/{{ revealButtonHref }}
crates/socket-patch-cli/Cargo.tomlhttps://github.com/SocketDev/socket-patch/pull/72/files#diff-d975fab3956058ba8cc187ef25733f371f85ac13917e77e0bfa4c40c73ba5f7b
View file https://github.com/SocketDev/socket-patch/blob/ab0b1ac8e7aeaa4e043c28b4de49b5a9064cfcd5/crates/socket-patch-cli/Cargo.toml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/SocketDev/socket-patch/pull/72/{{ revealButtonHref }}
https://github.com/SocketDev/socket-patch/pull/72/files#diff-d975fab3956058ba8cc187ef25733f371f85ac13917e77e0bfa4c40c73ba5f7b
https://github.com/SocketDev/socket-patch/pull/72/files#diff-d975fab3956058ba8cc187ef25733f371f85ac13917e77e0bfa4c40c73ba5f7b
crates/socket-patch-cli/src/commands/apply.rshttps://github.com/SocketDev/socket-patch/pull/72/files#diff-613e6131c3d7005ade62351d4f879e7c817bafdc2f6d6fdd87e2b259bebfb9bf
View file https://github.com/SocketDev/socket-patch/blob/ab0b1ac8e7aeaa4e043c28b4de49b5a9064cfcd5/crates/socket-patch-cli/src/commands/apply.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/SocketDev/socket-patch/pull/72/{{ revealButtonHref }}
https://github.com/SocketDev/socket-patch/pull/72/files#diff-613e6131c3d7005ade62351d4f879e7c817bafdc2f6d6fdd87e2b259bebfb9bf
https://github.com/SocketDev/socket-patch/pull/72/files#diff-613e6131c3d7005ade62351d4f879e7c817bafdc2f6d6fdd87e2b259bebfb9bf
https://github.com/SocketDev/socket-patch/pull/72/files#diff-613e6131c3d7005ade62351d4f879e7c817bafdc2f6d6fdd87e2b259bebfb9bf
https://github.com/SocketDev/socket-patch/pull/72/files#diff-613e6131c3d7005ade62351d4f879e7c817bafdc2f6d6fdd87e2b259bebfb9bf
crates/socket-patch-cli/src/commands/list.rshttps://github.com/SocketDev/socket-patch/pull/72/files#diff-808f74b0c8422b914537c7fbdc380059d5bf4a4a60fe317d2d850a43a6448a8f
View file https://github.com/SocketDev/socket-patch/blob/ab0b1ac8e7aeaa4e043c28b4de49b5a9064cfcd5/crates/socket-patch-cli/src/commands/list.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/SocketDev/socket-patch/pull/72/{{ revealButtonHref }}
https://github.com/SocketDev/socket-patch/pull/72/files#diff-808f74b0c8422b914537c7fbdc380059d5bf4a4a60fe317d2d850a43a6448a8f
https://github.com/SocketDev/socket-patch/pull/72/files#diff-808f74b0c8422b914537c7fbdc380059d5bf4a4a60fe317d2d850a43a6448a8f
crates/socket-patch-cli/src/commands/remove.rshttps://github.com/SocketDev/socket-patch/pull/72/files#diff-37716ed3bf0ced8c6011d60b918d7bf9ab7b8a118ce8245507dfe9332e54b27c
View file https://github.com/SocketDev/socket-patch/blob/ab0b1ac8e7aeaa4e043c28b4de49b5a9064cfcd5/crates/socket-patch-cli/src/commands/remove.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/SocketDev/socket-patch/pull/72/{{ revealButtonHref }}
https://github.com/SocketDev/socket-patch/pull/72/files#diff-37716ed3bf0ced8c6011d60b918d7bf9ab7b8a118ce8245507dfe9332e54b27c
https://github.com/SocketDev/socket-patch/pull/72/files#diff-37716ed3bf0ced8c6011d60b918d7bf9ab7b8a118ce8245507dfe9332e54b27c
https://github.com/SocketDev/socket-patch/pull/72/files#diff-37716ed3bf0ced8c6011d60b918d7bf9ab7b8a118ce8245507dfe9332e54b27c
crates/socket-patch-cli/src/commands/repair.rshttps://github.com/SocketDev/socket-patch/pull/72/files#diff-cc48894cd3c0ab1d1fbdaae98591be3e7ab527d344e47eeafb2f7c0783391c35
View file https://github.com/SocketDev/socket-patch/blob/ab0b1ac8e7aeaa4e043c28b4de49b5a9064cfcd5/crates/socket-patch-cli/src/commands/repair.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/SocketDev/socket-patch/pull/72/{{ revealButtonHref }}
https://github.com/SocketDev/socket-patch/pull/72/files#diff-cc48894cd3c0ab1d1fbdaae98591be3e7ab527d344e47eeafb2f7c0783391c35
https://github.com/SocketDev/socket-patch/pull/72/files#diff-cc48894cd3c0ab1d1fbdaae98591be3e7ab527d344e47eeafb2f7c0783391c35
https://github.com/SocketDev/socket-patch/pull/72/files#diff-cc48894cd3c0ab1d1fbdaae98591be3e7ab527d344e47eeafb2f7c0783391c35
https://github.com/SocketDev/socket-patch/pull/72/files#diff-cc48894cd3c0ab1d1fbdaae98591be3e7ab527d344e47eeafb2f7c0783391c35
crates/socket-patch-cli/src/commands/rollback.rshttps://github.com/SocketDev/socket-patch/pull/72/files#diff-49bed4b7989d1153ce40e98f6686a0343d4aef1e9a8f241abfb0d6e006cda233
View file https://github.com/SocketDev/socket-patch/blob/ab0b1ac8e7aeaa4e043c28b4de49b5a9064cfcd5/crates/socket-patch-cli/src/commands/rollback.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/SocketDev/socket-patch/pull/72/{{ revealButtonHref }}
https://github.com/SocketDev/socket-patch/pull/72/files#diff-49bed4b7989d1153ce40e98f6686a0343d4aef1e9a8f241abfb0d6e006cda233
https://github.com/SocketDev/socket-patch/pull/72/files#diff-49bed4b7989d1153ce40e98f6686a0343d4aef1e9a8f241abfb0d6e006cda233
https://github.com/SocketDev/socket-patch/pull/72/files#diff-49bed4b7989d1153ce40e98f6686a0343d4aef1e9a8f241abfb0d6e006cda233
https://github.com/SocketDev/socket-patch/pull/72/files#diff-49bed4b7989d1153ce40e98f6686a0343d4aef1e9a8f241abfb0d6e006cda233
Please reload this pagehttps://github.com/SocketDev/socket-patch/pull/72/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.