🏗️🔧:read a wrapped trailer the way git does - #1900
Conversation
A trailer whose value ran onto an indented line was read as far as the
fold and no further. The continuation was dropped before any check saw
it, so whatever had been wrapped was invisible.
That is a way around the check that just landed. These two are one
trailer to git, and `git interpret-trailers --parse` prints both as the
same line, but only the first was refused:
Co-authored-by: Some Person <noreply@anthropic.com>
Co-authored-by: Some Person
<noreply@anthropic.com>
The address is the half that says who a trailer names, and it is the
half at the end, so it is the half a fold hides. Sign-off had the same
hole from the other side: a wrapped `Signed-off-by:` lost the address
the author is compared against, and the check passed for nobody.
So the continuation is joined onto the value rather than discarded,
which is what git does with it. Reading a message now agrees with
`git interpret-trailers` on a folded trailer as well as a plain one,
which is the agreement the verify task already cross-checks.
Nothing has to be wrapped to begin with: the trailer block stays exempt
from the width limit, because a trailer is metadata and the limit is for
prose. The comment saying a trailer is one line by construction went
with the construction.
Signed-off-by: Derek Lewis <DerekNonGeneric@inf.is>
Assisted-by: Claude-Code:claude-opus-5
✅ Deploy Preview for gh-pages-openinf ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (2)
Included review availability: 1 review is currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. 📝 WalkthroughWalkthroughTrailer parsing now preserves indented continuation lines by folding them into the preceding trailer value. Sign-off and co-author validation now inspect the complete value. Tests cover folded addresses and updated trailer width documentation. ChangesTrailer parsing
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to Trailer continuations are preserved for validation, and no merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Summary
Follow-up to #1899, which merged an hour ago. CodeRabbit found the hole on the
.githubcopy of the same change: a trailer whose value runs onto an indented line was read as far as the fold and no further.The continuation was dropped before any check saw it. These two are one trailer to git, and
git interpret-trailers --parseprints both as the same line, but only the first was refused:The address is the half that says who a trailer names. It sits at the end, so it is the half a fold hides, which made folding a way around the check that just landed.
Sign-off had the same hole from the other side, and older: a wrapped
Signed-off-by:lost the address that gets compared against the commit author, and the check passed for nobody.What changed
The continuation is joined onto the value rather than discarded, which is what git does with it. Reading a message now agrees with
git interpret-trailerson a folded trailer as well as a plain one, and that agreement is already cross-checked by the verify task on every commit.Nothing has to be wrapped to begin with. The trailer block stays exempt from the width limit, because a trailer is metadata and the limit is for prose. The comment claiming a trailer is one line by construction went with the construction.
Validation
Related
The same fix is folded into the unmerged copies, so all three stay byte-identical: OpenINF/sdk#38 and OpenINF/.github#916.
Summary by CodeRabbit