(Team3) regex testcases internal merge#123
Merged
Merged
Conversation
Contributor
|
@zuozhi Please make sure to modularize your PR to make the reviews easier. Do not give me a big PR :-) |
Contributor
Author
|
@chenlica I won't push anything to the current Regex Translator PR until we talked on Thursday. Currently I'm fixing bugs, adding more test cases, and doing performance test in |
Contributor
|
@zuozhi 👍 |
Yicong-Huang
added a commit
that referenced
this pull request
May 3, 2026
…rt message (#4696) ### What changes were proposed in this PR? Direct backports currently append the `(backported from commit X)` note at the very end of the commit message. Because GitHub's squash-merge messages already carry a trailer block (`Co-Authored-By:` etc.) at the end, the note ends up *after* the trailers: ``` fix: foo Body. Closes #123. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> (backported from commit abc1234) ← currently here ``` Git treats the trailer block as the contiguous run of `Key: value` lines at the very end of the message, separated from the body by a blank line. With a non-trailer line trailing the trailer block, `git interpret-trailers --parse` sees zero trailers — tools that read Co-Authored-By, Signed-off-by, etc. lose the metadata for backport commits. This PR re-orders the composition so the body comes first, then the `(backported from commit X)` note as its own paragraph, then the trailer block at the very end: ``` fix: foo Body. Closes #123. (backported from commit abc1234) ← moved here Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> ``` A small Python step inside the workflow splits the original message at the trailer boundary using the standard `^[A-Za-z][A-Za-z0-9-]*:\s` heuristic and reassembles. Cases handled: | input | output | |---|---| | body + trailers | body + blank + note + blank + trailers | | body, no trailers | body + blank + note | | multiple trailers | body + blank + note + blank + all trailers contiguous | ### Any related issues, documentation, discussions? None — incidental fix to the backport job alongside the broader CI cleanup work. ### How was this PR tested? Ran the assembled Python step locally against five synthetic message shapes: | input | result | |---|---| | subject only (`docs: typo fix`) | subject + blank + note | | subject + body, no trailers | subject + body + blank + note | | subject + body + single trailer | subject + body + blank + note + blank + trailer | | subject + body + multiple trailers | subject + body + blank + note + blank + all trailers contiguous | | body containing a non-trailer `Word:` line | subject + body + blank + note (body line not mis-classified) | The last case is the trailer-detection tightening: a trailer block exists only when there is a blank line in the message AND every line after the last blank line is in trailer format. That avoids treating a Conventional Commits subject (`feat: foo` for a one-line commit) as a one-line trailer block. The next direct-backport CI run on this branch's merge will exercise the path end-to-end. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.7, 1M context) --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Yicong-Huang
added a commit
that referenced
this pull request
May 3, 2026
…rt message (#4696) ### What changes were proposed in this PR? Direct backports currently append the `(backported from commit X)` note at the very end of the commit message. Because GitHub's squash-merge messages already carry a trailer block (`Co-Authored-By:` etc.) at the end, the note ends up *after* the trailers: ``` fix: foo Body. Closes #123. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> (backported from commit abc1234) ← currently here ``` Git treats the trailer block as the contiguous run of `Key: value` lines at the very end of the message, separated from the body by a blank line. With a non-trailer line trailing the trailer block, `git interpret-trailers --parse` sees zero trailers — tools that read Co-Authored-By, Signed-off-by, etc. lose the metadata for backport commits. This PR re-orders the composition so the body comes first, then the `(backported from commit X)` note as its own paragraph, then the trailer block at the very end: ``` fix: foo Body. Closes #123. (backported from commit abc1234) ← moved here Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> ``` A small Python step inside the workflow splits the original message at the trailer boundary using the standard `^[A-Za-z][A-Za-z0-9-]*:\s` heuristic and reassembles. Cases handled: | input | output | |---|---| | body + trailers | body + blank + note + blank + trailers | | body, no trailers | body + blank + note | | multiple trailers | body + blank + note + blank + all trailers contiguous | ### Any related issues, documentation, discussions? None — incidental fix to the backport job alongside the broader CI cleanup work. ### How was this PR tested? Ran the assembled Python step locally against five synthetic message shapes: | input | result | |---|---| | subject only (`docs: typo fix`) | subject + blank + note | | subject + body, no trailers | subject + body + blank + note | | subject + body + single trailer | subject + body + blank + note + blank + trailer | | subject + body + multiple trailers | subject + body + blank + note + blank + all trailers contiguous | | body containing a non-trailer `Word:` line | subject + body + blank + note (body line not mis-classified) | The last case is the trailer-detection tightening: a trailer block exists only when there is a blank line in the message AND every line after the last blank line is in trailer format. That avoids treating a Conventional Commits subject (`feat: foo` for a one-line commit) as a one-line trailer block. The next direct-backport CI run on this branch's merge will exercise the path end-to-end. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.7, 1M context) --------- (backported from commit a5b8957) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Yicong-Huang
pushed a commit
to Yicong-Huang/texera
that referenced
this pull request
May 4, 2026
…ut-merge
Two review-driven fixes for the PR-assignment workflow:
1. The body-diff regex used to detect removed closing references now
accepts the colon form ("Closes: apache#123") in addition to the bare
"closes apache#123" form. The behavior on multiple refs per line
("Closes #1, #2") is unchanged and matches `closingIssuesReferences`
semantics — only #1 is treated as a closing ref. Verified against 12
shape variants (uppercase/colon/multi-line/non-keyword).
2. New step: when a PR is closed without being merged, remove the opener
from each same-repo closing-reference issue. Previously, abandoned
PRs left the opener as a stale assignee with `triage` removed. The
issue-triage workflow's unassigned handler then re-adds `triage` if
no other assignees remain. Cross-repo refs are skipped, consistent
with the assign side. Bot-opened PRs are excluded.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
yangzhang75
pushed a commit
to yangzhang75/texera
that referenced
this pull request
Jun 22, 2026
…rt message (apache#4696) ### What changes were proposed in this PR? Direct backports currently append the `(backported from commit X)` note at the very end of the commit message. Because GitHub's squash-merge messages already carry a trailer block (`Co-Authored-By:` etc.) at the end, the note ends up *after* the trailers: ``` fix: foo Body. Closes apache#123. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> (backported from commit abc1234) ← currently here ``` Git treats the trailer block as the contiguous run of `Key: value` lines at the very end of the message, separated from the body by a blank line. With a non-trailer line trailing the trailer block, `git interpret-trailers --parse` sees zero trailers — tools that read Co-Authored-By, Signed-off-by, etc. lose the metadata for backport commits. This PR re-orders the composition so the body comes first, then the `(backported from commit X)` note as its own paragraph, then the trailer block at the very end: ``` fix: foo Body. Closes apache#123. (backported from commit abc1234) ← moved here Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> ``` A small Python step inside the workflow splits the original message at the trailer boundary using the standard `^[A-Za-z][A-Za-z0-9-]*:\s` heuristic and reassembles. Cases handled: | input | output | |---|---| | body + trailers | body + blank + note + blank + trailers | | body, no trailers | body + blank + note | | multiple trailers | body + blank + note + blank + all trailers contiguous | ### Any related issues, documentation, discussions? None — incidental fix to the backport job alongside the broader CI cleanup work. ### How was this PR tested? Ran the assembled Python step locally against five synthetic message shapes: | input | result | |---|---| | subject only (`docs: typo fix`) | subject + blank + note | | subject + body, no trailers | subject + body + blank + note | | subject + body + single trailer | subject + body + blank + note + blank + trailer | | subject + body + multiple trailers | subject + body + blank + note + blank + all trailers contiguous | | body containing a non-trailer `Word:` line | subject + body + blank + note (body line not mis-classified) | The last case is the trailer-detection tightening: a trailer block exists only when there is a blank line in the message AND every line after the last blank line is in trailer format. That avoids treating a Conventional Commits subject (`feat: foo` for a one-line commit) as a one-line trailer block. The next direct-backport CI run on this branch's merge will exercise the path end-to-end. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.7, 1M context) --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Since dataReader is already changed. team3-regex-dataReader no longer needs to exist.
Merge team3-regex-datareader into another branch: team3-regex-testcases.