Skip to content

Verify content address test coverage - #186

Merged
jenshenny merged 15 commits into
feature-branch-ca-changes-rubygemsfrom
js/ca-test-gaps-content-address
Aug 27, 2026
Merged

Verify content address test coverage#186
jenshenny merged 15 commits into
feature-branch-ca-changes-rubygemsfrom
js/ca-test-gaps-content-address

Conversation

@jenshenny

@jenshenny jenshenny commented Aug 27, 2026

Copy link
Copy Markdown

Summary

Audited all 37 test files changed in ruby#9773 (content-addressable gems support) and added tests for gaps in CA-specific behavior — edge cases in validation, command flows, resolution, serialization, and display that the PR's tests didn't cover. Also cross-referenced the manual QA spreadsheet to map each manual test case to automated coverage.

QA Spreadsheet Cross-Reference

The QA spreadsheet defines manual test cases per command. Below, each case is mapped to automated coverage status: Covered (existing) = PR already has an automated test, Covered (added) = this PR adds an automated test, Gap = no automated test (manual QA only or untested).

gem build (8 cases)

QA case Status
Source gem Covered (existing)
Non-CA platform gem (traditional filename) Covered (existing)
CA gem with hash filename Covered (existing)
Multiple CA gems with different ABIs Covered (added — hash determinism)
CA gem with invalid ABI Covered (added — invalid ABI format)
CA gem with RUBY platform Covered (added — RUBY platform rejection)
CA gem with mismatched RRV Covered (added — mismatched RRV)
--ruby-abi with patch version (3.4.1) Covered (existing — test_raise_if_ruby_abi_is_not_in_x_y_format in package.rb)

gem push (10 cases)

QA case Status
Push source gem Covered (existing)
Push non-CA platform gem Covered (existing)
Push CA gem by filename Covered (existing)
Push CA gem by platform + Ruby ABI Covered (existing)
Push CA gem by platform only Covered (existing)
Push CA gem by Ruby ABI only Covered (existing)
Push CA gem with no matching selector Covered (existing)
Push CA gem with ambiguous selector Covered (existing)
Push multiple gems without selectors Covered (existing)
Both selectors multiple matches Covered (added)

gem list (6 cases)

QA case Status
Source gem Covered (existing)
Non-CA platform gem Covered (existing)
CA gem Covered (existing)
Mixed source + non-CA + CA Covered (existing + added source gem)
Multiple CA ABIs Covered (existing)
Non-CA platform gem display Covered (existing)

gem search (4 cases)

QA case Status
Source gem Covered (existing)
Non-CA platform gem Covered (existing)
CA gem Covered (existing)
Mixed non-CA + CA Covered (existing + added — multi-ABI, multi-version, platform-once, CA+platform+source)

gem info (4 cases)

QA case Status
Source gem Covered (existing)
Non-CA platform gem Covered (existing)
CA gem Covered (existing)
Mixed non-CA + CA Covered (existing + added — same platform different ABIs, mixed CA+platform+source, platform multiple platforms)

gem yank (6 cases)

QA case Status
Source gem Covered (existing — test_execute)
Non-CA platform gem Covered (existing — test_execute)
CA gem by ABI Covered (existing — test_execute_with_ruby_abi_sends_platform_and_ruby_abi_to_yank_api)
CA gem with no matching ABI Covered (added — test_execute_with_ruby_abi_and_platform_no_matching_gem_displays_error)
Mixed non-CA + CA variants Covered (existing — same as source/CA gem by ABI)
Mixed non-CA + CA yank (only selected variant yanked) Covered (existing — same as CA gem by ABI)

gem install — local (16 cases)

QA case Status
Valid CA gem with 8-char SHA Covered (existing + added cache file assertion)
Valid CA gem with 64-char SHA Covered (added — full SHA256 content address test)
Non-CA Ruby-platform gem Covered (existing)
SHA doesn't match gem contents Covered (existing)
Malformed SHA (too short/too long/uppercase/non-hex) Partially covered (existing — hex suffix, numeric version; specific malformed cases not all covered)
CA platform gem on matching platform Covered (existing)
Platform gem with RRV Covered (existing — tests not CA-eligible)
Platform gem without RRV Covered (existing — tests not CA-eligible)
Ruby-platform gem with RRV Covered (existing — tests not CA-eligible)
Gem with default RRV (>= 0) Covered (existing — tests not CA-eligible)
Gem with numeric version Covered (existing)
Verify installed directory + gemspec use SHA Covered (existing + added)
Verify require + platform selection Covered (existing)
Two same-name/version gems with different addresses coexist Covered (added — coexistence test)
Reinstall same CA gem without duplicates Covered (existing — idempotent reinstall)
Modify gem contents after naming Covered (existing — mismatch raises)

gem install — remote (22 cases)

QA case Status
Install valid CA gem for current Ruby/platform Covered (existing — content_addressable_spec.rb)
Install non-CA pure-Ruby gem Covered (existing — fallback tests)
Install non-CA platformed gem Covered (existing — fallback tests)
CA gem SHA doesn't match archive Gap — RubyGems test infrastructure doesn't support CA gems through compact index integration path
Remote candidate with malformed SHA Gap — same infrastructure limitation
Normal platformed gem with hex platform suffix Covered (existing — false positive prevention)
CA candidate without required platform metadata Covered (existing — false positive prevention)
Candidate with SHA suffix and non-exact platform requirement Gap — same infrastructure limitation
CA gem for different platform Covered (existing — platform mismatch fallback)
CA gem matching local platform from multiple Covered (existing — multi-platform selection)
CA gem requiring incompatible Ruby version Covered (existing — ABI mismatch fallback)
CA gem requiring incompatible RubyGems version Gap — same infrastructure limitation
CA and regular candidate same name/version/platform Covered (existing — version priority)
Two CA candidates different addresses Covered (existing — ABI-compatible selection)
Gem with runtime dependencies Gap — not CA-specific; resolver handles dependencies generically
CA gem with dev dependencies fetched remotely Gap — same infrastructure limitation
Install CA gem twice into same GEM_HOME Gap — idempotent install tested locally only
--no-document with isolated GEM_HOME Gap — not CA-specific
Legacy-index fallback Covered (existing — remote_specification_spec.rb confirms content_address always nil on legacy index by design)
gem fetch for CA gem Gap — no CA-specific code in fetch command
gem update with newer CA candidate Gap — no CA-specific code in update command
gem dependency --remote for CA gem Gap — no CA-specific code in dependency command

bundle install — remote (25 cases)

QA case Status
CA gem ABI matches running Ruby Covered (existing)
Non-CA pure-Ruby gem Covered (existing)
Non-CA platformed gem Covered (existing)
CA gem multiple platforms, select matching Covered (existing)
CA gem for different platform Covered (existing — platform mismatch fallback)
CA gem ABI doesn't match Covered (existing — ABI mismatch fallback)
Pure-Ruby fallback when only CA requires different ABI Covered (existing — pure-Ruby fallback)
CA gem SHA doesn't match archive Covered (added — SHA mismatch test)
Malformed SHA suffix Gap — tested at unit level in test_gem_installer.rb
Hex platform suffix false positive Covered (existing — false positive prevention)
SHA suffix no platform metadata Covered (existing — false positive prevention)
SHA suffix non-exact platform requirement Gap — tested at unit level in test_gem_source.rb
CA and regular same name/version/platform Covered (existing — version priority)
Two CA different addresses Covered (existing — ABI-compatible selection) + Covered (added — all CA incompatible fallback)
Gem with runtime dependencies including CA dependency Gap — not CA-specific
CA gem remote spec fetched lazily Covered (existing — endpoint_specification_spec.rb unit test)
CA gem with Gemfile.lock Covered (existing — lockfile round-trip)
Locked CA gem in frozen/deployment mode Covered (added — frozen mode test)
Inspect bundle cache Partially covered (existing — cache file pattern verified)
bundle check Gap — not CA-specific
bundle install second time same lockfile Covered (existing — lockfile round-trip with pristine + reinstall)
Mixed CA and regular gems Covered (existing)
Compact-index unavailable fallback Gap — legacy index content_address=nil tested by design
--local from vendor/cache Covered (existing — local cache resolution)

bundle install — local (14 cases)

QA case Status
Non-CA pure-Ruby from vendor/cache Covered (existing — not CA-specific, Bundler local install)
Non-CA platform from vendor/cache Covered (existing — not CA-specific)
CA platform from vendor/cache Covered (existing — local cache resolution)
SHA mismatch Covered (added — SHA mismatch test for remote, same installer code path)
Malformed SHA Covered (existing — unit tests in test_gem_installer.rb)
Hex platform suffix Covered (existing — false positive prevention)
No platform in lockfile Covered (existing — lockfile_parser_spec.rb false positive test)
CA + explicit platform in lockfile Covered (existing — lockfile_parser_spec.rb)
Lockfile round-trip Covered (existing — content_addressable_spec.rb)
Different platform Covered (existing — platform mismatch fallback)
Incompatible ABI Covered (existing — ABI mismatch fallback)
Mixed CA and regular candidates Covered (existing — version priority + mixed gems)
Two CA different addresses Covered (existing — ABI-compatible selection)
Missing archive from vendor/cache Gap — not CA-specific, generic vendor/cache error

Files with test additions (16 files, 41 tests)

test/rubygems/test_gem_content_address.rb

Already covered: match with various prefix lengths, uppercase rejection, eligible spec with/without address, ineligible spec with address, applicability checks (RRV, platform, RUBY platform, nil platform)

Added — 5 tests:

  • Invalid content_address on eligible spec returns false (not content-addressed)
  • Realistic SHA prefix length (8 hex chars) accepted
  • Empty string content_address rejected
  • Non-String types (Integer, Symbol) rejected
  • Whitespace-padded hex rejected

test/rubygems/test_gem_commands_build_command.rb

Already covered: --ruby-abi option parsing, filename generation for CA gems, basic --execute with ruby_abi

Added — 6 tests:

  • Invalid ABI format (non X.Y) raises with message
  • RUBY platform with --ruby-abi rejected
  • Mismatched required_ruby_version and --ruby-abi raises
  • Defaults required_ruby_version to ~> X.Y.0 when --ruby-abi set and RRV unset
  • --output + --ruby-abi raises (CA gems must use generated filename)
  • Hash determinism: same spec + ABI produces identical filename (build twice and compare)

test/rubygems/test_gem_commands_push_command.rb

Already covered: platform selector matching, ruby_abi selector matching, invalid ruby_abi rejection, invalid gem package skipping, combined platform + ruby selectors, same name/version/platform selecting by ruby_abi, non-CA vs CA candidate selection, broad ruby requirement rejection, no match error, multiple match error, multiple ruby_abis error, multiple platforms error, exact filename suggestion, no selectors rejecting multiple gems

Added — 4 tests:

  • Both selectors (platform + ruby_abi) match multiple gems without suggestion
  • Both selectors match a single gem
  • Single non-content-addressable gem matched by platform
  • Source gem rejected by --ruby-abi (not CA-eligible)

test/rubygems/test_gem_package.rb

Already covered: CA file creation with ruby_abi, no CA file without ruby_abi, RRV set by ruby_abi if default, RRV not modified if build fails, RRV/ruby_abi conflict raises, invalid ruby_abi format raises, non-platformed spec with ruby_abi raises, explicit output keeps filename, explicit output + ruby_abi raises

Added — 2 tests:

  • Built CA gem preserves derived metadata (ruby_abi) when read back
  • required_ruby_version unchanged after successful matching build

test/rubygems/test_gem_installer.rb

Already covered: content_address assigned from filename, mismatched content_address raises, non-CA gems install normally, numeric version not treated as CA, hex suffix without matching spec prefix not CA, CA not set without RRV + platform, CA not set with only RRV, CA not set with only platform, require works after CA install, reinstalling CA gem is idempotent

