Fix setup nu extract cap for Nushell 0.114 archives - #101
Conversation
Official Nushell 0.114.1 linux-gnu releases are ~279 MiB uncompressed, so the 256 MiB archive-bomb cap aborted `numan setup nu`. Extract only the `nu` binary (skip bundled plugins) and raise the cap to 512 MiB. Co-authored-by: Anthony Thompson <github@trackdub.com>
|
Warning Review limit reached
Next review available in: 5 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Sorry @tonythethompson, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
PR Summary by QodoFix
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Greptile SummaryThe PR restores
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| src/install/extract.rs | Moves archive-bomb accounting ahead of include filtering and adds regression coverage proving excluded regular files still count toward extraction limits. |
| src/nu/bootstrap.rs | Configures Nushell bootstrap extraction to select only the platform executable under a 512 MiB archive-wide cap and adds archive-layout tests. |
| CHANGELOG.md | Documents the restored Nushell 0.114.x setup behavior, filtered extraction, and archive-wide accounting semantics. |
Reviews (2): Last reviewed commit: "Count all archive entries toward bomb li..." | Re-trigger Greptile
There was a problem hiding this comment.
Pull request overview
This PR fixes numan setup nu failing to install current official Nushell releases (e.g. 0.114.1) due to the archive-bomb uncompressed-size guard tripping on larger upstream bundles.
Changes:
- Introduces a Nushell-release-specific extract config that (a) extracts only the
nu/nu.exebinary and (b) increases the uncompressed-size cap to 512 MiB. - Updates
install_from_archiveto use the new extract config, avoiding bundled plugin payload extraction during bootstrap. - Adds targeted tests to ensure the size cap and include-filter behavior works as intended, plus a manual smoke test hook for real upstream archives.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/nu/bootstrap.rs | Adds a Nushell-release extract config (include filter + 512 MiB cap), wires it into install_from_archive, and adds tests (including an ignore-only real-archive smoke). |
| src/install/extract.rs | Clarifies ExtractConfig::max_uncompressed_bytes docs to reference the bootstrap override and include filtering. |
| CHANGELOG.md | Adds an Unreleased “Fixed” entry describing the restored setup nu behavior for 0.114.x archives. |
Code Review by Qodo
1.
|
Qodo FixerNo findings are within the configured fix scope. To change which findings are fixed, adjust the setting on your Qodo configuration page. |
Include filters only decide what is written to disk. file_count and total_bytes must charge every regular-file entry scanned so large siblings cannot bypass the archive-bomb caps. Co-authored-by: Anthony Thompson <github@trackdub.com>
Summary
numan setup nufails on current official Nushell releases:Nu 0.114.1 linux-gnu is ~279 MiB uncompressed (mostly bundled plugins like polars). Bootstrap only needs the
nubinary.Fix
**/nu/**/nu.exefrom the official release archivefile_count/total_bytes) now charges every regular-file entry scanned, including entries skipped by the include filter. The filter only decides what is written to disk.Test plan
cargo test --lib install::extract::cargo test --lib nu::bootstrap::nu-0.114.1-x86_64-unknown-linux-gnu.tar.gzRelease note
This is a client fix. Users need a new Numan release (or
cargo installfrom this commit) beforebrew/cargo-installednuman setup nuworks again for Nu 0.114.x.