Conversation
A commit message can start with a blank line, or contain nothing but the git-svn-id line, and the Reporter API rejects an empty message. Taking the first line of the message as-is then fails the whole upload, which is what happened on r63330 and on nine older revisions. Report the first line of actual text instead, and fall back to the revision when there is none. Fixes WordPress#335.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
chrisdavidmiles
left a comment
There was a problem hiding this comment.
The title now comes from the first line of actual text, skipping blank lines and the git-svn-id trailer and falling back to the revision label, so the handful of mirror commits with a blank or trailer-only first line stop failing the Reporter upload on an empty title.
AI Assisted Claude Code was used to pull the branch and mutation check the title change against blank first line and trailer only commits.
iarif4u
left a comment
There was a problem hiding this comment.
Verified and tested:
- r63330 (
497de8c): the commit message starts with an empty line, sohead -1gives an empty title. This matches #335. - I ran the new loop on 4 cases:
- Empty first line → first real line.
- Only the
git-svn-idline →r63330. - Normal message → its first line, unchanged.
- Empty
$rev→r.
The logic is correct, and normal commits keep their current title.
One small, non-blocking point: if a commit has no git-svn-id line, $rev is empty and the title becomes just r. That can only happen on a non-mirror commit, and the upload needs a revision anyway, so I think it's fine as it is.
|
Thanks for testing this. Right on the empty $rev case: it only happens outside the mirror, and the Reporter rejects that upload anyway because commit has to be an integer, so the title never gets used there. @iarif4u |
Fixes #335
Problem
report.phpbuilds the report title from the first line of the tested commit's message (git log -1 --pretty=%B | head -1). When that first line is blank, the Reporter API rejects the upload withInvalid parameter(s): message (HTTP status 400), and the host's report for that revision is lost.That is what happened on r63330 (2026-08-21, the day #335 was filed): the mirror commit's message starts with a blank line. Core's own "test reporting enabled" jobs failed on that commit with the same error (https://github.com/WordPress/wordpress-develop/actions/runs/32451583443/job/96684603979), and the results site has 1 host report for r63330 against 19 for r63329 and 17 for r63331. The previous such commit, r61679, has 0 reports against 7 for r61678.
Across the full mirror history (53,713 commits) this affects 10 revisions: r63330, r61679, r59087, r52707, r50955, r40796, r36811, r35910, r5451 and r3116. Five of them contain nothing but the
git-svn-idline.Fix
Report the first line of actual text in the message instead of the first line as-is. Blank lines and the
git-svn-idtrailer are skipped, and when no text is found at all the revision label (r59087) is used, so the upload never fails on the title.Git's
%s(subject) was not used because it joins a wrapped first paragraph into one line, which would change the title of 943 existing revisions. The new rule changes exactly the 10 revisions above and leaves the other 53,703 titles identical.Verification
report.phpagainst the Reporter plugin (current master) on a local WordPress 7.1 site.masterfails the blank-first-line and trailer-only cases withInvalid parameter(s): message (HTTP status 400); this branch uploads all four, with the r63330-shaped commit titled "Block Supports: guard against non-string attribute values to avoid fatal errors" and the trailer-only one titled "r59087". The normal and wrapped cases produce the same title as before.php -l,phpcsandgit diff --checkclean.Use of AI
AI assistance: Yes
Tool(s): Claude Code and Codex
Used for: Investigation, implementation, verification harness, and PR wording. I reviewed the reasoning and test results, and I take responsibility for the contribution.