Skip CA metadata for unscoped remote queries - #179
Merged
girachawda merged 1 commit intoAug 20, 2026
Merged
Conversation
Assisted-By: devx/3250d709-a0a0-4417-8f2f-83669ac9e685
girachawda
force-pushed
the
gc/ca-cli-unscoped-skip-metadata
branch
from
August 19, 2026 17:44
85e6e2d to
1c69ac3
Compare
girachawda
commented
Aug 19, 2026
| end | ||
|
|
||
| spec_tuples = decode_content_addressable_tuples(spec_tuples, latest: specs_type == :latest) | ||
| if args.empty? |
Author
There was a problem hiding this comment.
this matches for the unscoped commands for gem list, search and info
There was a problem hiding this comment.
Pull request overview
Avoids expensive CA metadata requests for unscoped remote gem queries while preserving decoded metadata for scoped queries.
Changes:
- Skips CA tuple decoding when no query arguments are supplied.
- Adds regression coverage for unscoped list, search, and info commands.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
lib/rubygems/query_utils.rb |
Restricts CA metadata decoding to scoped queries. |
test/rubygems/test_gem_commands_search_command.rb |
Tests unscoped search behavior. |
test/rubygems/test_gem_commands_list_command.rb |
Tests unscoped remote list behavior. |
test/rubygems/test_gem_commands_info_command.rb |
Tests unscoped remote info behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
girachawda
merged commit Aug 20, 2026
987191a
into
feature-branch-ca-changes-rubygems
107 checks passed
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
Avoid fetching content-addressable platform/Ruby ABI metadata for unscoped remote query commands.
Unscoped commands now keep using the metadata already available from the compact index
versionsresponse, while scoped commands still fetchinfo/<gem>and show decoded platform/Ruby ABI output.Why
Commands like:
can return every remote gem. If those commands inspect CA platform/Ruby ABI metadata, they can make one
info/<gem>request per CA gem name, which is expensive on a large index.Scoped commands like:
are still bounded by the user's query, so they continue to fetch and display the decoded CA metadata.
Tophat
Instructions
Output: