Repository navigation
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e9897f7d-b918-41e0-a2ab-e78d06744edb
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the Ruby compression-default change.
No open issues 🎉
What changed in this PR
Switches the Ruby extractor’s default TRAP compression from gzip to Zstandard while preserving explicit gzip, zstd, and none settings.
Changes:
- Makes the shared compression helper accept a caller-selected default, retaining gzip for QL and unified extractors.
- Updates Ruby’s default and error fallback to Zstandard.
- Adds default-compression test coverage and updates documentation.
| File | Description |
|---|---|
unified/extractor/src/extractor.rs |
Explicitly retains the gzip default. |
shared/tree-sitter-extractor/src/trap.rs |
Accepts a caller-selected default compression. |
ruby/ql/lib/change-notes/2026-12-01-zstd-trap-compression.md |
Announces the new Ruby compression default. |
ruby/ql/integration-tests/compression/test.py |
Tests the default with inherited compression settings cleared. |
ruby/extractor/src/extractor.rs |
Uses Zstandard by default and for configuration-error fallback. |
ruby/codeql-extractor.yml |
Documents Zstandard as the default. |
ql/extractor/src/extractor.rs |
Explicitly retains the gzip default. |
Review effort: Balanced (adaptive)
hvitved
approved these changes
Dec 3, 2026
hvitved
left a comment
Contributor
There was a problem hiding this comment.
LGTM; nice with the reduction in TRAP size. I wonder if we should just switch QL and Unified over now as well?
Contributor
Author
Yes, that makes sense. I'll do that in follow up. |
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.
Use Zstandard instead of gzip as the Ruby extractor's default TRAP compression. This aligns the Rust extractor with the Rust extractor. Explicit
gzip,zstd, andnonesettings remain supported.To this end, the shared compression helper
Compression::from_envnow supports a custom default instead of only defaulting togzip.The DCA report looks good. Trap size is reduced by 40% (not that that's really the goal here).