CONTRIBUTING: keep the original author when carrying someone else's commits #3174

Open
opened 2026-11-28 16:03:29 +00:00 by kole07139 · 1 comment
kole07139 commented 2026-11-28 16:03:29 +00:00 (Migrated from github.com)
Contributor

Imported from ivall/xcl. Originally posted by kole07139 on 2026-11-28T16:03:29Z.


More and more PRs and stacks carry other contributors' commits: integration stacks, ports to nvidia-dev / amd-dev, "prerequisite stack history" under a PR. When an agent rebuilds those commits instead of cherry-picking them, the original author can disappear from main. CONTRIBUTING.md and AGENTS.md say nothing about it yet. Agents follow what is written there, so one rule would fix most of it.

An example. #2244 (mine, open) had two commits. Both reached main with #2959, which carried them as prerequisite history of a stack slice:

  • 60a90b12 is #2244's 06f9df8, with the same code. On main its author is the stack's author, and no trailer names me.
  • 3caff9ef is #2244's 97e22f6. It kept @GreemSC's Co-authored-by, but not me.

Nobody did anything wrong on purpose here. #2959's description says that only its top commit belongs to it, so whoever merged it had no reason to look at where the history came from. The code is in main and that is what matters most. I only noticed because #2244 started to conflict with its own code, and I closed it with a note. But this will keep happening as long as nothing tells tools and people how to carry a commit.

Proposed wording, in CONTRIBUTING.md under Commits:

  • Carrying someone else's commits (into a stack, a port to a dev branch, or your own PR): keep their author. git cherry-pick and git rebase do that; do not re-commit their changes under your name, and do not use --reset-author. When you squash or rewrite their work, add Co-authored-by: <name> <email> for each original author, and name the PR the commits came from in the description.

And one line in AGENTS.md under Commits:

  • When you carry another contributor's commits, keep them as their author (git cherry-pick, not a re-commit). If you must squash or rewrite them, add a Co-authored-by: trailer for each original author and link the PR they came from.

This is narrow on purpose. It does not change how stacks or ports work, only that the original name goes with the commit.

I can open the PR with exactly this text if you want it, or change the wording.

AI use: Claude Code (Claude Opus 5.5) traced the commits and drafted this issue; I reviewed it.

<!-- greyfinch-sync:ivall/xcl:issue:6667880282 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/3174). Originally posted by [kole07139](https://github.com/kole07139) on 2026-11-28T16:03:29Z. --- More and more PRs and stacks carry other contributors' commits: integration stacks, ports to `nvidia-dev` / `amd-dev`, "prerequisite stack history" under a PR. When an agent rebuilds those commits instead of cherry-picking them, the original author can disappear from `main`. CONTRIBUTING.md and AGENTS.md say nothing about it yet. Agents follow what is written there, so one rule would fix most of it. **An example.** #2244 (mine, open) had two commits. Both reached `main` with #2959, which carried them as prerequisite history of a stack slice: - `60a90b12` is #2244's `06f9df8`, with the same code. On `main` its author is the stack's author, and no trailer names me. - `3caff9ef` is #2244's `97e22f6`. It kept @GreemSC's `Co-authored-by`, but not me. Nobody did anything wrong on purpose here. #2959's description says that only its top commit belongs to it, so whoever merged it had no reason to look at where the history came from. The code is in `main` and that is what matters most. I only noticed because #2244 started to conflict with its own code, and I closed it with a note. But this will keep happening as long as nothing tells tools and people how to carry a commit. **Proposed wording**, in CONTRIBUTING.md under **Commits**: > - **Carrying someone else's commits** (into a stack, a port to a dev branch, or your own PR): keep their author. `git cherry-pick` and `git rebase` do that; do not re-commit their changes under your name, and do not use `--reset-author`. When you squash or rewrite their work, add `Co-authored-by: <name> <email>` for each original author, and name the PR the commits came from in the description. And one line in AGENTS.md under **Commits**: > - When you carry another contributor's commits, keep them as their author (`git cherry-pick`, not a re-commit). If you must squash or rewrite them, add a `Co-authored-by:` trailer for each original author and link the PR they came from. This is narrow on purpose. It does not change how stacks or ports work, only that the original name goes with the commit. I can open the PR with exactly this text if you want it, or change the wording. AI use: Claude Code (Claude Opus 5.5) traced the commits and drafted this issue; I reviewed it.
KOLESNiii commented 2026-11-28 20:14:35 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-28T20:14:35Z.


I agree, particularly with open-source code of honour! People should receive proper attribution for the good work they are doing!

As an additional point - when an agent does things like this - using a commit or feature from an open PR, this should be made clear on that PR itself, to reduce the number of duplicated or needless open PRs.

<!-- greyfinch-sync:ivall/xcl:comment:7245141231 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/3174#issuecomment-7245141231). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-11-28T20:14:35Z. --- I agree, particularly with open-source code of honour! People should receive proper attribution for the good work they are doing! As an additional point - when an agent does things like this - using a commit or feature from an open PR, this should be made clear on that PR itself, to reduce the number of duplicated or needless open PRs.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl#3174
No description provided.