Add zstd and conda archive inspection - #164
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR expands brief inspect archive support by updating the github.com/git-pkgs/archives dependency and adding inspection/preflight coverage for zstd-compressed tar archives plus conda v2 (.conda) packages, along with corresponding documentation updates.
Changes:
- Add zstd-compressed tar preflight handling and recognize zstd as an inspectable archive format.
- Add
.condahandling in archive opening (using filename to select nested reader) with fallback to physical format. - Add tests covering zstd tar auto-inspection, conda command output, and zstd preflight entry limits; update README supported formats.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| README.md | Updates supported-format documentation to include zstd and conda packages. |
| go.mod | Bumps github.com/git-pkgs/archives to v0.6.0 and adds github.com/klauspost/compress for zstd support. |
| go.sum | Updates module checksums for the dependency changes. |
| cmd/brief/inspect.go | Adds zstd tar preflight support, .conda nested-archive opening behavior, and treats zstd as an archive format. |
| cmd/brief/inspect_test.go | Adds fixtures/tests for zstd tar inspection, conda v2 inspection via command execution, and zstd preflight entry limiting. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+188
to
+191
| out, err := cmd.Output() | ||
| if err != nil { | ||
| t.Fatalf("inspect command failed: %v", err) | ||
| } |
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.
Updates archives to v0.6.0 and adds archive inspection for zstd-compressed tar files and conda v2 packages. Conda inspection reads the merged package and metadata payloads while preserving content-based format checks and archive resource limits.
Adds command-level and archive-path coverage for both formats, and updates the supported-format documentation.