test(hosted): retire the gem catalog pin — production unpublished its last free gem patch (activestorage@7.0.2.2) - #199
Open
Mikola Lysenko (mikolalysenko) wants to merge 1 commit into
Conversation
… last free gem patch Production withdrew pkg:gem/activestorage@7.0.2.2 (uuid 2535d43d-67ce-4944-be27-c19e113997fb, GHSA-w749-p3v6-hccq) — the only free-tier gem patch it ever published. /patch/view/<uuid> now 404s (the npm pin's still 200s) and a version-less probe of every gem name in ruby-advisory-db (464 packages) returns zero free patches, so there is no honest replacement pin: the preflight's "pick a replacement" instruction has nothing to pick. Gem therefore joins the suite's existing pattern for patch-less ecosystems (maven / nuget / composer): * drop the GEM_* catalog entries from the preflight and the merge-state canary (npm / PyPI / cargo remain); * add gem to UNPUBLISHED_ECOSYSTEMS — first candidate is the withdrawn pin itself — so canary_unpublished_ecosystems reports the moment production republishes a gem patch; * retire gem_bundler_hosted_redirect_and_known_install_defect and its gem-only helpers (gem_lock_checksum, installed_gem_dir, gem_registry_base, http_probe, published_patch_files): with no published patch neither its known-defect arm nor its success arm can execute. Restoration recipe is in docs/testing/hosted-production-e2e.md; the rewrite grammar stays covered by e2e_redirect_gem_build.rs against a mock; * ci: drop the hosted-e2e job's now-unneeded ruby/setup-ruby step; * docs: catalog + coverage tables updated, retired-leg section added, the compact-index server-defect entry kept for the record, and the SOCKET_PATCH_HOSTED_E2E_GEM_STRICT knob removed with the leg. Verified live against production: 15 passed / 0 failed (the three previously-broken tests pass; every install-proof leg stays green). NOTE: e2e_gem.rs's pkg:gem/activestorage@5.2.0 pin (4bf7fe0b-dc57-4ea8-945f-bc4a04c47a15) and e2e_vendored_production.rs's pin of the same 7.0.2.2 patch are ALSO unpublished — separate follow-up; neither suite is in CI. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What production unpublished
The free-tier gem patch this suite pinned —
pkg:gem/activestorage@7.0.2.2,uuid
2535d43d-67ce-4944-be27-c19e113997fb(GHSA-w749-p3v6-hccq) — is gonefrom production: the versioned and version-less
/patch/by-packageprobes bothreturn
{"patches": []}and/patch/view/2535d43d-…now 404s (while thenpm pin's
/patch/viewstill 200s, so it is a real unpublish, not an APIchange). That broke three tests on every branch:
preflight_required_patches_are_publishedcanary_patches_name_advisories_so_merge_state_is_inferablegem_bundler_hosted_redirect_and_known_install_defect(0 redirects)Why nothing replaced it: there is no free gem patch left to pin
The preflight's instruction is "pick a replacement", but a replacement has to
exist. It does not:
against
patches-api.socket.dev/patch/by-package— zero free patches;pkg:npm/minimist→ 7 patches,pkg:pypi/urllib3→ 71,pkg:cargo/traitobject→ 4,pkg:npm/lodash→ 48 (alltier: "free"), so the route works and the gememptiness is real;
pkg:gem/activestorage@7.0.2.2?platform=ruby(the qualified form) alsoreturns nothing.
activestorage@7.0.2.2 was the only free gem patch production ever
published (see #141's catalog); withdrawing it emptied the ecosystem.
What this PR does instead: gem joins the unpublished-ecosystems canary
The suite already has an honest pattern for exactly this state — maven, nuget
and composer implement hosted mode but have no free patches, and
canary_unpublished_ecosystemsprobes them every run so coverage can be addedthe moment one lights up. Gem now follows it:
GEM_*constants removed; preflight and the merge-state canarynow cover npm / PyPI / cargo;
UNPUBLISHED_ECOSYSTEMSgains agementry whose firstcandidate is the withdrawn pin itself (
pkg:gem/activestorage, plusrails-html-sanitizer / nokogiri / rack), so the canary reports the most
likely republish fastest;
gem_bundler_hosted_redirect_and_known_install_defectand itshelpers (
gem_lock_checksum,installed_gem_dir,gem_registry_base,http_probe,published_patch_files) are retired — with no published patchneither its known-defect arm nor its success arm can execute (
scan --mode hostedredirects 0 and every assertion is unreachable). They live in thisPR's deletion diff for restoration; the docs say exactly what to resurrect.
The gem hosted rewrite grammar stays covered by
e2e_redirect_gem_build.rsagainst a mock;
ruby/setup-rubystep is removed (nothing inthe suite needs ruby now), with a comment pointing at the restoration path;
docs/testing/hosted-production-e2e.md— catalog table, coveragetable, a "retired bundler leg" section with the restoration recipe, the
known-defect entry kept for the record,
SOCKET_PATCH_HOSTED_E2E_GEM_STRICTknob removed with the leg.
The known compact-index server defect (
/info/<gem>missing runtime deps,bundler
APIResponseMismatchError) is still documented; it is believed tostill stand server-side, but nothing free-tier remains to probe it against.
Which arm does the gem leg take now?
Neither — that is the point. Without a published patch the leg cannot reach
either its known-defect arm or its content-verified success arm; coverage is
the canary until production republishes, after which the leg (and its
probe-the-server tolerance) should be restored from this PR's deletion.
activestorage@5.2.0 (e2e_gem.rs) is ALSO unpublished — follow-up needed
pkg:gem/activestorage@5.2.0, uuid4bf7fe0b-dc57-4ea8-945f-bc4a04c47a15,used by the
e2e_gem.rslifecycle tests, is gone too (/patch/view404s, by-package empty). Every gem probe returned empty, so there is no
replacement pin for that suite either. Not fixed here (out of scope, and
e2e_gem is deliberately not in the PR matrix — CI unaffected); it needs the
same treatment as a follow-up. The vendored twin
e2e_vendored_production.rspins the same withdrawn 7.0.2.2 patch (also not in CI) and needs the same
follow-up.
Live verification
cargo test -p socket-patch-cli --features docker-e2e,setup-e2e --test e2e_hosted_production -- --ignored --nocaptureagainst real production, alltoolchains present (macOS; npm/pnpm/yarn/corepack/bun/uv/cargo/go):
The three previously-broken tests pass; every install-proof leg stays green.
(First attempt of the run hit transport flakes on
patches-api.socket.dev—failures said "error sending request", not unpublish — and was rerun per the
suite's own 503/flake policy.)
🤖 Generated with Claude Code
Note
Low Risk
Test and CI documentation changes only; no production CLI or runtime behavior is modified.
Overview
Production withdrew the suite’s only free-tier RubyGems pin (
activestorage@7.0.2.2), leaving zero free gem patches to test against. This PR retires the live bundler hosted e2e leg instead of leaving preflight and install tests red or vacuous.e2e_hosted_production.rsdropsGEM_*catalog constants, gem-only helpers (gem_lock_checksum,installed_gem_dir,gem_registry_base,http_probe,published_patch_files), and the largegem_bundler_hosted_redirect_and_known_install_defecttest. Preflight and advisory canaries now cover npm, PyPI, and Cargo only. Gem is added toUNPUBLISHED_ECOSYSTEMS(withactivestoragefirst among probe candidates) socanary_unpublished_ecosystemscan signal when a free patch returns.CI removes
ruby/setup-rubyfrom thehosted-e2ejob, with a comment to restore bundler ≥ 2.6 when the leg comes back.docs/testing/hosted-production-e2e.mdupdates the patch catalog and coverage tables, documents the retired bundler leg and restoration steps from git history, removesSOCKET_PATCH_HOSTED_E2E_GEM_STRICT, and notes the known compact-index server defect is unprobed until a free gem patch exists again. Mock coverage remains ine2e_redirect_gem_build.rs.Reviewed by Cursor Bugbot for commit a382398. Configure here.