Repository navigation
Fix the build label of a hosted gem rollback (#2152) - #2172
Conversation
The hosted refresh of an installed native gem says it builds "from its patched gem" in both directions, also when rollback or remove installs the upstream gem (#2152). Assisted-by: Claude Code:claude-fable-5-2 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011f9aeNXZ8oGYWanAWxsCiy
A native gem's staged build through a stand-in Ruby, in both directions. It fails for the upstream gem, which rollback and remove install: the progress line says "from its patched gem" (#2152). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011f9aeNXZ8oGYWanAWxsCiy Assisted-by: Claude Code:claude-fable-5-2
The staged install of a native gem labelled every build "from its patched gem". rollback and remove run it for the upstream gem, so their progress line said the patch was being rebuilt while the upstream gem was installed. The refresh already knows which gem it installs (patched or upstream) for its other messages, and now hands that to the staged install for the progress line. Fixes #2152 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011f9aeNXZ8oGYWanAWxsCiy Assisted-by: Claude Code:claude-fable-5-2
Review follow-ups: the installed file is reset before each pass, so the second pass also proves the staged install replaced it, and the doc comments name every unwind, not only rollback and remove. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011f9aeNXZ8oGYWanAWxsCiy Assisted-by: Claude Code:claude-fable-5-2
|
bugbot run Generated by Claude Code |
PR SummaryLow Risk Overview
Reviewed by Cursor Bugbot for commit e116787. Configure here. |
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 e116787. Configure here.
|
[agent] PR shepherd: review brief for the approver What it does. Fixes #2152. When a hosted Risk: low. It changes one progress string and adds a Look here
Verified. I read the whole diff and checked every value Changes I made. None. Open questions. None. One nit, not blocking: the test retries forever on ETXTBSY. Other tests in the crate use the same pattern. Generated by Claude Code |
LLM Description written by Claude Code:claude-fable-5-2
Fixes #2152
Summary
When hosted mode puts the upstream build of a native gem back into the
project's gem home (
rollback,remove, any unwind), the progress linesaid the patch was being rebuilt:
It now names the gem that is built: "from its upstream gem" on an unwind,
"from its patched gem" on
scan, as before. Only the text changes; therun already installed the right gem.
Root cause
The refresh compiles a native gem's archive in a stage home
(
install_stagedincrates/socket-patch-core/src/patch/gem_ext.rs). Thatfunction passed the fixed label "its patched gem" to the progress line,
but the refresh calls it in both directions. The refresh already carries
which gem it installs (
Wanted::kind,patchedorupstream) for itsother messages, so the fix hands that to
install_staged. Its one calleris updated. The diff is 7 lines of code plus the test.
CLI_CONTRACT.mddescribes the line as "from<what>", so it needs nochange. The
npm/,pypi/andgem/wrappers don't hold this text.Evidence
patch::gem_refresh::tests::a_native_build_names_the_gem_it_builds(new, covers Hosted gem
rollback/removesays it rebuilds a native gem "from its patched gem" while it installs the upstream build #2152) drives the refresh of an installed native gem througha stand-in Ruby in both directions and reads the progress lines. The
first commit adds it alone, and it fails there:
cargo test -p socket-patch-core --lib gem_: 224 passed.cargo test -p socket-patch-cli --test e2e_redirect_gem_stale_install:58 passed.
cargo clippy -p socket-patch-core --all-targets --all-features -- -D warningsreports nothing in the two files this PR touches. In this sandbox it
reports errors in other files that this PR doesn't change; CI's
clippycheck is the one to trust.
/code-review highfound no bugs and two nits, both fixed in the thirdcommit (the test's second pass could not fail on the swap, and the doc
comments listed only
rollbackandremove).Not covered: no test runs a real native gem through a hosted
rollback.The unit test uses a stand-in Ruby, which is enough for a label.
https://claude.ai/code/session_011f9aeNXZ8oGYWanAWxsCiy
Generated by Claude Code