Repository navigation
Opt-in unverified output (UnverifiedOutput::Emit): what UnRAR p / x -kb and 7z x -so hand over of a failing member - #317
Conversation
…treams what UnRAR and 7-Zip hand over of a failing member
- Options::unverified_output (whole-archive RAR runners, RarSession extraction with keep_broken): a RAR member cut
off by a missing volume keeps every byte UnRAR 7.30 `x -kb` keeps (RAR 3.x/4.x: LZ tokens starting in the last
30 bytes left out; RAR 5.0: the partial block decoded, symbols in the last 128 bits left out, a block with under
1024 bytes skipped; observed on 50 cut points).
- RarPrintOptions::unverified_output (`unrar p`): a member failing on its own data prints what was decoded of it;
RarEntryOutcome::unverified_bytes says how many bytes went out.
- sevenzip::print_selected_with_options + SevenZipPrintOptions (`7z x -so`): a failing 7z member streams what
7-Zip 26.06 streams (CRC failure: all; data error / cut folder: the bytes before it); Summary::unverified.
- SelectOptions::unverified_output (SelectedEntry): 7z as above; RAR 3.x/4.x unsupported VM filters streamed
unfiltered; read fails with UnverifiedWritten { bytes, cause }.
- LZMA readers hand out the bytes decoded before a data error, then the error.
Defaults unchanged. tests/unverified_output.rs checks each route against the reference tools' output.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LG44gZ63jJDJGeNcamsGrj
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bdccd8db80
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…s propagate, LZMA errors at the last byte stay - A member failing behind ones held for the folder's CRC is queued behind them (printed in archive order). - wrong_password() returns a result: an output error replaying held members ends the run. - The LZMA readers put a data error off only when the caller asked for more than was made; one asking for exactly the bytes left never reads again, so the error is returned then (default outcomes unchanged). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LG44gZ63jJDJGeNcamsGrj
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…teral Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LG44gZ63jJDJGeNcamsGrj
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4f3ad0926f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ver buffered bytes, unfiltered prerequisites don't stop a selected read - Run::emit_unverified returns a fault writing the flushed bytes as the run's terminal error. - RarSession decoding under UnverifiedOutput::Emit flushes what a failing decoder still buffers before the failure (printing and keep_broken extraction get every byte decoded). - SelectedEntry (Emit) goes on past a solid prerequisite written unfiltered; only the selected member's own unfiltered write fails the read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LG44gZ63jJDJGeNcamsGrj
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LG44gZ63jJDJGeNcamsGrj
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1f487c1bb1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…was decoded under Emit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LG44gZ63jJDJGeNcamsGrj
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LG44gZ63jJDJGeNcamsGrj
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LG44gZ63jJDJGeNcamsGrj
|
@codex review |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LG44gZ63jJDJGeNcamsGrj
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LG44gZ63jJDJGeNcamsGrj
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LG44gZ63jJDJGeNcamsGrj
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…rified_output) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LG44gZ63jJDJGeNcamsGrj
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Local CI ( Codex review on this head: no findings; all review threads resolved. |
Opt-in "unverified output": what UnRAR 7.30 and 7-Zip 26.06 hand over of a member that then fails (a missing volume, a CRC, a data error, a wrong password shown by its effect, an unsupported RAR VM filter). For Prybar's
--compat-unverified-outputand RustyGet's live extraction. Defaults are unchanged.API (for Prybar)
One enum,
zipfast::extract::UnverifiedOutput { Withhold (default), Emit }, in four places:Emitextract::Options::unverified_outputextract::run,run_with_password,run_rar_with_outcomes, dispatcherskeep_broken: a RAR member cut off by a missing volume keeps exactly whatunrar x -kbkeeps (withoutkeep_brokenit is removed, asunrar xdoes)RarSession::extract_selected/_controlledkeep_broken: that member is written and kept (by default a session doesn't write it at all)RarOutcome::Failed(MissingVolume | Integrity{MissingSplitContinuation})RarPrintOptions::unverified_outputRarSession::print_selected(unrar p)RarOutcome::Failed(..)plusRarEntryOutcome::unverified_bytes = Some(n)(new field)sevenzip::SevenZipPrintOptions::unverified_outputwith newsevenzip::print_selected_with_options7z x -soSummary::errorsplusSummary::unverified: Vec<UnverifiedMember { index, name, bytes }>(new field)extract::SelectOptions::unverified_output(.unverified_output(..), copied byFrom<&Options>)SelectedEntry::open_cancelable_with_options/..._zip_limit_and_optionsx -so, "Unsupported Method")readreturnsError::Iocarryingextract::UnverifiedWritten { bytes, cause }(UnverifiedWritten::of(&err));causeis the failure you'd get withoutEmit,Error::Unsupported(extract::UNFILTERED_SELECTED)for an unfiltered RAR memberNew
Optionsfield: addunverified_output: Default::default(),toOptions { .. }literals.Behaviour against the reference tools (Linux x64 binaries, docker
--network none)unrar p/x -kb, multi-volume RAR missing a later volume:multi_broken.part1.rarfile2.txt: 6,198 bytes, identical to UnRAR (was nothing). UnRAR doesn't decode to the last bit. What we observed: RAR 3.x/4.x leaves out an LZ token starting in the last 30 bytes. RAR 5.0 leaves out a symbol starting in the last 128 bits, skips a block that has fewer than 1,024 bytes present, and then also drops the previous block's last symbols. This was fitted and checked against 50 cut points: 3 RAR 3.x sets,textvol.part1.rar(968,316 bytes), andtext.rarmade into a cut first volume at 46 places, including both sides of three block starts. All are byte-identical.7z x -soon a failing 7z member: CRC failure: every byte decoded. LZMA/LZMA2 data error: the bytes before it. Folder cut short: the bytes decoded. Wrong password, LZMA: nothing. Wrong password, Copy: the garbage. Later member of a broken solid block: nothing. All byte-identical to 7-Zip; exit 2 is the caller's job. To get there, the LZMA readers now hand out what decoded before a data error, then the error. Default outcomes don't change.-sofor RAR members with unsupported filters:generic_delta_padding_mutation.rar: 1,048,576 bytes, SHA-256aff2543c…76c5, the same as Linux7z x -so.Not covered (documented in
docs/compat-options.md):SelectedEntrydoesn't imitate7z x -soon a RAR member cut off by a missing volume. 7-Zip itself writes nothing for RAR4 and decodes RAR5 to the end.Tests
tests/unverified_output.rs(fixtures and provenance intests/fixtures/unverified-output/README.md):whole_archive_runs_keep_what_unrar_decodes_of_a_member_cut_off_by_a_missing_volumerar_session_print_prints_what_unrar_prints_of_a_member_cut_offrar_session_extraction_keeps_what_unrar_decodes_of_a_member_cut_offseven_zip_print_streams_failing_members_as_seven_zip_doesselected_entry_streams_a_failing_7z_member_as_seven_zip_doesselected_entry_streams_a_rar_member_with_an_unsupported_filter_unfilteredEach test checks
Withhold(unchanged), checks thatEmitgives the reference tool's bytes (length and SHA-256), and checks that the failure is still reported. Revert check: with the behaviour disabled but the API kept, all 6 tests fail.🤖 Generated with Claude Code
https://claude.ai/code/session_01LG44gZ63jJDJGeNcamsGrj