Repository navigation
refactor(error)!: Error::Cfb keeps its io::Error as the source, and limit refusals are Error::TooLarge (#899) - #916
Merged
Merged
Conversation
…15 copies of simple_decoder! generated
# Conflicts: # CHANGELOG.md
…turns a reference into it
… and Cfb did not describe get their own variants
…nt instead of raising OSError
…imit refusals are Error::TooLarge (#899)
# Conflicts: # docs/python.md # python/rvt/__init__.pyi # rvt-py/src/lib.rs # src/elements/arc_wall.rs # src/error.rs # src/walker.rs
DrunkOnJava
marked this pull request as ready for review
October 23, 2026 14:03
DrunkOnJava
enabled auto-merge (squash)
October 23, 2026 15:21
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c4c208c2a6
ℹ️ 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".
…data or a writer flush fails
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.
Summary
Error::Cfb(String)becomesCfb { op, path, source: io::Error }, soError::source()returns the I/O error and a caller can match on its kind. The five size-limit refusals that wereCfbbecomeError::TooLarge { what, size, limit }. Fixes #899.Changes
src/error.rs:Cfb { op: &'static str, path: Option<String>, #[source] source: io::Error }, displayed asCFB {op} {path}: {source}, andTooLarge { what: String, size: u64, limit: u64 }. Both are documented field by field.src/writer.rs: the 17 I/O sites keep their error, withopone ofcreate,create_storage,create_stream,write,flush,openandrename. "dst has no filename component" (3 sites) is anIoerror of kindInvalidInput, because it is a caller's mistake, not the container's. The stream too short for its 8-byte prefix isMalformed { what: "stream framing" }.src/reader.rs:open_bytes' container open keeps its error. The file and in-memory buffer overOpenLimits::max_file_bytes, and a stream over its read limit before or during the read, areTooLarge.src/metadata.rs: the container open andopen_streamkeep their error; the identity stream over its cap isTooLarge.CHANGELOG.md: a breaking-change entry.Nothing outside
src/constructs or matchesError::Cfb: the CLIs, the bindings, the tests and the fuzz targets only display it.Testing
tools/check-local.sh: not run locally. CI builds, lints and runs the real-file, CLI and contract targets, whose writer and open-limit paths raise these errors.cfb_roundtrip_delta(the writer on the real corpus),cli_real_filesandfuzz_regressionsrun in this PR's CI.Audit-honesty checklist
Legal and contribution hygiene