From e74b541bfb5248de651d75dfda8c8a8f80f852a7 Mon Sep 17 00:00:00 2001 From: Bruce Liu <2898118638@qq.com> Date: Sun, 30 Aug 2026 03:03:54 +0800 Subject: [PATCH 1/4] docs: add DCO 1.1 text and contributor sign-off guide Add the unmodified Developer Certificate of Origin 1.1 as /DCO, a root CONTRIBUTING.md documenting git commit -s / rebase --signoff repair (fork-first), email matching, co-author/bot/AI-assistance signing policies, and the transition policy for pull requests opened before the check was enabled. Link the guide from README and the developer guide. Part of #358 (section 1, repository-side items). Signed-off-by: Bruce Liu <2898118638@qq.com> --- CONTRIBUTING.md | 91 +++++++++++++++++++++++++++++++++++++ DCO | 33 ++++++++++++++ README.md | 4 +- docs/contributing/README.md | 20 ++++++++ 4 files changed, 147 insertions(+), 1 deletion(-) create mode 100644 CONTRIBUTING.md create mode 100644 DCO diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..b8eebd54 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,91 @@ +# Contributing to RL-Kernel + +Thank you for your interest in contributing to RL-Kernel. Bug reports, feature +requests, documentation improvements, and code contributions are all welcome. + +- For bugs and feature requests, please + [open an issue](https://github.com/RL-Align/RL-Kernel/issues) first. +- For code changes, open a pull request against `main` and keep it focused on + a single topic. +- For questions and discussion, reach the community on + [Slack](https://rl-align.slack.com) or [WeChat](./docs/community/wechat.md). + +## Sign your work (DCO) + +Every commit in a pull request must carry a `Signed-off-by:` trailer, per the +[Developer Certificate of Origin](./DCO) (DCO), version 1.1. The DCO check is +enforced as a required status check on every pull request. + +By signing off, you certify that you wrote the change or otherwise have the +right to submit it under the project's open source license. + +Sign a new commit: + +```bash +git commit -s +``` + +This appends `Signed-off-by: Your Name ` to the commit +message. + +Repair commits you have already pushed (for example, when the DCO check +reports a missing sign-off). If you work from a fork, rebase onto the upstream +repository: + +```bash +git remote add upstream https://github.com/RL-Align/RL-Kernel.git # once, if missing +git fetch upstream +git rebase --signoff upstream/main +git push --force-with-lease +``` + +If you cloned the project repository directly, rebase onto `origin/main` +instead: + +```bash +git fetch origin +git rebase --signoff origin/main +git push --force-with-lease +``` + +The DCO check validates the **email address**: the `Signed-off-by:` email +must match the commit author email. Using `git commit -s` guarantees this, +since it signs with your configured `user.name` and `user.email`: + +```text +Author: Your Name +Signed-off-by: Your Name +``` + +Sign with a name that identifies you to the project — your real name, or a +name or handle linked to your GitHub account. The automated check compares +only the email; the name is what maintainers use to recognize who made the +certification. + +### Email matching + +If you contribute from several machines, keep `git config user.email` +consistent, and make sure the address is associated with your GitHub account +so commits are attributed to you and the DCO check passes. + +### Signing policies + +- `Co-authored-by:` trailers do not replace `Signed-off-by:`; each commit must + be signed off by its own author. +- Commits produced by bots or other automation must still be signed off by the + human who submits them. The submitting human is responsible for the change. +- AI-assisted contributions are welcome. The human submitter signs off and + remains responsible for the correctness and licensing of the contribution. + +## Pull requests opened before the DCO check was enabled + +For pull requests created before the DCO check became a required status check, +maintainers will leave a one-time comment pointing to this guide. Authors are +asked to add the missing sign-offs within a four-week grace period. Pull +requests that still fail the DCO check after the grace period may be closed, +with an invitation to reopen once the commits are signed. + +## Development guide + +For setting up a development environment, running tests, and documentation +conventions, see the [developer guide](./docs/contributing/README.md). diff --git a/DCO b/DCO new file mode 100644 index 00000000..b3485881 --- /dev/null +++ b/DCO @@ -0,0 +1,33 @@ +Developer Certificate of Origin +Version 1.1 + +Copyright (C) 2004, 2006 The Linux Foundation and its contributors. + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + +Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +(a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +(b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +(c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +(d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. diff --git a/README.md b/README.md index e2788c6a..4624488f 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,9 @@ RL_KERNEL_REQUIRE_EXT=1 python -m pip install --no-build-isolation -e . python -c "import rl_engine._C as _C; assert hasattr(_C, 'fused_logp'); print(_C.__file__)" ``` -### Contributions +### Contributing +Contributions are welcome! Before opening a pull request, please read [CONTRIBUTING.md](./CONTRIBUTING.md). Every commit must include a `Signed-off-by:` line, per the [Developer Certificate of Origin](./DCO). + Inspired by the kernel designs of vLLM and DeepSpeed. As an active contributor to the AI Infrastructure ecosystem, RL-Kernel aims to push the boundaries of RL efficiency. Target: Building the most efficient RLHF toolchain for the open-source community. diff --git a/docs/contributing/README.md b/docs/contributing/README.md index 4ee83710..00902494 100644 --- a/docs/contributing/README.md +++ b/docs/contributing/README.md @@ -3,6 +3,26 @@ This section collects general contribution material, design documents, and operator development notes for RL-Kernel. +## Sign your work (DCO) + +Every commit in a pull request must include a `Signed-off-by:` trailer +matching the commit author. The DCO check is enforced as a required status +check. + +```bash +# Sign a new commit: +git commit -s + +# Repair commits you have already pushed (fork workflow): +git fetch upstream +git rebase --signoff upstream/main +git push --force-with-lease +``` + +For email-matching rules, signing policies, and the transition policy for +older pull requests, see +[CONTRIBUTING.md](https://github.com/RL-Align/RL-Kernel/blob/main/CONTRIBUTING.md). + Before merging a new operator, include: - The implementation and dispatch registration. From 72148dd3e9b972e18f4bdd37508a6e8ecb7e758a Mon Sep 17 00:00:00 2001 From: Bruce Liu <2898118638@qq.com> Date: Sun, 30 Aug 2026 04:03:30 +0800 Subject: [PATCH 2/4] docs: clarify bot sign-off policy for DCO MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Review feedback on #359: the previous wording was mechanically unsatisfiable — the DCO check matches the sign-off email against the commit author email, so a human sign-off cannot validate a bot-authored commit. State the two viable paths (bot self-signoff with its own author email, or an app-level exemption) and keep the human-responsibility clause. Signed-off-by: Bruce Liu <2898118638@qq.com> --- CONTRIBUTING.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b8eebd54..9e12d90e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -72,8 +72,11 @@ so commits are attributed to you and the DCO check passes. - `Co-authored-by:` trailers do not replace `Signed-off-by:`; each commit must be signed off by its own author. -- Commits produced by bots or other automation must still be signed off by the - human who submits them. The submitting human is responsible for the change. +- Commits authored by bots or other automation must satisfy the email-match + rule like any other commit: the sign-off must carry the bot's own author + email, or the automation must be exempted in the DCO app configuration. + A human who submits or merges automation results remains responsible for + the change. - AI-assisted contributions are welcome. The human submitter signs off and remains responsible for the correctness and licensing of the contribution. From 3168a2841875e7050e3690e00d90a001fd886c40 Mon Sep 17 00:00:00 2001 From: Bruce Liu <2898118638@qq.com> Date: Sun, 30 Aug 2026 04:14:24 +0800 Subject: [PATCH 3/4] docs: reconcile blanket sign-off rule with bot exemption Review feedback on #359: the opening rule ("every commit") conflicted with the bot-exemption path introduced in c659cbf. Make the exemption an explicitly scoped single exception, referenced from both the opening rule and the bot policy bullet. Signed-off-by: Bruce Liu <2898118638@qq.com> --- CONTRIBUTING.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9e12d90e..9546a25e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,7 +14,9 @@ requests, documentation improvements, and code contributions are all welcome. Every commit in a pull request must carry a `Signed-off-by:` trailer, per the [Developer Certificate of Origin](./DCO) (DCO), version 1.1. The DCO check is -enforced as a required status check on every pull request. +enforced as a required status check on every pull request. The only exception +is automation explicitly exempted in the DCO app configuration (see the +signing policies below). By signing off, you certify that you wrote the change or otherwise have the right to submit it under the project's open source license. @@ -74,8 +76,9 @@ so commits are attributed to you and the DCO check passes. be signed off by its own author. - Commits authored by bots or other automation must satisfy the email-match rule like any other commit: the sign-off must carry the bot's own author - email, or the automation must be exempted in the DCO app configuration. - A human who submits or merges automation results remains responsible for + email. Automation that cannot sign its own commits may instead be exempted + in the DCO app configuration — the only exception to the rule above. A + human who submits or merges automation results remains responsible for the change. - AI-assisted contributions are welcome. The human submitter signs off and remains responsible for the correctness and licensing of the contribution. From 93186822a4ace1b18adb2c0ba3121f56cafbdea2 Mon Sep 17 00:00:00 2001 From: Bruce Liu <2898118638@qq.com> Date: Sun, 30 Aug 2026 15:55:28 +0800 Subject: [PATCH 4/4] docs: scope the sign-off guarantee and clarify email association Review feedback on #359: git commit -s and git rebase --signoff sign with the committer identity, so the sign-off only matches the author email when both identities coincide. Also correct the email-matching section: GitHub account association affects attribution only, not the DCO check itself. Signed-off-by: Bruce Liu <2898118638@qq.com> --- CONTRIBUTING.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9546a25e..af2ecfe9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -51,14 +51,23 @@ git push --force-with-lease ``` The DCO check validates the **email address**: the `Signed-off-by:` email -must match the commit author email. Using `git commit -s` guarantees this, -since it signs with your configured `user.name` and `user.email`: +must match the commit author email. `git commit -s` and +`git rebase --signoff` sign with your configured `user.name` and +`user.email` — the **committer** identity. The sign-off therefore matches +whenever you are also the commit's author, which is the normal case for +your own work: ```text Author: Your Name Signed-off-by: Your Name ``` +Your own sign-off cannot repair a commit authored by someone else — for +example one you cherry-picked or applied from a patch: the trailer records +your identity and will not match their author email. Such commits need a +sign-off from their own author. Automation that cannot carry a matching +sign-off falls under the exemption described in the signing policies below. + Sign with a name that identifies you to the project — your real name, or a name or handle linked to your GitHub account. The automated check compares only the email; the name is what maintainers use to recognize who made the @@ -67,8 +76,9 @@ certification. ### Email matching If you contribute from several machines, keep `git config user.email` -consistent, and make sure the address is associated with your GitHub account -so commits are attributed to you and the DCO check passes. +consistent, and use an address associated with your GitHub account so commits +are attributed to you. The DCO check itself only compares the commit author +email with the sign-off email. ### Signing policies