Repository navigation
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (3)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
Included review availability: 3 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.
WalkthroughReflow width, formatting, separator detection and row parsing now use checked access for missing rows, cells or ranges. Examples and tests replace ChangesReflow bounds checks
Priority: ⬇️ Low Change: Bug fix Merge Risk: ⚪ Minimal · up to This change does not appear to alter valid table parsing or formatting. The reviewed callers preserve matching dimensions, and no actionable mergeability risk was identified. Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (2 errors)
✅ Passed checks (13 passed)
Full details: Testing (Overall)Explanation The changed bounds fallbacks are not tested. The test diff only changes string conversions, and existing width tests pass matching dimensions. They do not exercise rows wider than Resolution Add focused tests for both mismatched-dimension cases. Assert that Full details: Testing (Unit And Behavioural)Explanation The existing suite checks normal width calculation, formatting, row parsing, and generated concatenated rows. However, the test diff changes only string conversions. No test exercises the new mismatched-dimension behaviour: Resolution Add focused unit tests that pass a row wider than Rows meet their bounds with care Comment |
Reviewer's GuideThis PR hardens reflow against malformed or inconsistent internal row/width shapes by using checked access throughout parsing, width calculation, formatting, and separator detection, while replacing rejected string conversions and retaining existing behavioral coverage. Flow diagram for guarded reflow processingflowchart TD
Rows[Parsed rows] --> Parse[split_physical_rows]
Parse --> Separator[detect_separator]
Separator --> Widths[calculate_widths]
Widths --> Format[format_rows]
Format --> Output[Formatted table output]
Parse -. checked slices .-> Guard[Safe fallback on inconsistent shapes]
Widths -. checked width access .-> Guard
Format -. missing width defaults to zero .-> Guard
Separator -. checked second-row access .-> Guard
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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. |
Replace direct row and width indexing with checked access, preserving the existing table output while making internal dimension mismatches safe. Use owned string conversions in the reflow tests and examples to pre-empt the stricter lint baseline.
0061954 to
a55bf7d
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
This layer guards row and width access in reflow and replaces string conversions that the proposed stricter Clippy baseline would reject. It preserves the current table output and remains under the existing lint configuration. It is stacked on #548 (
harden-lint-ellipsis-protected); later source-fix layers and final lint enforcement remain separate.Review walkthrough
Validation
At commit
a55bf7d4fa95aa0e353647f03b9a1eff766e372don PR #54828b60698a86abe2838c330d6c80bd648a9f5bdf0, the one child commitretains stable patch ID
f52ae145cf6c9dfed9054517df2708d292ccd535,a 1:1 range-diff, and an identical raw child diff. The replay had no
textual conflicts or extra paths.
All eight Make gates passed sequentially:
make check-fmt,make lint,make test,make typecheck,make markdownlint,make nixie,make verus, andmake verus-selftest. Captured logs are under/tmp/pr549-restack-<gate>-a55bf7d.out. Localcs delta 28b60698a86abe2838c330d6c80bd648a9f5bdf0 a55bf7d4fa95aa0e353647f03b9a1eff766e372dreported no issues. Independent review of the original child patch found
no correctness issue in the checked-access replacements.
Hosted CI, Verus, and CodeScene checks are pending for this rewritten head.
The prior head's green hosted results are historical. Managed CodeRabbit
request
ae5d7093remains queued; a skipped automatic check is not a review.Notes
The production caller derives
max_colsfrom the maximum parsed row length, removes at most the separator row, then calculates and passes a widths vector of that same length to formatting. The short-width and overflow fallbacks therefore defend against inconsistent internal calls without changing the production output. Zero-width row splitting returns before chunking; the divisibility guard keeps the checked ranges valid.Phase-0 proposed-baseline measurement reported at least 997 Clippy sites before source remediation. Integration targets behind a root compilation failure and the Whitaker gate remain unmeasured; this PR does not claim overall baseline compliance. The selected Whitaker binary/pin and generated spelling policy are tracked separately.
References