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 — refactor(cli): behavior-preserving simplify pass across the command layer (−576 lines) by mikolalysenko · Pull Request #118 · SocketDev/socket-patch

Conversation

@mikolalysenko

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

Copy link
Copy Markdown
Collaborator

Summary

Behavior-preserving simplification pass over the CLI command layer: −575 lines across
14 command files, args.rs, and 2 test files, plus one documented core visibility widening.

Per-file highlights (each verified against its module's tests when authored):

  • scan.rs (−~180): 3× discovery loop, 4× GC dispatch, 3× DownloadParams, 2× staging +
    partition helpers dedup'd; pub(crate) helpers privatized; boxed_* Windows-stack frames
    deliberately kept.
  • get.rs: 4× files-map + 2× client/apply/drift blocks dedup'd; dead DownloadParams.one_off
    removed.
  • apply.rs: rollback's is_local_go dedup'd into apply; as_patch_sources() adopted;
    helpers privatized.
  • fetch_stage.rs: offline diagnostics dedup'd; reuses get.rs is_valid_blob_hash;
    3× MemStagedSources literals → 1; pub → pub(crate).
  • remove.rs: patch_matches predicate shared across 3 sites; emit_not_found dedup;
    reuses get.rs short_uuid.
  • repair.rs / repair_vendor.rs: error emits reuse lock_cli::error_envelope; cleanup loop
    dedup; write-only RepairVendorCounts deleted; Missing/Corrupt arms merged; 3× remove-dir
    dedup; persist branches unified.
  • rollback.rs: reuses core get_before_hash_blobs + remove's patch_matches; one-off
    emits merged.
  • lock_cli.rs (−64), unlock.rs, vendor.rs, vex.rs: same treatment (shared
    envelope helpers, dedup'd emits/dispatch blocks).
  • commands/mod.rs: fetch_stage/lock_cli/repair_vendor → pub(crate) (internal
    libraries, not commands).
  • core go_redirect.rs: are_safe_redirect_coords pub(crate) → pub with doc comment —
    the CLI's VEX go-patches synthesis now applies the exact core guard instead of a
    drift-prone local mirror (vex.rs test retargeted accordingly).

No user-visible behavior, flags, JSON shapes, or exit codes change.

Test plan

  • cargo test --workspace green (e2e_cargo re-verified in isolation after a
    parallel-load flake)
  • cargo clippy --workspace --all-targets zero warnings

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

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

All reactions
@mikolalysenko @claude
refactor(cli): behavior-preserving simplify pass across the command l…
7a2c15e
…ayer

Dedup and privatize across all 14 command files + args.rs: shared
patch_matches/short_uuid/error_envelope/DownloadParams/offline-diagnostic
helpers, merged duplicate emit blocks, deleted write-only structs and dead
fields, pub -> pub(crate) for the internal fetch_stage/lock_cli/repair_vendor
libraries. Core: are_safe_redirect_coords widened to pub so the CLI VEX
go-patches synthesis applies the exact core guard instead of a local mirror
(test retargeted). Net -575 lines; no user-visible behavior change.

Co-Authored-By: Claude Fable 5 <[email protected]>
This was referenced Jul 2, 2026
fix(cli): Phase 1 quick wins — env-bool crashes, remove --dry-run, one-off stub, mode-fold inversion #119
Closed
cleanup: CLI simplify pass, correctness fixes, core dedups, scan split, docs sync (−587 net lines) #120
Merged
@mikolalysenko

Mikola Lysenko (mikolalysenko) commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded — combined into #120, which now targets main and contains all of this PR's commits (7a2c15e + follow-ups). Closing unmerged.

All reactions

Sorry, something went wrong.

Uh oh!

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

@mikolalysenko Mikola Lysenko (mikolalysenko) closed this Jul 3, 2026
@mikolalysenko
Mikola Lysenko (mikolalysenko) deleted the refactor/cli-simplify-pass branch July 3, 2026 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

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.

1 participant

@mikolalysenko
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.