fix(zlib): prevent zip from degrading default compression - #11020
proggeramlug wants to merge 3 commits into
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 8 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe ZIP dependency now uses a backend-neutral flate2 feature configuration. A regression test checks gzip output from synchronous, callback, and promisified APIs. The changelog documents the fix. Changeszlib compression backend
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The change restores compact gzip behavior and adds effective regression coverage; no actionable merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches 💡 1🧪 Generate unit tests (beta)
🛠️ Fix failing CI checks 💡
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 |
|
Landed on Cherry-picked from this PR's head Nothing needed from you. Thanks. |
Summary
zipto keep its existing codec set without forcing flate2'szlib-rsbackend across the combined Perry build.gzipSync, callbackgzip, andpromisify(gzip).Closes #10810.
Cause
The
zipcrate's defaultdeflatefeature enablesdeflate-flate2-zlib-rs. Cargo feature unification applied that backend toperry-ext-zlibin a combined build. At default level 6, the issue payload compressed to 31,388 bytes with that backend and 16,592 bytes with flate2's normal Rust backend.Verification
perry,perry-runtime-static,perry-stdlib-static, andperry-ext-zlibin one Cargo invocation.test_gap_10810_zlib_default_compression.tswith the rebuilt Perry binary: all three compression checks printedtrue.true.cargo test --profile perry-dev -p perry update_checker -- --nocapture(22 passed, including ZIP extraction and corrupt/archive traversal rejection)perryfeature graph contains flate2rust_backend/miniz_oxideand nozlib-rs.cargo fmt --all -- --checkbash scripts/check_file_size.shgit diff --checkSummary by CodeRabbit