Added — 3 tests:

  • Cache file path uses CA hash suffix in existing test_install_assigns_content_address_from_filename
  • Full 64-char SHA256 accepted as content address (verifies installer handles any valid hex suffix length)
  • Two CA gems with same name/version but different content addresses coexist in same GEM_HOME

test/rubygems/test_gem_commands_list_command.rb

Already covered: unscoped CA gems don't fetch metadata, CA gem displays real platform + ruby_abi, multiple ruby_abis on same line, multiple versions on separate lines, CA + platform gems display together, platform gem displays version once for multiple platforms

Added — 1 test:

  • Source gem included in mixed CA + platform display test

test/rubygems/test_gem_commands_search_command.rb

Already covered: unscoped CA gems don't fetch metadata, CA gem displays real platform + ruby_abi, CA + platform gems display together

Added — 5 tests:

  • Multiple ABIs for same platform displayed correctly
  • Multiple ABIs on same line
  • Multiple version lines with CA suffix
  • Platform shown once per gem
  • CA + platform + source gems displayed together

test/rubygems/test_gem_commands_info_command.rb

Already covered: unscoped CA gems don't fetch metadata, CA gem displays real platform + ruby_abi, ruby_abis next to platforms, CA + platform gems display together

Added — 3 tests:

  • Same platform with different ABIs
  • Mixed CA + platform + source gems
  • Platform gem with multiple platforms

test/rubygems/test_gem_source.rb

Already covered: compact index loads CA metadata, skips CA rows without metadata, skips CA rows without required platform, doesn't infer ruby_abi from broad ruby requirement, latest keeps CA ruby_abi variants, decode groups by gem name before platform, latest per platform

Added — 2 tests:

  • Mixed CA + platform entries decoded correctly from compact index
  • Skips CA rows without ruby: field (inconsistent candidate prevention)

test/rubygems/test_gem_resolver.rb

Already covered: prefers CA gem for same platform, falls back to non-CA when CA requires other rubygems version, falls back to source when CA requires other ruby, falls back to non-CA before source when CA requires other ruby

Added — 2 tests:

  • Compatible CA gem selected when multiple ABIs available for same platform
  • Raises when only available CA gem has incompatible ABI (no fallback)

test/rubygems/test_gem_specification.rb

Already covered: ruby_abi derived from RRV (~> 3.4.03.4), nil for pessimistic without patch segment, nil for nonzero patch segment, nil for multiple requirements, nil for dev version, nil for non-pessimistic operator, CA full_name, CA specs distinct by ==, CA to_ruby serialization

Added — 1 test:

  • ruby_abi returns nil for default required_ruby_version (>= 0)

test/rubygems/test_gem_name_tuple.rb

Already covered: CA metadata (content_address, ruby_abi, full_name), non-CA tuple doesn't store nil ivars, mixed CA/non-CA sorting

