You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ff4ced8
Browse filesBrowse the repository at this point in the historyBrowse files
* Start fix for #1092
Assisted-by: Claude Code:claude-opus-5-5
* Patch and check every installed build of a gem
A gem home can hold both builds of one gem version, such as
ffi-1.17.2/ and ffi-1.17.2-x86_64-linux-gnu/. RubyGems and Bundler
load the platform build, but agent-mode apply, rollback, apply --check
and vex only ever looked at the plain dir. So apply patched a copy
nothing loads, and vex attested not_affected while the loaded copy
stayed vulnerable. Global mode (-g) had the same gap.
The gem crawler now returns every verifying build of a version in a
gem home (plain dir first, then each platform dir in name order), and
the dispatch maps feed all of them to the commands that already act on
every copy. A platform dir must parse back to the same gem name and
version, so foo-1.0-2.0/ (the gem foo-1.0 at 2.0) is never taken as a
build of foo 1.0.
When builds sit side by side, a build whose bytes match none of the
patch's variants is a different distribution rather than a locally
edited copy. Apply leaves it untouched and fails, instead of
overwriting it with another build's bytes.
Fixes#1092
Assisted-by: Claude Code:claude-opus-5-5
* Match each gem build to its own patch variant
Now that every build of a gem version in one gem home is a copy, a
manifest with a separate record per build (?platform=ruby for
x-1.0/, ?platform=x86_64-linux for x-1.0-x86_64-linux/) must be
judged build by build:
- rollback picked a variant from the first copy and rolled it back on
every copy, failing on the other build and dropping its record. It
now picks variants per copy, and skips a build that holds none of
them when a sibling build does (nothing was ever written there).
- vex judged each variant against every build, so two correctly
patched builds were never attested. Each qualified variant now gets
only the builds holding its distribution; a build holding none
stays on every key, so the statement is still withheld.
Also from review: the build-sibling apply gate is gem-only (PyPI
site-packages dirs can share a parent), the gem home is listed once
per lookup instead of once per patch, a dotted platform such as
universal-java-1.8 is still recognised, and the contract no longer
lists vex as a single-copy consumer.
Assisted-by: Claude Code:claude-opus-5-5
* Satisfy clippy in per-copy rollback narrowing
Assisted-by: Claude Code:claude-opus-5-5
---------
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments