Repository navigation
ruff_charon: remove a stale rows.tsv and refuse section offsets past 4 GiB - #134
Merged
Merged
Conversation
…4 GiB Re-importing a crate with the TSV export off left the previous revision's rows.tsv in place, so rows_tsv() returned old relations beside a current rows.bin; the import now removes it. The writer saturated section offsets and lengths to u32::MAX when the laid-out file exceeded 4 GiB and reported success with a file the reader refuses; it now returns WriteError::FileTooLarge before anything is written. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X6y3drwKSE2zSgoexheLFX
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Codex Review SummaryThis 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. |
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
Two defects in the binary rows format from #133.
with_tsv_export(false)left the previous revision'srows.tsvin place.rows_tsv()then returned the old relations next to a currentrows.bin. The import now removes an existingrows.tsvwhenever the export is off; a missing file is not an error.u32::MAX, reported success, and replaced the stored artifact with a file the reader refuses. These directory fields, and each section's end, now go throughdir_field. A value that does not fit returnsWriteError::FileTooLargebefore anything is written.Test Plan
New tests:
turning_the_export_off_removes_a_stale_tsvimportscg_librevision 1 with the TSV on, then revision 2 with it off, and asserts the old TSV is gone. It also asserts the two revisions really differ.a_directory_field_past_u32_is_an_errorchecks thatu32::MAXconverts andu32::MAX + 1is refused.Disable checks (each change was applied with an asserted anchor, run, and reverted):
Results:
cargo testincrates/ruff_charonpasses every suite, andcargo clippy --all-targets -- -D warningsis clean.Generated by Claude Code