Repository navigation
fix: preserve repeated quoted CSV headers without a final newline - #4786
Merged
cragwolfe merged 1 commit intoNov 17, 2026
Conversation
cragwolfe
reviewed
Nov 16, 2026
cragwolfe
left a comment
Contributor
There was a problem hiding this comment.
Static review of the CSV and TSV change, including table output, chunking, metadata, and serialization: no actionable Critical, High, or Medium defects found.
This fix intentionally changes the public text and HTML for a header-only file with repeated quoted labels and no final newline. For example, name name.1 becomes name name. Consumers that depend on the prior output may see changed serialized values, text-derived IDs, or chunk boundaries. A maintainer should decide whether that compatibility change is acceptable.
I did not run tests or benchmarks. CI remains separate from this review.
(authored by codex)
cragwolfe
approved these changes
Nov 16, 2026
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
The repeated-header restoration added in #4709 misses a complete quoted header when the file has no final newline. For example, a file containing only
"name","name"producesname name.1even though the second label isname.At the end of a complete peeked line, treat a pending quote as the closing quote of its field. A line without a terminator reaches this check only at EOF: the bounded header peek returns an empty string if its budget is exhausted, rather than returning a truncated prefix. Unclosed quoted fields and multi-line header handling retain their existing guards.
The shared reader fixes CSV and TSV, including escaped quotes within duplicate labels. No read budget, delimiter, field-size limit or data-row behavior changes.
Validation
Checklist
bugcategory label.