Repository navigation
Read activestorage's own block in the hosted gem leg - #1946
Conversation
Production now publishes patches for activestorage's dependencies (actionpack, activesupport 6.0.3), so the hosted Gemfile rewrite can hold several patch-registry blocks. wired_gem_registry_uuid took the first one, so the leg checked actionpack's UUID against GEM_UUIDS and failed with a misleading "extend GEM_UUIDS" message whenever a transitive block came first or activestorage was not wired at all (hosted-e2e, 2026-11-01, runs 41330638545 and 41330161127). Match the block whose body declares gem "activestorage". When activestorage is not wired, the leg now says so instead of naming a neighbour's patch. Add a unit test for the parser. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011f9aeRg9Pkq38o8d4ttAvb
|
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 75b6f65. Configure here.
|
[burn-down agent] Labeled Ready for review at 75b6f65.
Generated by Claude Code |
Final review briefWhat it does. Test-only fix for the Risk: low. One test file. No CLI or product code. The new unit test runs on every PR. Look here
Verified
Changes I made: none. Open questions: none. Auto-merge is armed, so approving sends this PR straight to the merge queue. Generated by Claude Code |
Wenxin Jiang (Wenxin-Jiang)
left a comment
There was a problem hiding this comment.
[agent] Reviewed 75b6f65395b0db0f97635da7f4e3ebbff41db6fc. Checked named-gem block selection, UUID extraction, missing-target and prefix regressions. No major correctness issues found. Validation: source and regression-test review plus the available exact-head CI checks; no local test pass is claimed.
Problem
hosted-e2eis required throughci-ok. Since about 17:12 UTC on 2026-11-01 it has failed on every non-draft PR. Examples: 41330638545 and 41330161127, each red on 2 attempts with 3 internal retries. Tracking issue: #1945.There are two causes, both on the production side:
HOSTED_E2E_DISABLED. This PR does not fix it.actionpackandactivesupport6.0.3, which are dependencies ofactivestorage. The hosted Gemfile therefore holds several patch-registry blocks.wired_gem_registry_uuidread the first block, so the leg checked actionpack's patch (f86d5caa…) againstGEM_UUIDS. It then failed with a misleading "verify the new patch and extend GEM_UUIDS" message. In some retries the leg passed, depending on which block came first.Root cause
The test parser assumed the Gemfile holds exactly one Socket source block.
Fix
wired_gem_registry_uuid(gemfile, name)now returns the UUID only from the block whose body declaresgem "<name>". Ifactivestorageis not wired at all, which is what the failing tries show, the leg now fails with "the hosted scan did not redirect activestorage itself". It no longer blames a neighbour's patch. A new non-ignored unit test,wired_gem_registry_uuid_reads_the_named_gems_block, covers:activestorageNo assertion was weakened, and no test was removed or moved.
Proof
cargo test -p socket-patch-cli --test e2e_hosted_production wired_gempasses.rustfmtwas run on the touched file only.Generated by Claude Code
Note
Low Risk
Test-only changes to hosted e2e Gemfile parsing; no runtime CLI or redirect behavior is modified.
Overview
Fixes flaky/misleading failures in the hosted production gem e2e leg after production started wiring patch-registry blocks for
activestoragetransitive gems (actionpack,activesupport).wired_gem_registry_uuidnow takes a gem name and scans each Socketsource … doblock until it finds one whose body declaresgem "<name>", then reads that block’s patch UUID. It no longer returns the first registry block, which could belong to a dependency and be checked againstGEM_UUIDSforactivestorage.The gem install proof calls the helper with
GEM_NAMEand uses a clearer panic whenactivestorageitself was never redirected. A new unit test covers block ordering, unwiredactivestoragebeside wired transitives, and non-prefix gem name matching.Reviewed by Cursor Bugbot for commit 75b6f65. Configure here.
Generated by Claude Code