Repository navigation
Remove scan --apply/--vendor, get --no-apply and the download/gc aliases (#966) - #1031
Mikola Lysenko (mikolalysenko) merged 14 commits into
Conversation
v5 drops these legacy spellings outright, with no warning release: - scan --apply (use --mode agent) and scan --vendor (use --mode vendored). resolve_mode_flags loses its cross-mode boolean arms; the only conflict left is --sync with a --mode other than agent. - get --no-apply (use --save-only; SOCKET_SAVE_ONLY is unchanged). - the `download` alias for get and the `gc` alias for repair. Each removed spelling is now an ordinary clap usage error (exit 2). --sync stays as the shorthand for --mode agent --prune. Comments that named the old flags now name the --mode spelling. Part of #966. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Tests now pass --mode agent / --mode vendored instead of --apply / --vendor, --save-only instead of --no-apply, and set ScanArgs.mode instead of the deleted apply/vendor fields. The boolean conflict tests become --mode X --sync conflict tests, the alias tests now assert that the old spellings fail to parse, and cli_parse_main gains a table test that checks every removed spelling is a usage error, in the parser and through the binary (exit 2). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
CLI_CONTRACT.md no longer promises scan --apply/--vendor, get --no-apply or the download/gc aliases; it uses the --mode spelling throughout and notes the removal. migrating-to-v5.md lists each removed spelling with its replacement. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The exit-2 row of the contract still described scan's cross-mode conflict as a --mode next to another mode's boolean spelling; only --sync with a non-agent --mode is left. Four test labels and comments still read "scan --vendor", and two comments still called the removed spellings deprecated or legacy. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Resolve vendor_flow.rs: keep main's gem takeover preview refusals in the scan --mode vendored dry-run arm, with the PR's comment wording (no reference to the removed `--apply` spelling). Co-Authored-By: Claude <noreply@anthropic.com>
|
bugbot run Generated by Claude Code |
Resolves the CLI_CONTRACT.md get/remove rows: keep this branch's get row without the removed --no-apply alias and take main's remove row. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
[agent] CI status: green on cfd141e (546 pass, 6 skipped). The PR had a merge conflict with main in CLI_CONTRACT.md (get/remove rows). I resolved it by keeping this branch's get row without the removed Generated by Claude Code |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
[agent] Merged main, CI green; ready for review. Generated by Claude Code |
…ove-legacy-spellings Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LD4qUfZKhg2qgt3x9vGeFf
|
bugbot run Generated by Claude Code |
Resolve two CLI_CONTRACT.md conflicts by keeping main's new text (the atomic vendored-to-hosted takeover wording from #1039 and the gem_lock_unsupported warning from #768) while re-applying this PR's migration away from the removed spellings: `scan --apply` becomes `scan --mode agent`, and `--apply`/`--vendor` in the lockfile supplement become agent mode / vendored mode. Co-Authored-By: Claude <noreply@anthropic.com>
|
bugbot run Generated by Claude Code |
…ove-legacy-spellings # Conflicts: # docs/migrating-to-v5.md
|
bugbot run Generated by Claude Code |
|
Burn-down agent: labeled Ready for review at head
Generated by Claude Code |
…ove-legacy-spellings # Conflicts: # crates/socket-patch-cli/CLI_CONTRACT.md
|
Burn-down agent: main moved (#1030/#1085/#1095 landed) and this went CONFLICTING in Generated by Claude Code |
Resolve conflicts with #1027 (--json usage errors print coded errors): keep this branch's --sync-only cross-mode wording (the legacy mode booleans are removed here) and add main's note that --json usage errors now print the coded error on stdout, in scan/mod.rs and CLI_CONTRACT.md. Co-Authored-By: Claude <noreply@anthropic.com>
|
bugbot run Generated by Claude Code |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 717a7d9. Configure here.
|
[burn-down agent] Ready for review at
Ready for a human approval. Generated by Claude Code |
|
[final reviewer] Enqueued (auto-merge on, squash) at head Generated by Claude Code |
Resolve conflicts with #1031 (scan --apply/--vendor, get --no-apply and download/gc alias removal): - docs/migrating-to-v5.md: keep both removal tables' rows (#1031's spellings plus --download-mode/SOCKET_DOWNLOAD_MODE) and the blobs-only archive note. - CLI_CONTRACT.md: keep the --download-mode removal paragraph, take main's --mode agent/vendored wording, drop diff-strategy text; repair events row renamed to `repair` with the file-only Downloaded details. - tests/cli_parse_repair.rs: keep the --download-mode rejection test, drop the gc alias tests main removed; header covers both removals. Fix merge fallout: drop the uuid argument from a new schema.rs test's apply_package_patch call (the PR removed that parameter), and remove an unused FileEdit import in vlt_heal.rs tests left by #1141. Co-Authored-By: Claude <noreply@anthropic.com>
Part of #966.
Why
The maintainer asked on #966 to clean up the unused legacy spellings before v5 ships: retire
--no-apply,downloadandgc, and removescan --apply/--vendor. They are removed outright, with no warning release first.User-visible changes
Each removed spelling is now a clap usage error (exit 2, no JSON envelope):
scan --applyscan --mode agentscan --vendorscan --mode vendoredget --no-applyget --save-only(SOCKET_SAVE_ONLYis unchanged)socket-patch downloadsocket-patch getsocket-patch gcsocket-patch repairUnchanged:
--sync(shorthand for--mode agent --prune;--mode hosted|vendored --syncis still exit 2),--save-only,SOCKET_SAVE_ONLY,repair, and--vexwith its--vex-*options (Q2 on #966 is still open, so this PR is "Part of", not "Closes").Code
scan/mod.rs: hiddenapply/vendorfields deleted fromScanArgs;resolve_mode_flagsnow only rejects--syncnext to a non-agent--mode, maps--syncto agent, and defaults to hosted (global-target check unchanged).get.rs:alias = "no-apply"removed.lib.rs:downloadandgcaliases removed.scan/{hosted,vendor_flow,discovery}.rsandapply.rsnow use the--modespelling.Docs
CLI_CONTRACT.md: alias columns cleared, boolean scan spellings and the--no-apply/gcparagraphs removed, all references moved to--mode, exit-code 2 row updated, alias rows of the bump table rewritten generically.docs/migrating-to-v5.md: five rows added to "Retired spellings", plus a note that removed spellings exit 2 and--syncstays.docs/usage.mdand READMEs already used only the new spellings.CHANGELOG.mdis untouched.Tests
--mode vendored/--mode agent/--save-only;ScanArgsliterals updated; boolean conflict tests became--mode hosted|vendored --synctests; alias tests now assert the spellings are rejected.cli_parse_main.rschecks all five removed spellings in the parser and through the binary (exit 2).scan_vendor_e2ecall sites that passed--mode vendoredtwice (harmless with--vendor, rejected by clap now).cargo test -p socket-patch-cli --lib --binsplus every non-docker--testtarget. All pass except failures from the local machine:e2e_vendor_cargo_build(2 tests, the x86 rustup 1.41.1 toolchain can't run here) andmode_migration_npm::berry_vendored_then_hosted_takeover_leaves_pure_hosted, which exercises code this branch doesn't change (not yet confirmed against main).cli_parse_get,cli_parse_main,cli_parse_scan,help_text_hygiene,in_process_vendor_bun_takeover,scan_vendor_e2e, all pass; all test targets compile.cargo clippy --all-targetsadds no warnings on changed lines.Review findings fixed
--syncwith a non-agent--mode.scan --vendor; two comments still called the spellings "deprecated"/"legacy". All updated.Follow-ups
package.jsonusessocket-patch download;docs/patches.mdusesget --no-applyandgc) and socket-cli (integration tests runpatch download --dry-run).🤖 Generated with Claude Code
Note
Medium Risk
Breaking CLI change: scripts using
scan --apply,--vendor,get --no-apply,download, orgcwill fail at parse time (exit 2) until updated.Overview
v5 CLI cleanup: Removes legacy spellings with no deprecation period.
scan --applyandscan --vendorare gone fromScanArgs; mode is only--modeplus--sync(agent + prune).getdrops the hidden--no-applyalias (use--save-only). Subcommand aliasesdownloadandgcare removed (usegetandrepair).Behavior:
resolve_mode_flagsno longer folds boolean mode flags; it only maps bare--syncto agent mode and rejects--synccombined with a non-agent--mode. Removed spellings are ordinary clap usage errors (exit 2).Docs & tests:
CLI_CONTRACT.mdand related docs are updated to--mode agent/--mode vendoredthroughout; tests and comments follow the same naming.Reviewed by Cursor Bugbot for commit 717a7d9. Configure here.
Generated by Claude Code