Repository navigation
[infra] Surface the ASF generative-AI disclosure in the PR template - #933
Conversation
| - [ ] Yes | ||
| - [ ] No | ||
|
|
||
| If yes, include a `Generated-by: <tool name and version>` line in this description. See the [ASF generative tooling guidance](https://www.apache.org/legal/generative-tooling.html). |
There was a problem hiding this comment.
The ASF guidance recommends putting Generated-by: in the source-control commit message so it can support future machine-readable provenance. However, this repository currently uses squashMergeCommitMessage=COMMIT_MESSAGES and also allows rebase merges, so a line present only in the PR description is not preserved in Git history by default; this PR itself has the line in its body while commit 406c1d7d has an empty message body. Could we require the trailer in the commit message as well, while keeping the PR-body disclosure for reviewer visibility, or otherwise adjust the merge configuration/policy to guarantee it survives?
There was a problem hiding this comment.
You're right, I had the reasoning backwards in the PR description.
I checked what actually survives. Squash composes the merged body from the source commit messages, so bc55d97e (#957) has an empty body despite a long PR description, while 55ccb13e (#904) kept the prose from its commit. Rebase drops the body entirely. On both enabled paths the commit message survives and the description does not.
Took your first option rather than touching the merge configuration, since switching squash to PR_BODY would still leave the rebase path unfixed. Updated in 108353e: the template and the AGENTS.md sentence now ask for the line in the commit message, keeping the description copy for reviewer visibility. That commit carries the trailer itself, and I've corrected the claim in the PR description.
The ASF guidance asks for the token in the source control commit message so future release tooling can pull it into a machine-parsable provenance file. This repository enables squash and rebase merges, and squash composes the merged body from the source commit messages, so a line present only in the PR description does not reach Git history on either path. Ask for the line in the commit message, and keep the PR-description copy for reviewer visibility. Generated-by: Claude Code 2.1.220
wenjin272
left a comment
There was a problem hiding this comment.
Thanks for addressing my comment. LGTM.
Linked issue: #932
Purpose of change
The ASF generative tooling guidance asks contributors to disclose when generative AI tooling was used to author or co-author a contribution. Our PR template has no field for that, and
AGENTS.mddoes not mention it, so the disclosure is not surfaced anywhere in this project today.This adds a disclosure section to the PR template, plus one sentence in the
AGENTS.mdcommit and PR guidelines recording the same convention, so that a human contributor and a coding agent reading the repo guide both know to fill it in.The wording follows the shorter of the two Apache precedents.
apache/auronuses a yes/no question with aGenerated-byinstruction and a link to the ASF guidance.apache/flinkuses a longer form with a commented-out trailer plus a project policy line stating that low-effort AI-generated PRs will be closed. I left that policy line out, since it is a project decision rather than a mechanical alignment with the ASF guidance, and seems better raised on its own if maintainers want it.Two small choices worth a reviewer's eye:
Generated-byline is asked for in the commit message, with the PR description carrying a copy for reviewer visibility. The guidance asks for the token in the source control commit message so future release tooling can pull it into a machine-parsable provenance file. This repository enables squash and rebase merges, and squash composes the merged body from the source commit messages, so a line present only in the PR description does not reach Git history on either path.Tests
Not applicable, documentation only, no logic change.
Ran
python3 tools/check-agents-md.py: passes, confirming theAGENTS.mdedit leaves the version facts the checker asserts untouched.Ran
./tools/check-license.sh: RAT checks pass.API
No. No code or public API change.
Documentation
doc-includedWas this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code 2.1.220