Skip to content

xz: upstream v0.5.17 catch-up, and UPSTREAM.md - #86

Merged
apostasie merged 2 commits into
mainfrom
claudio/20261004-upstream-v0.5.17
Oct 5, 2026
Merged

apostasie merged 2 commits into
mainfrom
claudio/20261004-upstream-v0.5.17

Conversation

@closer-claudio

@closer-claudio closer-claudio commented Oct 5, 2026 •

Copy link
Copy Markdown

🎯 Why: the pre-release upstream catch-up @apostasie asked for. Upstream ulikunitz/xz has six commits the fork lacks (v0.5.16, v0.5.17); one is a fix the fork needs.

🛠️ What: lzma.ByteReader's ReadByte retries (0, nil) reads, up to 100, then returns io.ErrNoProgress; a regression test at the xz level, a bound test in lzma, and a CHANGELOG entry. UPSTREAM.md records the fork point and where each upstream commit since then went, in the format every forkcloser fork now uses.

🧪 How:

  1. lzma: retry (0, nil) reads in ByteReader instead of failing. V: TestReaderZeroNilReads (xz.NewReader over a reader returning (0, nil) before every read) fails on main with the old error and passes with the fix; TestByteReaderNoProgress fails on main and passes. The lzma-level form of upstream's test passes on main too (the fork already puts plain input behind bufio), so the test lives where the fork failed. just lint (every lane but links) and just test green locally. U: links (sandbox).
  2. UPSTREAM.md: record the fork point and every upstream commit since. V: the six upstream commits after b371040, per GitHub's compare of main against ulikunitz:master, each sit in exactly one table, and the Here links resolve. Green locally as above.

📝 Upstream's other five commits need nothing here. internal/term's non-terminal fallback is already in the fork (its narrower build tags are the fork's). The rest is upstream's own release bookkeeping: version strings, relnotes and TODO.md.

@closer-claudio closer-claudio left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Ready at e1bbb78: upstream v0.5.17's fix ported, lzma.ByteReader retries (0, nil) reads, which io.Reader permits, up to 100 times before returning io.ErrNoProgress, instead of failing xz.NewReader with "no data"; 12/12 checks green including the gate.

🔍 Verified last: diff read at e1bbb78, four files. ReadByte returns the byte on any progress, the reader's error when it has one, and io.ErrNoProgress after the bound, the stdlib's convention for this case; errNoData and the errors import go with the old path. TestReaderZeroNilReads drives xz.NewReader over a reader that returns (0, nil) before every read and checks the round trip; TestByteReaderNoProgress checks the bound. The CHANGELOG entry credits upstream. Upstream's other five commits were not re-read here; the body says they need nothing. Body in #217's shape.

@closer-claudio closer-claudio changed the title lzma: retry (0, nil) reads in ByteReader (upstream v0.5.17) xz: upstream v0.5.17 catch-up, and UPSTREAM.md Oct 5, 2026
@closer-claudio
closer-claudio force-pushed the claudio/20261004-upstream-v0.5.17 branch from 4fb9a58 to 099d054 Compare October 5, 2026 05:04
closer-claudio and others added 2 commits October 4, 2026 22:07
io.Reader allows Read to return (0, nil) and asks callers to retry;
breader.ReadByte turned it into "breader.ReadByte: no data". The lzma
Reader never saw it (a plain input already sits behind bufio, which
retries), but the xz block header and index read through
lzma.ByteReader directly, so xz.NewReader on a reader that stutters
(0, nil) failed outright.

ReadByte now retries up to 100 times and then returns io.ErrNoProgress,
the same bound bufio uses. Ported from upstream v0.5.17, "fix: retry
(0, nil) reads in breader.ReadByte",
ulikunitz@591e09e
with the regression test moved to the xz level, where the fork's path
still failed; a second test pins the io.ErrNoProgress bound.

Upstream's other commits since the fork point are already here
(internal/term's fallback, v0.5.16) or are its own release bookkeeping.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: closer-claudio <claudio@farcloser.world>
One file, the same in every forkcloser fork, answers what this fork
was taken from and what of upstream it carries: the fork point, the
upstream head the last review reached, and each upstream commit since
the fork point in exactly one of two tables, incorporated (with the
commit here) or not (with the reason). The next review starts after
the "Reviewed through" commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: closer-claudio <claudio@farcloser.world>
@closer-claudio
closer-claudio force-pushed the claudio/20261004-upstream-v0.5.17 branch from 099d054 to 9aeb1da Compare October 5, 2026 05:08

@closer-claudio closer-claudio left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Ready at 9aeb1da: the reviewed port (now 4c88e4f, same code, its message naming upstream by commit URL as limen#240 asks) plus UPSTREAM.md, which records the fork point, the reviewed-through commit, and every upstream commit since in exactly one table; 12/12 checks green including the gate.

🔍 Verified last: ulikunitz/xz's history after b371040 is exactly the six commits listed (82b346c, ba40d80, 024f909, 591e09e, f5969eb, 6ead826), each in one table, and 6ead826 is upstream's head; the header now says which date is the commit's and which the review's. The port of 591e09e, 4c88e4f, carries the code reviewed at e1bbb78, and UPSTREAM.md's Here link follows it. Body in #217's shape.

@apostasie
apostasie merged commit 0abcb3f into main Oct 5, 2026
12 checks passed
@apostasie
apostasie deleted the claudio/20261004-upstream-v0.5.17 branch October 5, 2026 05:22
@closer-claudio closer-claudio mentioned this pull request Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants