diff --git a/.github/dco-maintainers.txt b/.github/dco-maintainers.txt index fed5b60..c69cc72 100644 --- a/.github/dco-maintainers.txt +++ b/.github/dco-maintainers.txt @@ -1,20 +1,19 @@ # SPDX-License-Identifier: Apache-2.0 -# Maintainer identities for the DCO check (CONTRIBUTING section 11; P1-n). +# Sign-off identities for the DCO check (CONTRIBUTING section 11; P1-n, P1-p). # # This file is read from the trusted checkout of the target branch only, so a # pull request that edits it is still judged by the target branch's copy. One -# identity per line as " Name "; blank lines and lines starting +# identity per line as "signoff Name "; blank lines and lines starting # with # are ignored, and any other line fails the check instead of being # skipped. # -# signoff may sign the squash-merge message in the pull request body; a -# sign-off identity is also exempt from per-commit sign-offs. -# author maintainer-owned commit identity (agents commit with this one); -# exempt from per-commit sign-offs in same-repository pull requests, -# but not allowed to sign the body. -# -# The maintainer is the only signoff identity. Agents commit with the -# maintainer's local Git identity and add no Signed-off-by themselves; the -# maintainer adds the sign-off to the pull request body before merging. +# Only the signer is checked. Two identities may sign the pull request body: +# the maintainer, and the human collaborator the maintainer has authorised +# (Ankar). A signature is the signer's DCO 1.1 confirmation for that +# contribution. Agents add no Signed-off-by themselves and never sign the body. +# The body sign-off confirms the whole pull request, so commits on a branch of +# this repository need no per-commit trailer; a fork pull request still needs +# one per commit (CONTRIBUTING section 11). A sign-off only clears the merge +# check; which role may merge is unchanged. signoff inpac -author inPac +signoff Ankar diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index e340d7a..dd4aed1 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -39,6 +39,6 @@ Closes # - [ ] PARALLEL-1 审计没有未关闭的 `BLOCKER` / `MAJOR` - [ ] 已用 `/aclt-sync` 与最新 `main` 同步,本次重跑通过 - [ ] CI 通过 -- [ ] DCO:外部贡献的每个提交都已签署,维护者已在本地运行 `scripts/check-dco.py` 核验;维护者已在本正文最末尾另起一段加上自己的 `Signed-off-by`,`dco` 检查通过(CONTRIBUTING §11) +- [ ] DCO:外部贡献的每个提交都已签署,维护者已在本地运行 `scripts/check-dco.py` 核验;签名者(维护者,或签名名单中由维护者授权的人类协作者)已在本正文最末尾另起一段加上 `Signed-off-by`,`dco` 检查通过(CONTRIBUTING §11) - + diff --git a/.github/workflows/dco.yml b/.github/workflows/dco.yml index dc90946..5c81e67 100644 --- a/.github/workflows/dco.yml +++ b/.github/workflows/dco.yml @@ -15,11 +15,14 @@ name: DCO sign-off # GITHUB_OUTPUT. The title and the head branch name are not used at all. # # The squash merge takes its commit message from the pull request body, so the -# body must end with a Signed-off-by trailer from a maintainer sign-off -# identity before the merge; the edited activity type reruns the check when the -# maintainer adds it. The maintainer identities come from -# .github/dco-maintainers.txt inside the trusted checkout, so a pull request -# that edits that file is still judged by the target branch's copy. +# body must end with a Signed-off-by trailer from a sign-off identity in +# .github/dco-maintainers.txt before the merge; the edited activity type reruns +# the check when the signer adds it. The list holds the maintainer and the human +# collaborator the maintainer authorised, and it comes from inside the trusted +# checkout, so a pull request that edits that file is still judged by the target +# branch's copy. Only the signer is checked: commits on a branch of this +# repository are covered by the body sign-off, while a fork pull request still +# needs a matching sign-off on every commit. # # Until a fork pull request has shown on the public repository that this check # blocks merging when a sign-off is missing and passes on the fixed head, its diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ec4c39e..e4ef971 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -107,7 +107,7 @@ ACLt Protocol 当前处于 G0 规格化阶段。贡献的首要目标不是快 4. 为变更添加确定性测试、性质测试、模型检查或仿真; 5. 更新 `docs/06-research/claims-and-sources.md` 中的论断状态; 6. 运行全部现有检查; -7. 提交小而可审查的变更,每个提交按 §11 处理 DCO 签署(人类贡献者用 `git commit -s`;代理产生的提交不加签名,由维护者在合并前签署 PR 正文); +7. 提交小而可审查的变更,每个提交按 §11 处理 DCO 签署(人类贡献者可用 `git commit -s`,fork PR 的每个提交必须带与作者一致的签名;代理产生的提交不加签名,由维护者或签名名单中的协作者在合并前签署 PR 正文); 8. 在证据不足时保留 `OPEN/CANDIDATE`,不提前关闭问题。 9. 按 `docs/08-governance/audit-procedure.md` 执行连续性、结构与 Gate 回验。 @@ -191,13 +191,15 @@ Signed-off-by: 姓名 <邮箱> squash 合并的提交说明取自 PR 正文(`squash_merge_commit_message = PR_BODY`),所以签名写在 PR 正文里,并在合并前检查。 -- **合并前的签名检查(2026-11-18 起,P1-n):** `.github/workflows/dco.yml` 在 PR 阶段读取当前 PR 正文,用与推送检查相同的解析方式(`git interpret-trailers --parse`)判断正文最末尾的 trailer 区是否含 `Signed-off-by: 姓名 <邮箱>`,且签名身份属于 `.github/dco-maintainers.txt` 的 `signoff` 一类(初始只有 `inpac `)。`dco` 是必需检查,未通过时合并按钮不可用;维护者编辑正文加上签名后,`edited` 事件自动重跑检查。检查脚本与名单都取自目标分支的受信任检出,PR 修改名单不影响它自己的检查;PR 正文是不受信数据,只经环境变量传给脚本,不执行,也不写入 `GITHUB_ENV` 或 `GITHUB_OUTPUT`。 +- **合并前的签名检查(2026-11-18 起,P1-n;P1-p 起签名身份有两个):** `.github/workflows/dco.yml` 在 PR 阶段读取当前 PR 正文,用与推送检查相同的解析方式(`git interpret-trailers --parse`)判断正文最末尾的 trailer 区是否含 `Signed-off-by: 姓名 <邮箱>`,且签名身份属于 `.github/dco-maintainers.txt` 的 `signoff` 一类(目前为维护者 `inpac ` 与维护者授权的人类协作者 `Ankar `)。签名者可以是两者之一,签名即按 DCO 1.1 为该贡献作确认;代理仍不得签名。`dco` 是必需检查,未通过时合并按钮不可用;签名者编辑正文加上签名后,`edited` 事件自动重跑检查。检查脚本与名单都取自目标分支的受信任检出,PR 修改名单不影响它自己的检查;PR 正文是不受信数据,只经环境变量传给脚本,不执行,也不写入 `GITHUB_ENV` 或 `GITHUB_OUTPUT`。 - **签名写法:** 签名作为正文最末尾的独立一段,前面空一行。正文中只含 `---` 的行会让 Git 把之后的内容当作补丁区,写在其后的签名不会被识别(提交 `7232164` 即因此漏签);CRLF 与 LF 的判定相同。 -- **外部贡献**(来自 fork 的 PR):每个提交都要在提交说明末尾的 trailer 区带有 `Signed-off-by: 姓名 <邮箱>`,邮箱与提交作者一致,合并提交也不例外;写在正文中间的签署行不算数。用 `git commit -s` 即可自动添加。维护者合并前在 PR 正文末尾加上自己的签名,并在 `main` 的检出里独立核验提交签名与正文签名(命令见本节末;名单从脚本所在检出读取,PR 正文只作为数据载入,不要拼进 shell 命令)。**在仓库公开后用一次 fork PR 实测确认“缺签时合并受阻、补签后最新头部通过”之前,这项检查对外部 PR 只作提示**。 -- **本仓库分支上的工作**(维护者、人类协作者与 AI 代理):代理产生的提交不加 `Signed-off-by`,代理也不在 PR 正文中写签名。维护者在合并前于 PR 正文末尾加上自己的签名,该行随 squash 合并成为 `main` 上的提交说明。本仓库分支的 PR 中,作者不属于 `.github/dco-maintainers.txt` 维护者身份的提交(例如人类协作者或外部贡献者直接在本仓库分支提交)仍需与作者一致的签名;人类协作者用自己的身份 `git commit -s` 即可。 +- **外部贡献**(来自 fork 的 PR):每个提交都要在提交说明末尾的 trailer 区带有 `Signed-off-by: 姓名 <邮箱>`,邮箱与提交作者一致,合并提交也不例外;写在正文中间的签署行不算数。用 `git commit -s` 即可自动添加。签名者(维护者或签名名单中的协作者)在合并前于 PR 正文末尾加上签名,维护者再在 `main` 的检出里独立核验提交签名与正文签名(命令见本节末;名单从脚本所在检出读取,PR 正文只作为数据载入,不要拼进 shell 命令)。**在仓库公开后用一次 fork PR 实测确认“缺签时合并受阻、补签后最新头部通过”之前,这项检查对外部 PR 只作提示**。 +- **本仓库分支上的工作**(维护者、人类协作者与 AI 代理):只检查签名者,不逐提交检查作者与签名。代理产生的提交不加 `Signed-off-by`,代理也不在 PR 正文中写签名。签名者(维护者,或签名名单中由维护者授权的人类协作者)在合并前于 PR 正文末尾加上自己的签名,该行随 squash 合并成为 `main` 上的提交说明,并统一确认该 PR 中的全部提交。人类协作者可以在自己的提交上用 `git commit -s`,不强制。 - **推送兜底:** `dco.yml` 仍检查推送到 `main` 的提交是否带 `Signed-off-by`,用于发现合并时被改掉的签名。 - **起算点:** 自引入 `scripts/check-dco.py` 的提交之后开始检查,此前的历史提交不追溯,也不改写。 +签名只表示签署者按 DCO 1.1 为该贡献作确认,不改变合并权限:合并仍由维护者执行(PARALLEL-1 第 5.5 节),代理仍不得签名。 + 外部 PR 的本地核验(在 `main` 的检出里执行;`<编号>`、`<正文文件>`、`<目标分支提交>`、`` 由维护者填写): ```sh diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 273842a..3029cd5 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -29,7 +29,7 @@ ACLt Protocol 从构想到落地,大量工作是在 AI 助手协助下完成 - AI 工具不是法律意义上的作者或权利人,也不对仓库内容承担责任。仓库的法律责任由上述维护主体承担;内容的取舍与合并由维护者决定。 - Git 历史中只有部分提交保留了 co-author 署名(Claude、Copilot 与外部贡献者)。Codex 与 DeepSeek V4.1 Flash(经 dsh 代理)的工作没有独立署名,讨论与灵感也不会出现在提交中。因此提交统计和 GitHub contributors 图都不能反映各方实际贡献;自 PARALLEL-1 起,各条目的实现代理与审计代理记录在 PR 与审计评论中。 -- 自 2026-11-15 起采用 DCO(CONTRIBUTING §11)。AI 代理产生的提交由维护者在合并时签署,签署者对该贡献承担 DCO 规定的确认责任。 +- 自 2026-11-15 起采用 DCO(CONTRIBUTING §11)。AI 代理产生的提交由维护者或签名名单中的协作者在合并时签署,签署者对该贡献承担 DCO 规定的确认责任。 - Git 历史保留原始提交的作者与邮箱,不改写(维护者 2026-11-15 决定,[#128](https://github.com/ZeroMatrixTech/ACLt/issues/128));外部贡献者 Ankar 已同意随仓库公开。 - 无论由谁产出,证明、代码和结论都只以仓库中的测试、对拍、审计与双机证据为准,不因来源而获得或失去可信度。 - 新增贡献者,或某方角色有实质变化时,同步更新本文件。 diff --git a/README.md b/README.md index f89310b..1ef54aa 100644 --- a/README.md +++ b/README.md @@ -203,7 +203,7 @@ state3 仍是本地单机回归入口([说明](experiments/aclt-minimal-verifi 本仓库的全部工件采用 **Apache License 2.0**,SPDX 标识为 `Apache-2.0`,范围包括代码与参考实现、协议规范、项目文档、仓库内的研究文稿、测试向量与证据。代码许可于 2026-08-17 确定;2026-11-14 维护者决定规范、文档与研究文稿沿用同一许可。 -另有标注的第三方材料保留其原许可。目前包括 `tools/verification_profile/rust/unicode_data.rs`(由 Unicode 字符数据库生成,适用 `Unicode-3.0`,全文见同目录 `UNICODE-LICENSE.txt`)和 `docs/00-overview/fonts/` 下的五个字体子集(适用 `OFL-1.1`,随附三份 `OFL-*.txt` 原文)。Apache-2.0 第 6 条不授予名称或商标使用权;ACLt 是项目名称,不是商标,项目不声明商标;维护者已于 2026-11-16 决定放弃名称冲突检索并接受同名风险([#128](https://github.com/ZeroMatrixTech/ACLt/issues/128#issuecomment-6920084883)),名称、商标与兼容性声明不再作为公开发布的阻断项,见下节。贡献采用 Developer Certificate of Origin(DCO),不使用 CLA;外部 fork PR 的每个提交须带与作者一致的 `Signed-off-by`,内部代理提交由维护者在合并时签署,细则见 [CONTRIBUTING §11](CONTRIBUTING.md#11-许可)。安全漏洞的私密报告流程见 [SECURITY.md](SECURITY.md);利用细节不在公开渠道先行披露。 +另有标注的第三方材料保留其原许可。目前包括 `tools/verification_profile/rust/unicode_data.rs`(由 Unicode 字符数据库生成,适用 `Unicode-3.0`,全文见同目录 `UNICODE-LICENSE.txt`)和 `docs/00-overview/fonts/` 下的五个字体子集(适用 `OFL-1.1`,随附三份 `OFL-*.txt` 原文)。Apache-2.0 第 6 条不授予名称或商标使用权;ACLt 是项目名称,不是商标,项目不声明商标;维护者已于 2026-11-16 决定放弃名称冲突检索并接受同名风险([#128](https://github.com/ZeroMatrixTech/ACLt/issues/128#issuecomment-6920084883)),名称、商标与兼容性声明不再作为公开发布的阻断项,见下节。贡献采用 Developer Certificate of Origin(DCO),不使用 CLA;外部 fork PR 的每个提交须带与作者一致的 `Signed-off-by`,内部代理提交由维护者或签名名单中的协作者在合并时签署,细则见 [CONTRIBUTING §11](CONTRIBUTING.md#11-许可)。安全漏洞的私密报告流程见 [SECURITY.md](SECURITY.md);利用细节不在公开渠道先行披露。 仓库根目录 `LICENSE` 为 Apache License 2.0 英文全文;2026-11-06 起,文末附录示例中的版权行填写为 `Copyright 2026 北京凌矩阵科技有限责任公司`,许可条款正文未改。源码由文件头 SPDX 标识或 [REUSE.toml](REUSE.toml) 显式路径声明覆盖,由 `make check` 中的覆盖检查核对;第三方材料见 [docs/08-governance/third-party-materials.md](docs/08-governance/third-party-materials.md);Markdown 等文档由本节与根目录 `LICENSE` 覆盖。存在归属声明或第三方通知要求时再维护 `NOTICE`。官方许可文本与应用说明见 [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) 和 [Apache Licensing FAQ](https://www.apache.org/foundation/license-faq.html)。 diff --git a/SINGLEHOST-SHA256SUMS b/SINGLEHOST-SHA256SUMS index 4b0f0af..6bcb636 100644 --- a/SINGLEHOST-SHA256SUMS +++ b/SINGLEHOST-SHA256SUMS @@ -1,8 +1,8 @@ 5becf9549ae433806c07047455bf32ad95d0c6442ba0fa6f9b5cc1e7b73d8fcb .aclt-flow/.gitignore c36a374c48191f329d8999f8b22318bfbcca1914c5171fba60caf4d492b01a9c .aclt-flow/template.json 838adf8712ba6dcc8e48a9f95bb9bcbf9e92072791eb86cf3e087a019f8b9c0b .github/ISSUE_TEMPLATE/config.yml -808c7363dc47b651cab3978ca4b7e5ac53d72c4090907a662f402d357175f753 .github/dco-maintainers.txt -82e085b2fcf9c1100fdd44057d9cc8ac846d956db7c4da9b96537ecc618ea626 .github/workflows/dco.yml +38feb1b272e03957f1046407e0ffddf4d106d7c2dd9cabbfbd3d63603c5c7499 .github/dco-maintainers.txt +5f24f9dd725ae1093297280750d535c50b3da5ff0644fba763c709b21296b241 .github/workflows/dco.yml 9f0d896a0fb77795ff4632f7303f2d84e29399e325588a2cd063a250a8a5c8a6 .github/workflows/validate.yml f00bdef57c6cdd739a44f10c50427351e917076ea41c17586f10e102a23de2f2 .gitignore d72675ebcd951cfc0621ca2f5ce4e45423d2e46cc7287f877e02225506b5383c DELIVERY-SCOPE.json @@ -392,7 +392,7 @@ a530780f7345500677a990a3d0575f65b2a03dcfcdf560ed7fb04cc698e0fe15 scripts/check- c03ed31936b34cddb1f5ff5645d437ceb37bb51ec988d2b6191812b6f1731db6 scripts/check-claim-codec.py d27db0943ae28698408550d1e4e34f3f0b2e319f63cb1db3aa40cfd85754a028 scripts/check-commitment-bindings.py 73b94bf197b2813a92103bf7114f93bedfbe635d522157a50197d09a0ba3f1fc scripts/check-creation-bindings.py -f045d4d18079dcb448d4ab1c69ae8198379a1912b4a6fde47b858463a72c8592 scripts/check-dco.py +bba78a46d85f5499543db2c9de265adfed3d49b4adb0bc0264050f433311b444 scripts/check-dco.py 9a963b5df26f853a6c903890488b167b0fcd487969b41c490383289af963bd63 scripts/check-decision-replay.py 1d5dffcbd4e7100ac869883ebcbfae586507c60428a4df697479c7129a4ac9bd scripts/check-deployment-revocation.py 01f6e85ee8300cdaf5c55f7b27ba6891137910d5c9612c49857c2db321b2e890 scripts/check-environment.py @@ -454,8 +454,8 @@ a8c57b9dbd3cdb205a97d90cb535a8a167f744d621de039169a70af7cee2160f tests/formal_m 5e19ecd77a8f4160782160333a157438823bafc9ed11d822a92b1b030cd19502 tests/formal_migration/vectors.json 7f6e90e896bc68a61903fef635b4b825a062b43797593e1d6acee28114fc7ac5 tests/migration_evidence/test_evidence.py 4f9b2235c0cdd889490baf2823601f3196aa33d41d6b85488decf83a4ce19888 tests/migration_evidence/test_public_archives.py -36f6f034c51e920ef80d9bf6b99a6054dab43bc20e02e037cc6f7779c482ca53 tests/repository_hardening/dco_pr_simulation.py -ea15cf5f70baffcf62ec54164e2fe4b5f35cbc602c12c13d77ebe55794ee55b2 tests/repository_hardening/test_check_dco.py +967e8669c670dc38d4deefd2128917e3746686c9fa486768e06f69177e70a1d4 tests/repository_hardening/dco_pr_simulation.py +9775fc0fc4973aa45bae69839881d6d97ed76e90891a258426ccf873464839c9 tests/repository_hardening/test_check_dco.py 34ed7a109f77efeadf0190ae04cd07e4aa47a1523ca70548a1f16330c789c3a9 tests/repository_hardening/test_git_sources.py 03ff67ffbd4ff2d63e5fd1f18da6e884c8293812191f0c29e49e5a425523a135 tests/repository_hardening/test_hardening.py cdd63154a0bad204e185f86b94e5ba9caea97e711173896f4e36a101fd335d13 tests/verification_model/closed_form_oracle.py diff --git a/docs/07-roadmap/current-status.md b/docs/07-roadmap/current-status.md index 48a5933..1368b6b 100644 --- a/docs/07-roadmap/current-status.md +++ b/docs/07-roadmap/current-status.md @@ -205,6 +205,7 @@ ACLt Protocol v0.5 已完成最小语义基线和文档骨架:两类不可约 | 日期 | 基线 | 变化 | 证据/文档 | 影响的 Gate | |---|---|---|---|---| +| 2026-11-18 | v0.5 | P1-p:`dco` 只检查签名者——名单只登记 `signoff` 身份(`inpac ` 与新增的 `Ankar `),删除 `author` 角色与全部 `author` 行,出现未知角色仍然失败;本仓库分支的 PR 不再逐提交检查作者与签名,正文中签名者的签名统一确认整个 PR,fork PR 的逐提交检查与推送到 `main` 的兜底检查不变;签名按 DCO 1.1 为该贡献作确认,代理仍不得签名,合并仍由维护者执行。名单与检查脚本都只从目标分支的受信任检出读取,新名单在合并后才对 `dco` 生效 | `scripts/check-dco.py`、`.github/dco-maintainers.txt`、`.github/workflows/dco.yml`、`CONTRIBUTING.md` §11、[PARALLEL-1](../08-governance/parallel-workflow.md)、`README.md`、`CONTRIBUTORS.md`、[公开仓库设置](../08-governance/public-repository-settings.md)、`tests/repository_hardening/test_check_dco.py`、`tests/repository_hardening/dco_pr_simulation.py`、#202 | 不变 | | 2026-11-18 | v0.5 | P1-o:把发布后定下的协作规则写进 PARALLEL-1——新增 §2 的 2026-11-18 现状(公开仓库、经典分支保护与规则集“Protect main”的读回)、人类协作者角色与 §5.6 的建模分工、worktree 移到仓库外、合并权限为流程约定、同步推送后需重新批准;§8 第 5 步标注完成 | [PARALLEL-1](../08-governance/parallel-workflow.md)、`CONTRIBUTING.md`、[公开仓库设置](../08-governance/public-repository-settings.md)、#198 | 不变 | | 2026-11-18 | v0.5 | P1-n:`dco` 改为在 PR 阶段检查正文末尾的维护者签名——正文即 squash 合并说明,签名身份取自目标分支受信任检出中的 `.github/dco-maintainers.txt`(初始只有 `inpac `);新增 `edited` 触发重跑;本仓库分支中非维护者作者的提交仍需与作者一致的签名,fork 规则与推送兜底检查不变 | `.github/workflows/dco.yml`、`scripts/check-dco.py`、`CONTRIBUTING.md` §11、[PARALLEL-1](../08-governance/parallel-workflow.md)、[公开仓库设置](../08-governance/public-repository-settings.md)、#195 | 不变 | | 2026-11-18 | v0.5 | B0-a(#191):先判定归属再把 SV-04 的缺口迁到负责规则——Direct `predicate_signature` 线上编码冻结归 SV-118、正式 import 冻结归 SV-62,两项写进其 gap 后从 SV-04 移除;SV-04 由 partial 提升为 implemented,119 项 Type A 变为 81 implemented / 35 partial / 3 not implemented;新增判别测试覆盖四方法 12 种参数块替换,未修改 validator 行为 | [盘点报告](../testing/P0-1B-INVENTORY-20261117.md)、#191 | 不变 | diff --git a/docs/08-governance/parallel-workflow.md b/docs/08-governance/parallel-workflow.md index 8f10208..f6f7c98 100644 --- a/docs/08-governance/parallel-workflow.md +++ b/docs/08-governance/parallel-workflow.md @@ -53,7 +53,7 @@ | 维护者 | — | 批准计划卡;在 GitHub 上合并 PR;接受残余风险;修改仓库设置;关闭 `theory-gap` Issue | — | | 调度会话 | 1 个,主检出,停在 `main` | 维护在途条目清单;判定能否并行;为条目和审计开会话;排定合并顺序与实验时段;合并后通知其他条目 | 不写功能代码,不推送 `main`,不合并 | | 条目会话 | 每个条目 1 个(实现代理可以有多个,按维护者指派分工、彼此地位相同),独立 worktree 与分支 | 用 `/aclt-plan` 出计划卡;批准后实现、验证、推送、开 PR;处理审计发现;用 `/aclt-sync` 做合并前同步 | 不改计划卡文件集之外的文件(先改卡),不审计自己的条目 | -| 人类协作者 | 不限,由维护者指派 | 实现维护者指派的条目:在自己的条目分支上用 `git commit -s` 签署提交、推送并开 PR;评审并批准他人的 PR(计入必需批准的是对仓库有写权限的成员的批准);对 `theory-gap` 做数学建模(例:TG-6 #123),结果经维护者审阅 | 不合并 PR;不关闭 `theory-gap` Issue;不审计自己实现的条目(仍由 Codex 审计);不改计划卡文件集之外的文件 | +| 人类协作者 | 不限,由维护者指派 | 实现维护者指派的条目:在自己的条目分支上提交(可用 `git commit -s`,不强制)、推送并开 PR;评审并批准他人的 PR(计入必需批准的是对仓库有写权限的成员的批准);对 `theory-gap` 做数学建模(例:TG-6 #123),结果经维护者审阅 | 不合并 PR;不关闭 `theory-gap` Issue;不审计自己实现的条目(仍由 Codex 审计);不改计划卡文件集之外的文件 | | 审计会话 | 每次审计 1 个新会话,只读 | 用 `/aclt-audit` 按计划卡和仓库规则审计 PR,本次复跑检查,在 PR 上发表结论 | 不修改、提交或推送仓库内容,不继承条目会话的上下文 | 一个工作目录同一时间只由一个写入会话操作(ENV-1 §6)。 @@ -138,7 +138,7 @@ ACLt 检出内只允许出现被跟踪的文件,以及 `make` 产生的构建 - **文件范围:** 只修改计划卡文件集内的文件。需要扩大时,先更新 Issue 中的计划卡,再通知调度会话,由调度会话重新判定并行冲突。 - **热点文件:** 对热点文件的修改集中在最后一个提交里,便于合并前同步时单独处理。 - **测试:** 测试结果必须来自本次执行,写明命令、退出码和基线。不得用历史通过记录代替。 -- **提交:** 提交说明使用 CONTRIBUTING §6 模板,并逐个添加文件。代理不在提交或 PR 正文中写 `Signed-off-by`;人类协作者用 `git commit -s` 以自己的身份签署提交。维护者在合并前把签名写进 PR 正文最末尾,`dco` 按正文末尾的 trailer 区判定(CONTRIBUTING §11)。 +- **提交:** 提交说明使用 CONTRIBUTING §6 模板,并逐个添加文件。代理不在提交或 PR 正文中写 `Signed-off-by`;人类协作者可以 `git commit -s` 以自己的身份签署提交,不强制(本仓库分支的 PR 由正文签名统一确认)。合并前由签名者(维护者,或签名名单中由维护者授权的人类协作者)把签名写进 PR 正文最末尾,`dco` 按正文末尾的 trailer 区判定(CONTRIBUTING §11)。 - **证据标签:** 证据摘要钉住的提交,在推送前打标签(第 6.3 节)。 - **PR:** 推送后创建 draft PR,正文写 `Closes #`,并通知调度会话。 @@ -166,7 +166,7 @@ ACLt 检出内只允许出现被跟踪的文件,以及 `make` 产生的构建 ### 5.5 合并与收尾 -维护者把 `Signed-off-by` 另起一段加在 PR 正文最末尾,等 `dco` 检查重跑通过后,再在 GitHub 上 squash 合并——正文即合并提交说明(DCO,CONTRIBUTING §11)。正文中只含 `---` 的行会让其后的内容不被识别为 trailer,签名因此不算数。合并前确认必需检查通过、分支与最新 `main` 同步,且当前头部有作者以外成员的批准;同步推送过的分支需要重新批准(第 5.4 节)。合并由维护者执行,这是流程约定(第 4 节)。之后由调度会话收尾: +签名者(维护者,或签名名单中由维护者授权的人类协作者)把 `Signed-off-by` 另起一段加在 PR 正文最末尾,等 `dco` 检查重跑通过后,再由维护者在 GitHub 上 squash 合并——正文即合并提交说明(DCO,CONTRIBUTING §11)。正文中只含 `---` 的行会让其后的内容不被识别为 trailer,签名因此不算数。合并前确认必需检查通过、分支与最新 `main` 同步,且当前头部有作者以外成员的批准;同步推送过的分支需要重新批准(第 5.4 节)。合并由维护者执行,这是流程约定(第 4 节)。之后由调度会话收尾: 1. 通知其他在途条目 `main` 已经前进。它们在轮到自己合并时再同步,不需要立即同步。 2. 确认 Issue 已由 `Closes` 关闭,证据标签已在远端。 diff --git a/docs/08-governance/public-repository-settings.md b/docs/08-governance/public-repository-settings.md index e26c5e8..c88141a 100644 --- a/docs/08-governance/public-repository-settings.md +++ b/docs/08-governance/public-repository-settings.md @@ -3,7 +3,7 @@ The repository is public. The maintainer applied these settings, and this file records the GitHub read-back on 2026-11-17, updated with the 2026-11-18 re-read of the classic branch protection and the ruleset. [Release audit](https://github.com/ZeroMatrixTech/ACLt/pull/135) · [Stage decision](https://github.com/ZeroMatrixTech/ACLt/issues/128#issuecomment-6892853713) · [Ruleset "Protect main"](https://github.com/ZeroMatrixTech/ACLt/rules/20949967) - [x] Protect `main`: the ruleset "Protect main" (id 20949967, target branch, includes the default branch, enforcement active) has been active since the repository became public. On 2026-11-16 it was temporarily set to zero approvals with administrator bypass; from 2026-11-17 it requires one approving review, requires a pull request (`pull_request`), blocks deletion (`deletion`) and blocks force pushes (`non_fast_forward`); it also dismisses stale approvals on push (`dismiss_stale_reviews_on_push` true), requires the last push to be approved by someone other than the pusher (`require_last_push_approval` true) and requires review threads to be resolved (`required_review_thread_resolution` true); `bypass_actors` is empty and `current_user_can_bypass` is `never`, so no standing bypasser exists; it also requires an additional approval for unattributed changes (`require_extra_approval_for_unattributed_changes` true). Classic branch protection on `main` requires the `local-validation` and `dco` checks, requires an up-to-date branch (`strict` true), applies to administrators (`enforce_admins` true), and forbids force pushes and deletion (`allow_force_pushes` false, `allow_deletions` false). Read back on 2026-11-17 and again on 2026-11-18 with the same values; the classic protection itself requires zero approvals, so the one-approval requirement comes from the ruleset, and the squash-merge message is taken from the pull request body (`squash_merge_commit_message` `PR_BODY`, title `PR_TITLE`). -- [x] Keep `dco` as a required check on `main`: on [#181](https://github.com/ZeroMatrixTech/ACLt/pull/181) the unsigned head `662eff1` failed `dco` while `local-validation` passed and no review was required at the time, and merge was BLOCKED; with the trailer added, head `71acb3e` passed `dco` and `local-validation` and the merge state was CLEAN. The pull request was closed without merging. That fork belonged to the maintainer's account: it exercises the missing-trailer block, but not the external-contributor workflow approval or a non-administrator attempt to bypass the ruleset. The maintainer decided on 2026-11-18 not to verify those two on a real external pull request either, so they remain unverified and are accepted as a residual item in #128; organization members do not count as external contributors. Since 2026-11-18 the check also gates the merge on the pull request body (P1-n, [#195](https://github.com/ZeroMatrixTech/ACLt/issues/195)): the body is the squash-merge commit message, so its final trailer block must carry a `Signed-off-by` from a maintainer identity in `.github/dco-maintainers.txt`, read from the target branch's trusted checkout, and the `edited` activity type reruns the check when the maintainer adds it. The maintainer decided on 2026-11-18 not to run the end-to-end verification on a throwaway pull request (an unsigned body blocks the merge; editing the body reruns the check and passes), so that behaviour remains unverified online and is recorded as a residual item in #195; the merge-before check rests on the unit tests and the local event simulation from the same change. +- [x] Keep `dco` as a required check on `main`: on [#181](https://github.com/ZeroMatrixTech/ACLt/pull/181) the unsigned head `662eff1` failed `dco` while `local-validation` passed and no review was required at the time, and merge was BLOCKED; with the trailer added, head `71acb3e` passed `dco` and `local-validation` and the merge state was CLEAN. The pull request was closed without merging. That fork belonged to the maintainer's account: it exercises the missing-trailer block, but not the external-contributor workflow approval or a non-administrator attempt to bypass the ruleset. The maintainer decided on 2026-11-18 not to verify those two on a real external pull request either, so they remain unverified and are accepted as a residual item in #128; organization members do not count as external contributors. Since 2026-11-18 the check also gates the merge on the pull request body (P1-n, [#195](https://github.com/ZeroMatrixTech/ACLt/issues/195)): the body is the squash-merge commit message, so its final trailer block must carry a `Signed-off-by` from a sign-off identity in `.github/dco-maintainers.txt` (the maintainer and, since P1-p, the human collaborator the maintainer authorised), read from the target branch's trusted checkout, and the `edited` activity type reruns the check when the signer adds it. The maintainer decided on 2026-11-18 not to run the end-to-end verification on a throwaway pull request (an unsigned body blocks the merge; editing the body reruns the check and passes), so that behaviour remains unverified online and is recorded as a residual item in #195; the merge-before check rests on the unit tests and the local event simulation from the same change. Since P1-p the check inspects only the signer: commits on a branch of this repository no longer need per-commit sign-offs, because the body sign-off confirms the whole pull request, while fork pull requests keep the per-commit rule. - [x] Restrict Actions to an explicit allowlist and require full commit SHA pins: `allowed_actions` is `selected` with `patterns_allowed` `["actions/checkout@*"]`, `sha_pinning_required` true, `github_owned_allowed` false and `verified_allowed` false (read back on 2026-11-17). The workflows use only `actions/checkout`, pinned to a full commit SHA, and the `local-validation` and `dco` checks produced runs on [#181](https://github.com/ZeroMatrixTech/ACLt/pull/181). - [x] Require approval for workflows from outside contributors' fork pull requests: `approval_policy` is `all_external_contributors` (read back on 2026-11-17). The setting is enabled; the maintainer decided on 2026-11-18 not to run the end-to-end verification on a real external pull request, so it remains unverified and is accepted as a residual item in #128. - [x] Enable secret scanning, push protection and private vulnerability reporting: all three read back as enabled on 2026-11-17. diff --git a/scripts/check-dco.py b/scripts/check-dco.py index 9b40719..ebb8a52 100755 --- a/scripts/check-dco.py +++ b/scripts/check-dco.py @@ -2,22 +2,21 @@ # SPDX-License-Identifier: Apache-2.0 """Check Developer Certificate of Origin sign-offs (CONTRIBUTING section 11). -Pull requests (`pr` mode) are checked twice: +Only the signer is checked; commit authors on a branch of this repository are +not. Pull requests (`pr` mode) are checked in two parts: * The pull request body must end with a trailer block carrying a - `Signed-off-by` whose e-mail is a maintainer sign-off identity. The + `Signed-off-by` whose e-mail is a sign-off identity in the list. The squash merge takes its commit message from the body (`squash_merge_commit_message = PR_BODY`), so this is the pre-merge gate - for the commit that lands on `main`. The body is untrusted data: the - workflow hands it over in an environment variable, and this script only ever - parses it as text. + for the commit that lands on `main`, and it confirms the whole pull + request. The body is untrusted data: the workflow hands it over in an + environment variable, and this script only ever parses it as text. * Commits on a pull request from a fork, merge commits included, must carry a - `Signed-off-by` trailer whose e-mail matches the commit author. Commits on - a pull request from a branch of this repository are written by agents and - the maintainer; a commit whose author is a maintainer identity needs no - per-commit sign-off, and any other author (for example an outside - contributor pushing to a branch of this repository) is checked like a fork - commit. + `Signed-off-by` trailer whose e-mail matches the commit author. That is + the outside contributor's own DCO confirmation. Commits on a branch of this + repository (agents and the maintainer) are not inspected per commit: the + body sign-off covers them whatever their authors are. `push` mode keeps the fallback check: every first-parent commit pushed to `main` must carry at least one `Signed-off-by` trailer, starting with the @@ -29,7 +28,7 @@ patch section, so anything after it is not a trailer, and CRLF is normalised to LF first so the same text is judged the same way. -The maintainer identities live in `.github/dco-maintainers.txt` next to the +The sign-off identities live in `.github/dco-maintainers.txt` next to the checkout that holds this script. The workflow runs the script from the trusted checkout of the target branch, so a pull request cannot change the list that judges it. Nothing from the pull request is executed. @@ -45,7 +44,7 @@ MAINTAINERS = ".github/dco-maintainers.txt" SIGNOFF = re.compile(r"^Signed-off-by:\s*(.+?)\s*<([^<>\s]+@[^<>\s]+)>\s*$", re.MULTILINE) IDENTITY = re.compile(r"^(?P.+?)\s*<(?P[^<>\s]+@[^<>\s]+)>$") -ROLES = {"signoff", "author"} +ROLES = {"signoff"} REPO = "." ZERO = "0" * 40 @@ -87,11 +86,10 @@ def adopted(commit): class Maintainers: - """Sign-off identities and the maintainer-owned commit identities.""" + """The sign-off identities that may sign a pull request body.""" - def __init__(self, signoff, authors): + def __init__(self, signoff): self.signoff = signoff - self.authors = authors def load_maintainers(): @@ -100,26 +98,23 @@ def load_maintainers(): try: lines = path.read_text(encoding="utf-8").splitlines() except OSError as error: - raise SystemExit(f"cannot read the maintainer list {MAINTAINERS}: {error.strerror}") + raise SystemExit(f"cannot read the sign-off list {MAINTAINERS}: {error.strerror}") signoff = {} - authors = set() for number, raw in enumerate(lines, 1): line = raw.strip() if not line or line.startswith("#"): continue role, _, rest = line.partition(" ") if role not in ROLES: - raise SystemExit(f"{MAINTAINERS}:{number}: unknown role {role!r}; expected signoff or author") + raise SystemExit(f"{MAINTAINERS}:{number}: unknown role {role!r}; expected signoff") match = IDENTITY.match(rest.strip()) if not match: raise SystemExit(f"{MAINTAINERS}:{number}: expected 'name ' after the role") email = match.group("email").lower() - authors.add(email) - if role == "signoff": - signoff[email] = f"{match.group('name')} <{match.group('email')}>" + signoff[email] = f"{match.group('name')} <{match.group('email')}>" if not signoff: raise SystemExit(f"{MAINTAINERS}: no signoff identity, so no merge could be signed") - return Maintainers(signoff, authors) + return Maintainers(signoff) def check_body(body, maintainers): @@ -140,47 +135,43 @@ def check_body(body, maintainers): matched = [(name, email) for name, email in identities if email in maintainers.signoff] if not matched: signed = ", ".join(f"{name} <{email}>" for name, email in identities) - print(f"FAIL: the pull request body is signed off by {signed}, which is not a maintainer " - f"sign-off identity in {MAINTAINERS}") + print(f"FAIL: the pull request body is signed off by {signed}, which is not a sign-off " + f"identity in {MAINTAINERS}") return False name, email = matched[-1] print(f"PASS: the pull request body is signed off by {name} <{email}>") return True -def check_commits(base, head, fork, maintainers): +def check_commits(base, head, fork): + """Fork pull requests sign every commit; repository branches do not. + + The body sign-off is the DCO confirmation for the whole pull request, so a + branch of this repository needs no per-commit trailer from any author. A + fork commit is the outside contributor's own confirmation and keeps the + per-commit rule, merge commits included. + """ + if not fork: + print("PASS: same-repository pull request; the body sign-off covers its commits") + return True commits = git("rev-list", f"{base}..{head}").stdout.split() - checked = 0 failures = [] for commit in commits: author = author_email(commit) - if not fork and author in maintainers.authors: - continue - checked += 1 if author not in signoffs(commit): failures.append((commit, author)) for commit, author in failures: - if fork: - print(f"FAIL: {commit[:12]} is authored by {author} and has no Signed-off-by trailer " - "matching that author (use git commit -s)") - else: - print(f"FAIL: {commit[:12]} is authored by {author}, which is not a maintainer identity, " - "and has no Signed-off-by trailer matching that author (use git commit -s)") + print(f"FAIL: {commit[:12]} is authored by {author} and has no Signed-off-by trailer " + "matching that author (use git commit -s)") if failures: return False - if fork: - print(f"PASS: {checked} fork commit(s) signed off by their authors") - elif checked: - print(f"PASS: {checked} commit(s) by authors outside the maintainer identities are signed " - "off by their authors") - else: - print("PASS: every commit is authored by a maintainer identity; no per-commit sign-off is required") + print(f"PASS: {len(commits)} fork commit(s) signed off by their authors") return True def check_pr(base, head, fork, body, maintainers): body_ok = check_body(body, maintainers) - commits_ok = check_commits(base, head, fork, maintainers) + commits_ok = check_commits(base, head, fork) return 0 if body_ok and commits_ok else 1 @@ -198,7 +189,8 @@ def check_push(before, after): if not signoffs(commit): failures.append(commit) for commit in failures: - print(f"FAIL: {commit[:12]} on main has no Signed-off-by trailer; the maintainer signs squash merges") + print(f"FAIL: {commit[:12]} on main has no Signed-off-by trailer; the signer adds it to " + "the pull request body (CONTRIBUTING section 11)") if failures: return 1 print(f"PASS: {checked} commit(s) after the DCO adoption point carry a sign-off") diff --git a/tests/repository_hardening/dco_pr_simulation.py b/tests/repository_hardening/dco_pr_simulation.py index 3fad084..1f8d782 100644 --- a/tests/repository_hardening/dco_pr_simulation.py +++ b/tests/repository_hardening/dco_pr_simulation.py @@ -71,9 +71,10 @@ def scenarios(agent_head, outside_head): "false", agent_head, 1, "patch section") yield ("CRLF body", "Change: x\r\n\r\n" + SIGNOFF + "\r\n", "false", agent_head, 0, "signed off by") yield ("signer outside the list", "Change: x\n\n" + UNKNOWN, "false", agent_head, 1, - "not a maintainer sign-off identity") + "not a sign-off identity") yield ("empty body", "", "false", agent_head, 1, "body is empty") - yield ("non-maintainer commit unsigned", signed, "false", outside_head, 1, AUTHOR[1]) + yield ("unsigned commit on a repository branch", signed, "false", outside_head, 0, + "same-repository pull request") yield ("fork commit unsigned", signed, "true", agent_head, 1, "Signed-off-by trailer matching") diff --git a/tests/repository_hardening/test_check_dco.py b/tests/repository_hardening/test_check_dco.py index 0205c26..5bbc8ae 100644 --- a/tests/repository_hardening/test_check_dco.py +++ b/tests/repository_hardening/test_check_dco.py @@ -18,6 +18,7 @@ AUTHOR = ("Example Author", "author@example.invalid") AGENT = ("inPac", "tenneidp@gmail.com") SIGNOFF = "Signed-off-by: inpac " +SIGNOFF_ANKAR = "Signed-off-by: Ankar " UNKNOWN_SIGNOFF = "Signed-off-by: Someone Else " @@ -151,7 +152,7 @@ def test_signer_outside_the_list_fails(self): base, head = self.agent_pr() result = self.pr(base, head, "false", "Change: x\n\n" + UNKNOWN_SIGNOFF) self.assertEqual(result.returncode, 1) - self.assertIn("not a maintainer sign-off identity", result.stdout) + self.assertIn("not a sign-off identity", result.stdout) def test_empty_body_fails(self): base, head = self.agent_pr() @@ -184,8 +185,7 @@ def test_trusted_list_judges_the_pull_request(self): self.assertEqual(with_real_list.returncode, 1) # The same body passes once the trusted checkout lists the signer, which # proves the verdict follows the trusted list rather than the PR copy. - trusted = self.trusted_checkout("signoff attacker \n" - "author inPac \n") + trusted = self.trusted_checkout("signoff attacker \n") with_pr_list = self.pr(base, head, "false", body, script=trusted) self.assertEqual(with_pr_list.returncode, 0, with_pr_list.stdout) @@ -216,60 +216,89 @@ def test_missing_list_fails_closed(self): trusted = self.trusted_checkout(with_list=False) result = self.pr(base, head, "false", "Change: x\n\n" + SIGNOFF, script=trusted) self.assertNotEqual(result.returncode, 0) - self.assertIn("cannot read the maintainer list", result.stderr) + self.assertIn("cannot read the sign-off list", result.stderr) def test_list_without_a_signoff_identity_fails_closed(self): base = self.commit("a", "base", author=AGENT) head = self.commit("b", "agent", author=AGENT) - trusted = self.trusted_checkout("author inPac \n") + trusted = self.trusted_checkout("# no identities yet\n") result = self.pr(base, head, "false", "Change: x\n\n" + SIGNOFF, script=trusted) self.assertNotEqual(result.returncode, 0) self.assertIn("no signoff identity", result.stderr) + def test_author_role_is_unknown(self): + base = self.commit("a", "base", author=AGENT) + head = self.commit("b", "agent work", author=AGENT) + trusted = self.trusted_checkout("signoff inpac \n" + "author inPac \n") + result = self.pr(base, head, "false", "Change: x\n\n" + SIGNOFF, script=trusted) + self.assertNotEqual(result.returncode, 0) + self.assertIn("unknown role 'author'; expected signoff", result.stderr) + def test_repository_list_keeps_the_initial_identities(self): text = MAINTAINERS.read_text() self.assertIn("signoff inpac ", text) - self.assertIn("author inPac ", text) + def test_repository_list_carries_the_authorised_collaborator(self): + text = MAINTAINERS.read_text() + self.assertIn("signoff Ankar ", text) -class SameRepositoryCommitTests(DcoTestCase): - def body(self): - return "Change: x\n\n" + SIGNOFF + def test_repository_list_registers_signers_only(self): + entries = [line for line in MAINTAINERS.read_text().splitlines() + if line.strip() and not line.strip().startswith("#")] + self.assertEqual(len(entries), 2) + for line in entries: + self.assertTrue(line.startswith("signoff "), line) - def test_maintainer_identity_commits_need_no_signoff(self): + def test_two_signoff_identities_either_may_sign_the_body(self): base = self.commit("a", "base", author=AGENT) head = self.commit("b", "agent work", author=AGENT) - result = self.pr(base, head, "false", self.body()) - self.assertEqual(result.returncode, 0, result.stdout) - self.assertIn("authored by a maintainer identity", result.stdout) + trusted = self.trusted_checkout( + "signoff inpac \n" + "signoff Ankar \n") + for signoff, signer in ((SIGNOFF, "inpac "), + (SIGNOFF_ANKAR, "Ankar ")): + with self.subTest(signer=signer): + result = self.pr(base, head, "false", "Change: x\n\n" + signoff, script=trusted) + self.assertEqual(result.returncode, 0, result.stdout) + self.assertIn("signed off by " + signer, result.stdout) - def test_author_match_is_case_insensitive(self): - base = self.commit("a", "base", author=AGENT) - head = self.commit("b", "agent work", author=("InPac", "Tenneidp@Gmail.com")) - self.assertEqual(self.pr(base, head, "false", self.body()).returncode, 0) - def test_other_author_commit_needs_a_matching_signoff(self): +class SameRepositoryCommitTests(DcoTestCase): + """A branch pull request is confirmed by the body sign-off; commits are not + inspected, whatever their authors are.""" + + def body(self, signoff=SIGNOFF): + return "Change: x\n\n" + signoff + + def test_commits_of_any_author_need_no_per_commit_signoff(self): base = self.commit("a", "base", author=AGENT) - unsigned = self.commit("b", "outside work", author=AUTHOR) - result = self.pr(base, unsigned, "false", self.body()) - self.assertEqual(result.returncode, 1) - self.assertIn(AUTHOR[1], result.stdout) - signed = self.commit("c", "outside work signed\n\nSigned-off-by: {0} <{1}>".format(*AUTHOR), - author=AUTHOR) - result = self.pr(unsigned, signed, "false", self.body()) - self.assertEqual(result.returncode, 0, result.stdout) + head = self.commit("b", "agent work", author=("dsh", "dsh@localhost")) + for signoff in (SIGNOFF, SIGNOFF_ANKAR): + with self.subTest(signoff=signoff): + result = self.pr(base, head, "false", self.body(signoff)) + self.assertEqual(result.returncode, 0, result.stdout) + self.assertIn("same-repository pull request", result.stdout) + + def test_commit_by_an_outside_author_passes(self): + base = self.commit("a", "base", author=AGENT) + head = self.commit("b", "outside work", author=AUTHOR) + self.assertEqual(self.pr(base, head, "false", self.body()).returncode, 0) - def test_merge_commit_by_a_non_maintainer_author_needs_a_signoff(self): + def test_merge_commit_by_an_outside_author_passes(self): base = self.commit("a", "base", author=AGENT) self.git("checkout", "-q", "-b", "side") - self.commit("s", "side", author=AUTHOR) + self.commit("s", "side", author=("dsh", "dsh@localhost")) self.git("checkout", "-q", "main") self.commit("m", "main", author=AGENT) self.git("merge", "-q", "--no-ff", "-m", "merge without sign-off", "side", author=AUTHOR) merge = self.git("rev-parse", "HEAD") - result = self.pr(base, merge, "false", self.body()) - self.assertEqual(result.returncode, 1) - self.assertIn(merge[:12], result.stdout) + self.assertEqual(self.pr(base, merge, "false", self.body()).returncode, 0) + + def test_an_unsigned_body_still_fails(self): + base = self.commit("a", "base", author=AGENT) + head = self.commit("b", "agent work", author=("dsh", "dsh@localhost")) + self.assertEqual(self.pr(base, head, "false", "Change: x").returncode, 1) class ForkCommitTests(DcoTestCase): @@ -340,8 +369,8 @@ def test_push_checks_only_commits_after_adoption(self): self.assertIn(unsigned[:12], result.stdout) def test_body_check_and_push_check_parse_the_same_text(self): - # Only the parsing is shared: the body must also be signed by a - # maintainer identity, while the push fallback accepts any sign-off. + # Only the parsing is shared: the body must also be signed by a listed + # sign-off identity, while the push fallback accepts any sign-off. cases = { "signed": "Change: x\n\n" + SIGNOFF, "unsigned": "Change: x",