feat(archives): add bzip2 interoperability - #2265
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | eb61d8d | Commit Preview URL Branch Preview URL |
Aug 06 2026, 01:35 AM |
chaliy
force-pushed
the
codex/tar-bzip2
branch
2 times, most recently
from
August 6, 2026 01:16
62a0611 to
8652318
Compare
chaliy
added a commit
that referenced
this pull request
Aug 6, 2026
#2264 moved `ctx.execution_budget()` behind `ExecutionCapability`, and #2265 added bzip2 call sites against the old `Option<&ExecutionBudget>` shape. Each was green against its own base; together they don't compile, so `main` is broken. Decompression meters the budget incrementally as it streams, so it needs the budget itself rather than a consume/lease call. `with_budget` gives it one for the duration of a closure, alongside the existing consume/lease helpers, so the borrow stays inside a checked scope and a revoked execution reports `Cancelled` instead of handing out a live reference. The stdout lease site folds into the `lease_budget_bytes` helper that already existed. Bundled here rather than split out because it blocks this branch's CI.
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 changed
Adds GNU-compatible bzip2 archive interoperability.
tarnow creates, lists,and extracts bzip2 archives through
j, old-style/clustered flags, and--bzip2, including stdin/stdout and.tar.bz2/.tbz2workflows. Addsbyte-native
bzip2,bunzip2, andbzcatcommands with compatible file andpipeline behavior.
Compressed input and output are covered by request budgets, pre-growth memory
charging, expansion-ratio limits, archive/file quotas, traversal checks, and
closed failure handling for truncation, corruption, and CRC errors.
Why
Bashkit tar could only interoperate with plain and gzip archives, leaving common
GNU tar bzip2 workflows and standalone bzip2 pipelines unsupported.
Before / After
Before:
After (end-to-end Bashkit CLI smoke):
System
tar/bzip2differential tests verify both directions.Risk
Existing tar/gzip behavior remains covered; new bomb, corruption, traversal,
quota, memory, and cross-tool tests exercise the added path.
Checklist
Validation:
just pre-pr, WASM no-default-feature check, cargo-deny license andadvisory checks, archive benchmark, and CLI smoke test all pass.