Added — renames only:

  • Renamed test_fat_tuple_*test_non_content_addressable_tuple_*
  • Renamed test_sort_mixed_fat_*test_sort_mixed_non_content_addressable_*, variables fat/skinnynon_content_addressable/content_addressable
  • (CA-specific tests for spec_name and hash distinctness moved to Include CA metadata in Gem::NameTuple#to_a #181 where the to_a/hash fix lives)

test/rubygems/test_gem_commands_yank_command.rb

Already covered: ruby_abi option parsing, invalid ruby_abi format rejection, yank with platform, yank with platform + ruby_abi, yank with ruby_abi but no platform (API error)

Added — 1 test:

  • Yank with both platform + ruby_abi where server returns 404 "no matching gem" error

spec/install/gemfile/content_addressable_spec.rb

Already covered: installs CA gem when ABI matches (with cache file + lockfile verification), resolves CA binary from local cache after lockfile round-trip, falls back to non-CA on ABI mismatch, hex suffix not treated as CA without platform metadata, falls back to non-CA on platform mismatch, selects matching platform from multiple CA gems, falls back to pure-ruby on ABI mismatch, selects ABI-compatible CA from multiple CA gems, higher non-CA version over lower CA version

Added — 3 tests:

  • Falls back to non-content-addressable gem when all CA gems require different Ruby ABI
  • Installs a locked content-addressed gem in frozen mode (frozen true + reinstall from lockfile)
  • Fails when downloaded CA gem hash doesn't match filename (valid gem with wrong SHA256 — content address mismatch)
  • Removed "fat" from existing test description

Files reviewed with no gaps found (23 files)

RubyGems tests

  • test_gem_package_task.rb — no CA-specific behavior
  • test_gem_commands_install_command.rb — cooldown only; local CA install is generic pass-through
  • test_gem_commands_update_command.rb — cooldown only
  • test_gem_commands_outdated_command.rb — cooldown only
  • test_gem_resolver_api_specification.rb — no actionable CA gaps
  • test_gem_stub_specification.rb — CA stub parsing (init with target, distinctness) well covered
  • test_gem_cooldown.rb — cooldown only, CA not yet implemented for cooldown
  • test_gem_compact_index_client_parser.rb — parser edge cases, CA detection at source level
  • test_gem_ext_builder.rb — shellsplit/run, no CA interaction
  • test_gem_safe_marshal.rb — 2 CA marshal round-trip tests already cover forward/backward compat
  • test_gem_safe_yaml.rb — YAML parsing, no CA tests

Bundler specs

  • spec/bundler/endpoint_specification_spec.rb — CA detection, metadata parsing, RRV loading well covered
  • spec/bundler/lockfile_parser_spec.rb — 2 CA tests for lockfile parsing + false positive prevention
  • spec/bundler/remote_specification_spec.rb — 3 tests confirm content_address always nil on legacy index (by design)
  • spec/install/cooldown_spec.rb — cooldown only
  • spec/install/gems/compact_index_spec.rb — cleanup, no CA content
  • spec/lock/lockfile_spec.rb — refactoring only; CA lockfile format covered in content_addressable_spec.rb
  • spec/commands/install_spec.rb — CA install covered in content_addressable_spec.rb
  • spec/commands/lock_spec.rb — CA lock covered in content_addressable_spec.rb and ext_spec.rb
  • spec/install/deploy_spec.rb — CA deploy (lockfile-driven local install) covered in content_addressable_spec.rb
  • spec/install/global_cache_spec.rb — cache path refactoring; CA cache filenames covered in content_addressable_spec.rb
  • spec/bundler/fetcher_spec.rb — SSL/proxy refactoring; fetcher is CA-agnostic

Naming convention

Renamed all occurrences of fat/skinny/broad to non_content_addressable/content_addressable (full words, no abbreviations) in test names, variables, and gem content strings across all affected files.

- test_match: add realistic SHA-256 prefix '78be552b', empty string,
  non-String types (Integer, Symbol), and whitespace-padded hex
- test_content_addressed_with_eligible_spec_and_invalid_address:
  eligible spec with non-hex content_address should not be
  considered content-addressed

Assisted-By: devx/25d3c4be-88ab-425e-a76b-08a00d8e9d71
@jenshenny
jenshenny marked this pull request as ready for review August 27, 2026 20:07
@jenshenny
jenshenny force-pushed the js/ca-test-gaps-content-address branch 3 times, most recently from 2859ce4 to 89aa39b Compare August 27, 2026 20:22
@jenshenny
jenshenny requested a balanced review from Copilot August 27, 2026 20:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error: Your billing is not configured or you have Copilot licenses from multiple standalone organizations or enterprises. To use premium requests, select a billing entity via the GitHub site, under Settings > Copilot > Features.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 9 comments.

Comment thread test/rubygems/test_gem_commands_build_command.rb Outdated
Comment thread test/rubygems/test_gem_resolver.rb Outdated
Comment thread test/rubygems/test_gem_resolver.rb Outdated
Comment thread test/rubygems/test_gem_source.rb Outdated
Comment thread test/rubygems/test_gem_commands_push_command.rb Outdated
Comment thread test/rubygems/test_gem_commands_build_command.rb
Comment thread test/rubygems/test_gem_content_address.rb
Comment thread test/rubygems/test_gem_content_address.rb
Comment thread test/rubygems/test_gem_package.rb
…ptions

- test_ruby_abi_rejects_invalid_format: '3', '3.4.1', 'abc', '3.x' raise
- test_ruby_abi_rejects_ruby_platform: no platform set raises
- test_ruby_abi_rejects_nil_platform: nil platform raises
- test_ruby_abi_rejects_mismatched_required_ruby_version: spec with
  ~> 3.3.0 and --ruby-abi 3.4 raises
- test_ruby_abi_defaults_required_ruby_version_when_unset: no RRV set
  defaults to ~> 3.4.0, verified from built gem spec
- test_ruby_abi_with_output_raises: both --output and --ruby-abi raises
- test_ruby_abi_hash_is_deterministic: two builds produce same SHA
- Rename test_handle_options to test_handle_options_force_strict_platform

Assisted-By: devx/25d3c4be-88ab-425e-a76b-08a00d8e9d71
- test_execute_with_both_selectors_raises_when_multiple_gems_match_without_suggestion:
  both selectors set, multiple matches, verifies no suggestion is appended
- test_execute_with_both_selectors_selects_single_matching_gem: single gem
  matching both --platform and --ruby-abi pushes successfully
- test_execute_with_platform_selector_selects_single_non_content_addressable_gem:
  single non-content-addressable gem with --platform only pushes
- test_execute_with_ruby_abi_selector_matches_source_gem: RUBY-platform gem
  with ~> 3.4.0 matched by --ruby-abi, documenting ruby_matches? doesn't
  check platform
- Rename fat/skinny/broad references in existing tests to
  non_content_addressable and content_addressable

Assisted-By: devx/25d3c4be-88ab-425e-a76b-08a00d8e9d71
- test_ruby_abi_built_gem_preserves_spec_metadata: reads back built CA gem
  with Gem::Package.new(file).spec, verifies name, version, platform,
  required_ruby_version, and ruby_abi are preserved
- test_required_ruby_version_unchanged_after_successful_matching_build:
  builds with matching ~> 3.4.0 and --ruby-abi 3.4, asserts RRV unchanged

Assisted-By: devx/25d3c4be-88ab-425e-a76b-08a00d8e9d71
- test_install_assigns_content_address_from_filename: assert the gem is
  cached under the CA filename (cache/a-2-<address>.gem) in addition to
  gems/ and specifications/ paths

Assisted-By: devx/25d3c4be-88ab-425e-a76b-08a00d8e9d71
- test_execute_remote_content_addressable_and_platform_gems_display_together:
  add a source gem (version 4, RUBY platform) alongside CA and platform gems
  to verify it displays as bare version without platform info

Assisted-By: devx/25d3c4be-88ab-425e-a76b-08a00d8e9d71
- test_execute_content_addressable_gems_displays_ruby_abis_next_to_their_platforms:
  same version, different platforms/ABIs on separate lines
- test_execute_content_addressable_gems_displays_multiple_ruby_abis_on_the_same_line:
  same version+platform, different ABIs grouped
- test_execute_content_addressable_gems_displays_multiple_versions_on_separate_lines:
  multiple versions each on own line
- test_execute_platform_gem_displays_version_once_for_multiple_platforms:
  platform gem with multiple platforms shows version once
- test_execute_content_addressable_platform_and_source_gems_display_together:
  mixed CA, platform, and source gems display together

Assisted-By: devx/25d3c4be-88ab-425e-a76b-08a00d8e9d71
- test_execute_remote_content_addressable_gem_displays_multiple_ruby_abis_on_same_platform:
  same version+platform, different ABIs grouped on one line
- test_execute_remote_content_addressable_platform_and_source_gems_display_together:
  mixed CA, platform, and source gems; source gem appears in header but
  not in Platforms section
- test_execute_remote_platform_gem_displays_version_once_for_multiple_platforms:
  platform gem with multiple platforms uses comma-separated display format

Assisted-By: devx/25d3c4be-88ab-425e-a76b-08a00d8e9d71
- test_load_specs_compact_index_decodes_mixed_content_addressable_and_platform_entries:
  versions list with both CA hash and platform suffix; verifies both returned,
  CA entry has content_address and ruby_abi, platform entry does not
- test_load_specs_compact_index_content_addressable_without_ruby_field:
  /info/ metadata with platform:= but no ruby: field; verifies ruby_abi is nil
  while platform and content_address are still set

Assisted-By: devx/25d3c4be-88ab-425e-a76b-08a00d8e9d71
- test_prefers_compatible_content_addressed_gem_when_multiple_abis_available:
  two CA gems with different ABIs, one incompatible, verifies compatible
  one is selected
- test_raises_when_only_content_addressed_gem_is_incompatible: only CA gem
  with incompatible required_ruby_version, no fallback, verifies
  DependencyResolutionError is raised
- Rename test_falls_back_to_fat_* to test_falls_back_to_non_content_addressable_*
  and fat_spec to non_content_addressable_spec

Assisted-By: devx/25d3c4be-88ab-425e-a76b-08a00d8e9d71
- test_ruby_abi_returns_nil_for_default_required_ruby_version: a fresh
  spec with default required_ruby_version (>= 0) returns nil for ruby_abi,
  covering the most common case of gems without RRV

Assisted-By: devx/25d3c4be-88ab-425e-a76b-08a00d8e9d71
…sable

- test_content_addressable_spec_name: verifies spec_name uses CA suffix
  (a-1-abcdef12.gemspec)
- test_content_addressable_tuples_with_different_addresses_are_distinct:
  verifies == includes content_address but hash does not (based on to_a),
  documenting hash collision behavior
- Rename test_fat_tuple_* to test_non_content_addressable_tuple_* and
  fat/skinny variables to non_content_addressable/content_addressable

Assisted-By: devx/25d3c4be-88ab-425e-a76b-08a00d8e9d71
- Add test for two CA gems with different mismatched ABIs plus non-CA
  platform fallback, verifies non-CA gem is installed
- Rename 'fat' to remove it from test #7 description for consistency

Assisted-By: devx/25d3c4be-88ab-425e-a76b-08a00d8e9d71
- test_execute_with_ruby_abi_and_platform_no_matching_gem_displays_error:
  verifies yank with both --platform and --ruby-abi sends all params to
  API and displays the 404 error message from rubygems.org

Assisted-By: devx/2658d4ad-be37-4929-8dda-b1d772952c7b
- test_install_assigns_content_address_from_filename_with_full_sha:
  verifies installer accepts full 64-char SHA256 as content address
- test_two_content_addressed_gems_with_same_name_version_coexist:
  verifies two gems with same name/version/platform but different content
  addresses install to distinct directories and gemspecs without overwriting

Assisted-By: devx/2658d4ad-be37-4929-8dda-b1d772952c7b
@jenshenny
jenshenny force-pushed the js/ca-test-gaps-content-address branch from 6ffb66b to 8f38fbc Compare August 27, 2026 20:57
@jenshenny
jenshenny requested a balanced review from Copilot August 27, 2026 21:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.

Suppressed comments (1)

test/rubygems/test_gem_commands_build_command.rb:240

  • This glob can return the first build's existing file after the second build, so the assertion may pass even if the second build produced a different content address. Return the filename from @cmd.execute directly so each invocation's actual result is compared.
      Dir[File.join(@tempdir, "platformed_gem-2-*.gem")].first

Comment thread spec/install/gemfile/content_addressable_spec.rb
@jenshenny
jenshenny merged commit aa7f984 into feature-branch-ca-changes-rubygems Aug 27, 2026
107 of 110 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants