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(cargo): patch crates in place; drop the [patch]-redirect backend + build guard by mikolalysenko · Pull Request #107 · SocketDev/socket-patch

Conversation

@mikolalysenko

@mikolalysenko Mikola Lysenko (mikolalysenko) commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Simplifies the cargo apply path to patch crates in place (vendored or registry cache) like npm/pypi/gem, removing the recently-added project-local [patch]-redirect backend and the build-time socket-patch-guard setup wiring. Cargo now rolls back in place from before-blobs instead of dropping a redirect.

Net: +286 / −7708 lines.

Removed

  • core: cargo_setup (discover/update), patch/cargo_config, patch/cargo_redirect, and go_setup (the build-time Go guard package + templates).
  • cli: cargo/go redirect dispatch in apply/rollback, cargo + Go guard wiring in setup, and the now-dead setup/redirect tests.

Kept

  • Go replace-redirect (go_redirect / go_mod_edit / copy_tree): the module cache is checksum-verified, so in-place patching fails go.sum at build time — Go still needs the project-local patched copy.
  • The socket-patch-guard crate and its build-integration test (it's simply no longer auto-wired by setup).

copy_tree is now gated on golang only. Docs (README, CLI_CONTRACT.md, module headers) updated to drop the removed backends.

Test plan

  • cargo build --workspace across feature combos: default / --no-default-features / --all-features / core --features cargo — all clean.
  • cargo test --workspace --no-fail-fast — full suite passes, zero failures.

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

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

All reactions
Mikola Lysenko (mikolalysenko) and others added 2 commits June 9, 2026 08:23
@mikolalysenko @claude
refactor(cargo): patch crates in place; drop the [patch]-redirect bac…
bdc96ae
…kend + build guard

Simplify the cargo apply path to patch crates in place (vendored or
registry cache) like npm/pypi/gem, removing the project-local
`[patch]`-redirect backend and the build-time `socket-patch-guard`
setup wiring. Cargo now rolls back in place from before-blobs rather
than dropping a redirect.

Removed:
- core: `cargo_setup` (discover/update), `patch/cargo_config`,
  `patch/cargo_redirect`, and `go_setup` (the build-time Go guard
  package + templates).
- cli: cargo/go redirect dispatch in `apply`/`rollback`, cargo + Go
  guard wiring in `setup`, and the now-dead setup/redirect tests.

Kept:
- Go `replace`-redirect (`go_redirect`/`go_mod_edit`/`copy_tree`): the
  module cache is checksum-verified, so in-place patching fails
  `go.sum` at build time — Go still needs the project-local copy.
- The `socket-patch-guard` crate and its build-integration test.

`copy_tree` is now gated on `golang` only. Docs (README, CLI_CONTRACT,
module headers) updated to drop the removed backends.

Builds clean across feature combos (default / none / all / cargo-only)
and the full suite passes (--no-fail-fast).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@mikolalysenko @claude
ci: drop removed cargo-coexist suite + go-guard-template lint step
0f1e05e
The simplification deleted `tests/e2e_cargo_coexist.rs` and the
`go_setup/templates/*.tmpl` files, but ci.yml still referenced them:
the e2e matrix listed `e2e_cargo_coexist` (no such target → fail) and
the lint-ecosystems job `cp`'d the now-absent Go guard templates for
gofmt/vet (cp → fail). Remove both; keep `guard_build_integration`.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Wenxin-Jiang
Wenxin Jiang (Wenxin-Jiang) approved these changes Jun 9, 2026
View reviewed changes
@mikolalysenko @claude
refactor: remove the now-orphaned socket-patch-guard crate + stale re…
26014a1
…ferences

With cargo patching in place (no `[patch]`-redirect) and `setup` no
longer wiring a build-time guard, the `socket-patch-guard` crate had no
consumer: nothing in cli/core references it, `setup` never writes it,
and its `.socket/cargo-patches/` + `SOCKET_PATCH_ROOT` machinery no
longer exists. Remove it and every dangling reference.

- Delete `crates/socket-patch-guard/` (crate, build.rs, README,
  SAME_TICK_HEAL_RND.md, same_tick_heal_experiment.rs) and drop it from
  the workspace members + Cargo.lock.
- Delete `guard_build_integration.rs`; drop the `guard_build_integration`
  e2e matrix entry and the guard-template gofmt/vet step from ci.yml;
  drop the `cargo publish -p socket-patch-guard` step from release.yml.
- CHANGELOG: rewrite the `[Unreleased]` cargo/guard entries to describe
  what actually ships — cargo in-place patching (default feature) and
  the Go `replace`-redirect backend — and drop the now-false
  "cargo apply now redirects" Changed bullet.
- Drop the dead `SOCKET_PATCH_ROOT`/`SOCKET_PATCH_GUARD` env vars from
  test scrub lists (no longer read in src; `SOCKET_PATCH_BIN` kept — the
  gem Bundler plugin still uses it); repoint stale `setup_matrix_cargo`
  doc-comments to surviving sibling suites; refresh CLI_CONTRACT prose.

Builds clean across feature combos; full suite passes (--no-fail-fast).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@mikolalysenko
Mikola Lysenko (mikolalysenko) merged commit 6d685a4 into main Jun 9, 2026
99 of 100 checks passed

Uh oh!

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

@mikolalysenko
Mikola Lysenko (mikolalysenko) deleted the simplify/cargo-go-patch-apply branch June 9, 2026 20:30
@mikolalysenko Mikola Lysenko (mikolalysenko) mentioned this pull request Jun 11, 2026
fix: second-pass bug sweep — crawler traversal guards, FIFO hangs, atomic writes, CLI contract #111
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Wenxin-Jiang Wenxin Jiang (Wenxin-Jiang) Wenxin-Jiang approved these changes

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.

2 participants

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