Skip to content

ci: check DCO signers only, adding Ankar to the sign-off list (P1-p) - #203

Merged
Ankarnassia merged 4 commits into
mainfrom
ci/p1-p-dco-signer-ankar
Nov 18, 2026
Merged

Ankarnassia merged 4 commits into
mainfrom
ci/p1-p-dco-signer-ankar

Conversation

@tenneidp

@tenneidp tenneidp commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Closes #202

条目

Change

  • .github/dco-maintainers.txt:只保留 signoff inpac <inpac@lingmatrix.cn> 与新增的 signoff Ankar <ankarnassia@lingmatrix.cn>;删除 author inPac <tenneidp@gmail.com> 与 author 角色说明;格式说明只描述 signoff,出现其它角色仍失败。
  • scripts/check-dco.py:名单解析只接受 signoff(未知角色失败,没有 signoff 时失败);pr 模式下本仓库分支不再逐个检查提交作者与签名,只输出一行说明由正文签名覆盖;fork PR 仍要求每个提交(含合并提交)带与作者一致的签名;正文检查与推送兜底检查不变。docstring 与失败提示同步改为“签名者”口径。
  • CONTRIBUTING.md §11:删除“作者不属于名单的提交须本人签署”的表述,改为只检查签名者、正文签名统一确认整个 PR;人类协作者的提交改为“可以 git commit -s,不强制”;新增一段写明签名只表示按 DCO 1.1 作确认、不改变合并权限、合并仍由维护者执行、代理仍不得签名。§5 第 7 步同步。
  • docs/08-governance/parallel-workflow.md:§3 人类协作者与 §5.2 的提交条目改为“可以 git commit -s,不强制”;§5.2/§5.5 的签名主体为签名者,合并仍由维护者执行。
  • .github/workflows/dco.yml:只改头部注释(只检查签名者;本仓库分支由正文签名覆盖;fork 逐提交不变)。触发、权限、信任边界与两步 checkout 均未改。
  • tests/repository_hardening/test_check_dco.py:删除依赖 author 角色与同仓库逐提交检查的用例;新增/改写:任意作者(含 dsh <dsh@localhost>)的未签提交在正文由 inpac 或 Ankar 签名时通过;同仓库名单外作者的提交与合并提交通过;正文无签名失败;名单含 author 行失败(未知角色);名单只有注释时失败(没有 signoff);仓库名单只登记签名者。fork、推送与工作流信任的用例保持不变。
  • tests/repository_hardening/dco_pr_simulation.py:同仓库未签提交场景由“失败”改为“通过”,名单外签名者的提示文本同步。
  • docs/07-roadmap/current-status.md §9:P1-p 行按修订 2 改写(热点)。
  • SINGLEHOST-SHA256SUMS:重新生成;只有 .github/dco-maintainers.txt、.github/workflows/dco.yml、scripts/check-dco.py、tests/repository_hardening/dco_pr_simulation.py、tests/repository_hardening/test_check_dco.py 五个钉住文件的哈希变化,WORKFLOW-SHA256SUMS 不变。
  • README.md、CONTRIBUTORS.md、docs/08-governance/public-repository-settings.md:上一轮已按维护者批准同步的“签署人”表述保留;设置清单补一句 P1-p 只检查签名者、同仓库提交不再逐提交检查。

范围说明(维护者批准)

  1. 计划卡修订 2 把 scripts/check-dco.py 与 tests/repository_hardening/dco_pr_simulation.py 加入文件集,本 PR 按修订 2 实现。
  2. 会话中报告的三处同类表述(README.md、CONTRIBUTORS.md、docs/08-governance/public-repository-settings.md)由维护者批准扩入文件集,本 PR 保留这些改动。
  3. docs/08-governance/parallel-workflow.md §3 人类协作者一行随修订 2 的“不强制签署提交”同步修改(同一文件内)。

Problem / counterexample

  • PR docs: archive the post-release closure recheck (AUD-20261118-01) #201 的 dco 失败:0cd154298560 is authored by dsh@localhost, which is not a maintainer identity。旧规则把“提交作者是否在名单里”当作 DCO 判据,名单因此变成代理身份登记表;代理换一个提交身份就会让合并失败,而 DCO 确认本应由签名者承担。
  • 修订 2 因此把判据收敛到签名者:本仓库分支的 PR 由正文签名统一确认;fork PR 保留逐提交确认(那是外部贡献者本人作的确认);推送到 main 的兜底检查不变。
  • 修订 1 曾要求新增 author dsh <dsh@localhost> 并补同仓库提交用例;修订 2 取代该做法,本 PR 不登记 dsh 身份。

Status before → after

位置 之前 之后
名单角色 signoff 与 author 两类 只有 signoff;author 等其它角色失败
名单身份 inpac、Ankar(signoff)+ inPac(author) inpac、Ankar
本仓库分支 PR 的提交 名单外作者的提交须自带签名 不逐提交检查,正文签名统一确认
fork PR 的提交 每提交须与作者一致的签名 不变
正文签名 名单中的 signoff 身份 不变(inpac 或 Ankar)
推送 main 兜底 有签名即可 不变
签名与合并 签名不等于合并权限 不变(只有维护者合并)
代理签名 禁止 禁止(不变)

Tests or proofs(本次执行)

基线 5b3bc9a065b8c78561d67a76ee6694b2f2de5079,2026-11-18:

命令 基线 SHA 退出码
python3 -B -m unittest tests.repository_hardening.test_check_dco 5b3bc9a 0(38 tests OK)
python3 -B tests/repository_hardening/dco_pr_simulation.py 5b3bc9a 0(9 个场景 + 注入检查全部符合预期)
两次正文签名模拟(方式同 dco_pr_simulation.py:BASE/HEAD/FORK/PR_BODY 环境变量;脚本在仓库外,未入库) 5b3bc9a 0(5 个场景)
make check 5b3bc9a 0
python3 -B scripts/update-manifests.py --check 5b3bc9a 0
python3 -B scripts/check-repository-evidence.py --repository . 5b3bc9a 0
python3 -B scripts/check-license-coverage.py --require-git 5b3bc9a 0(covered=351)
git diff --check origin/main 5b3bc9a 0

本地模拟覆盖(两次正文签名应通过,另加反例):

输入 预期 实际
正文末尾 Ankar 的签名 通过 exit 0,signed off by Ankar <ankarnassia@lingmatrix.cn>
正文末尾 inpac 的签名 通过 exit 0,signed off by inpac <inpac@lingmatrix.cn>
正文末尾代理提交身份 inPac <tenneidp@gmail.com> 的签名 失败 exit 1,not a sign-off identity
正文末尾名单外身份 失败 exit 1,not a sign-off identity
正文无签名 失败 exit 1,no Signed-off-by trailer
同仓库 PR,作者 dsh <dsh@localhost>,提交未签,正文签名 通过 exit 0,same-repository pull request
fork PR,提交未签 失败 exit 1,Signed-off-by trailer matching
名单含 author 行 失败 exit 1,unknown role 'author'; expected signoff

未跑全量 make test(计划卡不要求);CI 结果以 GitHub 为准,未轮询。

用本 PR 自己的正文验证(本地)

基线 5b3bc9a;检查脚本取本分支(名单已含 Ankar),正文取本 PR 已推送的正文:

输入 退出码
本 PR 正文原样(末尾是提示签名的注释) 1(no Signed-off-by trailer in its last paragraph)
正文末尾另起一段追加 inpac 的签名(只在本地,未推送) 0(signed off by inpac <inpac@lingmatrix.cn>)

即门禁对代理写完的正文保持关闭,维护者加签后放行。注意:合并前 GitHub 上的 dco 用目标分支的旧名单与旧脚本,Ankar 的签名对本 PR 无效。

Evidence tags

无(本 PR 不新增证据报告,不改动被证据钉住的提交)。

理论缺口

无(计划卡“理论依赖”为无)。

Residual risk

  • 生效时点: 本 PR 合并前,dco 仍按目标分支的旧脚本与旧名单判定:同仓库提交仍会被逐条检查,Ankar 的签名不生效。合并后新规则立即生效。因此合并本 PR 的正文签名仍须由 inpac <inpac@lingmatrix.cn> 提供。
  • 放宽范围: 本仓库分支的提交不再逐个校验,DCO 确认完全由正文签名者承担。若签名者对他人提交不知情,脚本不会发现;这是维护者 2026-11-18 的决定(计划卡修订 2)。fork 的逐提交检查与推送兜底仍保留信号。
  • docs: archive the post-release closure recheck (AUD-20261118-01) #201: 本 PR 合并前,dsh@localhost 作者的提交仍会被旧脚本拒绝;合并后编辑一次正文触发 dco 重跑即可,也可以按修订 2 说明先改写作者再合并。
  • 线上未实测: 新规则在 GitHub 上的实际通过需要一次真实 PR 才能确认;本 PR 只提供单元测试与本地事件模拟。

Documents updated

.github/dco-maintainers.txt、.github/pull_request_template.md、.github/workflows/dco.yml、CONTRIBUTING.md、CONTRIBUTORS.md、README.md、docs/07-roadmap/current-status.md、docs/08-governance/parallel-workflow.md、docs/08-governance/public-repository-settings.md、scripts/check-dco.py、tests/repository_hardening/dco_pr_simulation.py、tests/repository_hardening/test_check_dco.py、SINGLEHOST-SHA256SUMS

合并检查

  • 改动文件都在计划卡(含修订 2)的文件集内;三处扩展已由维护者 2026-11-18 在会话中批准
  • PARALLEL-1 审计:由维护者另行安排(Codex)
  • 分支基线即当时最新 origin/main(5b3bc9a),当次无需 /aclt-sync
  • CI 通过:以 GitHub 为准,未轮询
  • DCO:本正文末尾没有签名(代理不填写);合并前须由 inpac <inpac@lingmatrix.cn> 在正文最末尾另起一段签名,dco 才会通过

Signed-off-by: inpac inpac@lingmatrix.cn

Change:
  .github/dco-maintainers.txt gains "signoff Ankar <ankarnassia@lingmatrix.cn>";
  its comment now names both identities that may sign the pull request body
  (the maintainer and the human collaborator the maintainer authorised), states
  that a signature is the signer's DCO 1.1 confirmation, and keeps agents out
  of signing and of deciding the merge. CONTRIBUTING section 11, PARALLEL-1
  sections 5.2 and 5.5, the PR template and the dco.yml header name the signer
  instead of the maintainer alone; the per-commit exemption sentence follows
  the list ("identities in the list", not "maintainer identities"). README,
  CONTRIBUTORS and the public repository settings record name the two signers
  as well. scripts/check-dco.py is unchanged: its parser already registers
  every signoff identity.

Problem / counterexample:
  The list and the documents said only the maintainer signs, so after adding
  the authorised collaborator those sentences would be false, and the settings
  record would describe a signature identity that the list no longer matches.

Status before:
  One signoff identity (inpac); only the maintainer described as the signer.

Status after:
  Two signoff identities; the maintainer or the authorised collaborator may
  sign the body. Agents still never sign; merging stays a maintainer decision.

Affected objects/functions:
  None in the protocol; only the DCO gate's identity list and its documentation.

Affected invariants:
  None.

Affected threats:
  None.

New assumptions:
  The maintainer authorises Ankar to sign pull request bodies (issue #202).

Compatibility/migration:
  No code path changes. dco reads the list from the trusted checkout of the
  target branch, so the new identity takes effect only after this change merges.

Tests or proofs:
  python3 -B -m unittest tests.repository_hardening.test_check_dco -> 0 (36 tests)
  python3 -B tests/repository_hardening/dco_pr_simulation.py -> 0 (9 scenarios)
  two-signer event simulation (same mechanism, script outside the repository)
    -> 0: Ankar and inpac signoffs pass; the agent commit identity and an
    unlisted identity fail; an unsigned body fails.
  make check -> 0

Residual risk:
  The check script's docstring and failure text still say "maintainer sign-off
  identity" for the signoff role; the plan card excludes that file. A listed
  signoff identity is also exempt from per-commit sign-offs, as before.

Documents updated:
  .github/dco-maintainers.txt, .github/pull_request_template.md,
  .github/workflows/dco.yml, CONTRIBUTING.md, CONTRIBUTORS.md, README.md,
  docs/08-governance/parallel-workflow.md,
  docs/08-governance/public-repository-settings.md,
  tests/repository_hardening/test_check_dco.py
Change:
  docs/07-roadmap/current-status.md section 9 gains the P1-p row;
  SINGLEHOST-SHA256SUMS is regenerated with scripts/update-manifests.py.

Problem / counterexample:
  The status log records who may sign for DCO; the identity list changed. The
  manifests pin the identity list, the workflow and the tests.

Status before: P1-p absent from the log; stale digests.
Status after: row present; digests match the inventory.

Affected objects/functions: none.
Affected invariants: none.
Affected threats: none.
New assumptions: none.

Compatibility/migration:
  Only .github/dco-maintainers.txt, .github/workflows/dco.yml and
  tests/repository_hardening/test_check_dco.py change their pinned digests.

Tests or proofs:
  python3 -B scripts/update-manifests.py --check -> 0
  make check -> 0

Residual risk: none beyond the first commit.
Documents updated: docs/07-roadmap/current-status.md, SINGLEHOST-SHA256SUMS
Change:
  scripts/check-dco.py now checks the signer alone. The list parser accepts
  only "signoff" lines, so an "author" line fails as an unknown role; the
  Maintainers object carries the sign-off identities and nothing else. In pr
  mode a pull request from a branch of this repository is no longer inspected
  per commit: the body sign-off confirms the whole pull request whatever the
  authors are. Fork pull requests keep the per-commit rule (each commit,
  merge commits included, needs a Signed-off-by matching its author) and the
  push fallback is unchanged. Failure text and the docstring follow the
  signer-only rule.
  .github/dco-maintainers.txt keeps "signoff inpac <inpac@lingmatrix.cn>" and
  gains "signoff Ankar <ankarnassia@lingmatrix.cn>"; "author inPac
  <tenneidp@gmail.com>" and the author-role paragraph are removed. The
  comment now describes signers only, states that signing is the signer's
  DCO 1.1 confirmation, that agents never sign, and that the body sign-off
  covers the commits on a repository branch while a fork still needs a
  per-commit trailer.
  CONTRIBUTING section 11 and PARALLEL-1 sections 3 and 5.2 drop the
  "authors outside the list must sign their own commits" wording and say a
  human collaborator may use git commit -s but need not; a signature does not
  grant merge permission and merging stays with the maintainer. dco.yml's
  header comment follows. README, CONTRIBUTORS and the public repository
  settings record name the two signers, and the settings record states that
  only the signer is checked.

Problem / counterexample:
  The dco run on PR #201 failed with "0cd154298560 is authored by
  dsh@localhost, which is not a maintainer identity": the old rule judged
  commit authors against the list, so the list became a registry of agent
  commit identities and any new one blocked the merge. DCO confirmation
  belongs to the signer, so revision 2 of the plan card removes that rule
  for repository branches and keeps it for forks.

Status before:
  The list held two signoff identities and one author identity, and commits
  by authors outside the list needed their own signed-off-by.

Status after:
  The list holds two signoff identities only; commits on a repository branch
  are covered by the body sign-off; fork per-commit checks and the push
  fallback are unchanged. Agents still never sign; merging stays a maintainer
  decision.

Affected objects/functions:
  check-dco.py pr mode, the sign-off list format, and the documentation of
  both. No protocol object, invariant or threat changes.

Affected invariants:
  None.

Affected threats:
  None.

New assumptions:
  The maintainer accepts that a same-repository pull request is confirmed by
  its body signer for every commit in it (plan card revision 2, 2026-11-18).

Compatibility/migration:
  An "author" line in the list now fails closed; the repository list drops its
  only one. The script and list come from the target branch, so the new rule
  and the new identity apply only after this change merges.

Tests or proofs:
  python3 -B -m unittest tests.repository_hardening.test_check_dco -> 0 (38 tests)
  python3 -B tests/repository_hardening/dco_pr_simulation.py -> 0 (9 scenarios)
  two-signer event simulation (same mechanism, script outside the repository)
    -> 0: Ankar and inpac signoffs pass; the agent commit identity and an
    unlisted identity fail; an unsigned body fails.
  make check -> 0
  python3 -B scripts/update-manifests.py --check -> 0
  python3 -B scripts/check-repository-evidence.py --repository . -> 0
  python3 -B scripts/check-license-coverage.py --require-git -> 0
  git diff --check origin/main -> 0

Residual risk:
  Commit-level DCO evidence for repository branches is gone; the body signer
  confirms every commit without per-commit proof. Fork pull requests and the
  push fallback keep their checks.

Documents updated:
  .github/dco-maintainers.txt, .github/workflows/dco.yml, CONTRIBUTING.md,
  CONTRIBUTORS.md, README.md, docs/08-governance/parallel-workflow.md,
  docs/08-governance/public-repository-settings.md, scripts/check-dco.py,
  tests/repository_hardening/dco_pr_simulation.py,
  tests/repository_hardening/test_check_dco.py
Change:
  docs/07-roadmap/current-status.md section 9 describes P1-p as revision 2:
  signers only, no author role, no per-commit checks on repository branches.
  SINGLEHOST-SHA256SUMS is regenerated with scripts/update-manifests.py.

Problem / counterexample:
  The status log records the DCO gate; its content changed, and the manifests
  pin the identity list, the workflow, the checker and the tests.

Status before: log and digests described the additive list change.
Status after: log and digests match the signer-only rule.

Affected objects/functions: none.
Affected invariants: none.
Affected threats: none.
New assumptions: none.

Compatibility/migration:
  Only .github/dco-maintainers.txt, .github/workflows/dco.yml,
  scripts/check-dco.py, tests/repository_hardening/dco_pr_simulation.py and
  tests/repository_hardening/test_check_dco.py change their pinned digests.

Tests or proofs:
  python3 -B scripts/update-manifests.py --check -> 0
  make check -> 0

Residual risk: none beyond the previous commit.
Documents updated: docs/07-roadmap/current-status.md, SINGLEHOST-SHA256SUMS
@tenneidp tenneidp changed the title ci: add Ankar as a DCO sign-off identity (P1-p) ci: check DCO signers only, adding Ankar to the sign-off list (P1-p) Nov 18, 2026
@tenneidp
tenneidp requested a review from Ankarnassia November 18, 2026 16:26
@tenneidp tenneidp self-assigned this Nov 18, 2026
@tenneidp

Copy link
Copy Markdown
Member Author

PARALLEL-1 审计 @ e09db1e

  • 头部: e09db1efdff02b5e8c431007fc5659b37b1e4293;origin/main:5b3bc9a065b8c78561d67a76ee6694b2f2de5079;2026-11-18 17:31 CET(Europe/Budapest,UTC+01:00)。分离检出开始及结束均干净,main 是当前头部祖先。
  • 实现: dsh;审计: Codex,本会话未参与 ci: check DCO signers only, adding Ankar to the sign-off list (P1-p) #203 实现。采用逐行代码审查、调用链/信任边界对照、已有测试复跑及真实 PR 正文核验。
  • 增量范围: 当前 PR 无既有 PARALLEL-1 审计 @ 评论,因此没有可沿用的 PR 审计 SHA。本次建立首个锚点,审查 5b3bc9a...e09db1e 四次提交、13 个文件,重点核对后两次提交落实的“修订 2”是否正确取代前两次实现;不重复审计 docs: archive the post-release closure recheck (AUD-20261118-01) #201 或源报告。
  • 依据: #202 计划卡修订 2 明确取代修订 1,授权移除 author 角色、同仓库免逐提交签署,fork 逐提交及 main 推送兜底不变;不把该已批准的放宽误判成越权改动。
维度 结论
计划符合度 PASS(功能与验收;三处获批扩展的计划记录待同步,见 MINOR)
语义连续性 PASS(协作/DCO 规则;无协议语义变更)
结构完整性 PASS
历史隔离 PASS
本次复跑 PASS(按 #202 获批验证范围)

发现项

PRA-203-01 · MINOR · OPEN — 将 PR 正文已声明获批的三处扩展回填 #202 文件集。

实际改动包含 README.md、CONTRIBUTORS.md、docs/08-governance/public-repository-settings.md。PR 正文“范围说明”明确记录维护者已在会话批准这三处扩展,但 #202 原文件集及两条修订评论尚未纳入它们;修订 2 只新增 scripts/check-dco.py 和 dco_pr_simulation.py。请按 PARALLEL-1 §5.2 将已获批扩展回填计划卡,保留批准来源,方便后续同步和范围复核;不要求重新审批。这三处均为同一签署规则的必要同步,没有发现扩大协议或合并权限,故不作为 MAJOR 或功能退回理由。

验收核对

  1. 名单与正文检查: 名单恰有 inpac、Ankar 两个 signoff 身份,没有 author 行;解析器只接受 signoff,未知角色、名单缺失及没有 signoff 均失败。正文检查仍在 check_pr 中无条件执行,早返回只位于 check_commits 的同仓库分支,不会跳过正文门禁。Ankar / inpac 正文签署都通过,未签正文、名单外签署失败;CRLF、中间签署、--- 及注入字符场景保留。
  2. 同仓库与 fork 的分界: 同仓库任意作者(含 dsh@localhost)、未签提交和合并提交按修订 2 由正文签署统一确认。fork 仍枚举 base..head 的全部提交,含 merge commit,逐个要求与作者邮箱匹配的可解析 trailer。ForkCommitTests 与 main 的 AST 完全相同,原 fork 用例未删改。本次将当前 PR 的四个未签提交作为 fork 数据核验,正文签署有效但四个提交仍被拒绝,预期退出 1;同样数据以同仓库路径退出 0。
  3. 信任边界: load_maintainers 仍相对正在执行的脚本读取名单,不读取 --repo 中的 PR 版本。工作流去掉注释后与 main 完全相同:受信任检出仍使用 github.sha,PR 仅作数据检出;PR_BODY 只经环境变量传入,run 中不插值、不执行、不写 GITHUB_ENV/GITHUB_OUTPUT;token 只读、凭据不持久化、checkout SHA 和 edited 触发不变。相关原测试继续通过。
  4. 推送兜底: adoption 判断、first-parent 范围和签署解析逻辑保留,只有失败提示改为签名者措辞。未把推送检查升级为名单认证,也未把原历史失败改成通过。
  5. 文档与权限: CONTRIBUTING §5/§11、PARALLEL-1 §3/§5.2/§5.5、模板、README、CONTRIBUTORS、设置清单和 §9 日志相应同步;本仓库人类提交可选逐提交签署,fork 仍强制,代理仍不得签署;授权签署不赋予合并权限,“维护者合并”仍为流程约定。Gate/OQ、规范、Schema、发布说明、既有审计及标签快照未修改。
  6. 清单与历史: SINGLEHOST-SHA256SUMS 恰更新名单、DCO 工作流、检查器、事件模拟、DCO 测试五个钉住文件;WORKFLOW-SHA256SUMS 不变,检查通过。无删除/改名,无历史正文改写,无新增 source_revision 或证据标签。

本次复跑与 CI

命令 / 检查 退出码 / 结果
python3 -B -m unittest tests.repository_hardening.test_check_dco 0,38 tests OK
python3 -B tests/repository_hardening/dco_pr_simulation.py 0,9 个场景及注入检查通过
make -j<N> -O check 0,N 为本机 CPU 数
python3 -B scripts/update-manifests.py --check 0
python3 -B scripts/check-repository-evidence.py --repository . 0
python3 -B scripts/check-license-coverage.py --require-git 0
git diff --check origin/main...HEAD 0
git diff --diff-filter=DR --name-status origin/main...HEAD 0,无输出
当前已签 PR 正文 + 目标 main 的真实脚本/名单 0;四个提交作者仍按旧名单豁免,签署为 inpac
当前已签 PR 正文 + 新脚本/名单(同仓库) 0
当前已签 PR 正文 + 新脚本/名单(fork 反例) 1(预期);四个提交均因缺匹配签署被拒绝

按 #202 明确的“不跑全量 make test”范围,本次执行 DCO 定向测试、事件模拟、完整 make check 与快速检查,未运行全量 make test、多虚拟机或物理双机;没有用本地通过推导新增生产或协议保证。

当前头部的最新 dco run 44347353867 与 local-validation run 44346721080 均 success。该头部较早的 dco failure 保留,不写成“所有历史运行全通过”。

生效时点需保留: 当前 GitHub dco 运行的是目标 main 的旧脚本与名单;本次另取真实 main 版本独立复现通过,当前 PR 正文末尾 inpac 签署有效。新脚本/Ankar 身份要合并后才对后续 GitHub PR 生效;本轮单元测试与本地模拟不等于已经在线实测新规则。#201 的作者问题只有在新目标分支规则生效并重跑后才能按新规则判定,其归档硬换行问题也不会由本 PR 修复。

仓库规则与结论

CONTRIBUTING §9 逐项:签署责任与作者身份分离、歧义减少;协议不变量不变;新增 Ankar 的 DCO 签署授权和同仓库提交确认方式有明确维护者决定,未扩张合并权限;Sybil、串谋、分区、重放、崩溃和资金耗尽的协议路径不变;无运行时安全终态或回滚改动,协作检查在正文缺签/未知角色等场景继续失败;未把候选结论或来源证据写成数学保证;未启用 assurance;文档与状态日志同步,计划卡范围记录问题单列。未发现新理论缺口,没有自行建模或挑选参数。新增内容未见凭据、真实 IP 或私有绝对路径;公开签署身份和测试占位身份属于本条目明确内容。四次提交说明覆盖 CONTRIBUTING §6 的字段,早期实现与修订后的差异如实保留,无重写历史要求。

建议合并。0 BLOCKER、0 MAJOR、1 MINOR(OPEN)。 建议回填计划卡的三处已批扩展;正式合并仍由维护者执行,并确认最新 main 同步、当前头部必需检查与批准有效。禁止据本轮宣称 #203 已合并、新规则已完成线上端到端实测、#201 的全部问题已关闭、历史 DCO 全通过、Gate/OQ 退出、完整 conformance 或生产就绪。

@Ankarnassia
Ankarnassia merged commit 203249d into main Nov 18, 2026
6 of 7 checks passed
@Ankarnassia
Ankarnassia deleted the ci/p1-p-dco-signer-ankar branch November 18, 2026 16:37
tenneidp added a commit that referenced this pull request Nov 18, 2026
Sync after P1-p (#203) made `dco` check only the pull-request signer, so the
commit author recorded in 0cd1542 no longer blocks the required check.

Conflict: `docs/07-roadmap/current-status.md` §9 both sides added a row under
the table header. Keep both, P1-p above the AUD-20261118-01 archive row.

Refs #200
Ankarnassia pushed a commit that referenced this pull request Nov 18, 2026
<!-- PARALLEL-1:docs/08-governance/parallel-workflow.md。不要写入凭据、真实
IP、用户名或本地路径。 -->

Closes #200

Refs #128

## 条目与基线

- Issue:#200(归档 AUD-20261118-01,阶段 #128 关闭前的最后一项收尾)
- 分支:`docs/archive-aud-20261118-01`
- 基线:`5b3bc9a065b8c78561d67a76ee6694b2f2de5079`(开分支时);已按 PARALLEL-1 §5.4
合并 `origin/main` `203249dee46336181d682fd0fb894194669afdd3`(P1-p #203)
- 实现代理:dsh;审计按计划卡不再另开一轮,只归档原报告
- 提交:`0cd1542`(归档与索引)、`69deb44`(同步 main)、`d54392c`(PRA-201-02 修复)
- 同步只解一处冲突:`docs/07-roadmap/current-status.md` §9 表头下两行并存,P1-p
在上、AUD-20261118-01 在下

## Change

### 归档与索引(`0cd1542`)

- 新增
`docs/08-governance/audits/audit-20261118-01-post-release-closure.md`:Codex
交付件逐字节复制,33,272 字节,SHA-256
`9829ff904f71e262fcb004d839dc5f5a9995a437a61fbf9b0da7d627d21cf194`,`cmp`
退出 0;内容、结论与失败证据保持原文。报告里没有指向仓库外本机路径的链接(本地路径只以纯文本出现在 §1 与
§10),未触发计划卡允许的唯一改写。
- `docs/08-governance/audits/README.md`:接 AUD-20261116-02/03 那一段之后新增一段:

> 2026-11-18 的阶段 #128 发布后收尾回验见
[AUD-20261118-01](audit-20261118-01-post-release-closure.md)。报告按原字节归档,保留原结论、发现与失败证据;它不是
PR 审计,也不是 Gate 退出审计。本轮新增 0 BLOCKER、1 MAJOR(现为
`ACCEPTED_BY_MAINTAINER`)、0 MINOR,未处理 OPEN 为
0;报告结论为已无未处理的关闭阻断,本报告归档并加入索引后 #128 可由维护者关闭。

- `docs/README.md`:接 :295(AUD-20261116-03)之后新增一条:

> [2026-11-18 阶段 #128
发布后收尾回验(AUD-20261118-01)](08-governance/audits/audit-20261118-01-post-release-closure.md):新增
0 BLOCKER、1 MAJOR(现为 `ACCEPTED_BY_MAINTAINER`)、0 MINOR,未处理 OPEN 为
0;已无未处理的关闭阻断,本报告归档并加入索引后 #128 可由维护者关闭。

- `docs/07-roadmap/current-status.md`(热点文件):§9 新增一行,只转述归档事实、结论与计数,Gate
栏“不变”。

### 归档字节与文档门禁的兼容(`d54392c`,PRA-201-02)

- 新增 `docs/08-governance/audits/.gitattributes`:对 `audit-*.md` 声明
`whitespace=-blank-at-eol`。归档报告是原字节记录,P1-k 之后文档通道无条件运行 `git diff
--check`,保留交付件的 Markdown 硬换行会确定性地让 `local-validation`
失败;这条仓库规则只豁免归档副本,同目录的索引与后续人工撰写的文件仍按默认检查。
- `scripts/check-license-coverage.py`:把 `.gitattributes` 加入
`CONFIG_NAMES`(与 `.gitignore` 同类),文件头的类别列表同步。该文件带 SPDX 头,按配置类受检查。
- `tests/workflow/test_license_coverage.py`:新增
`test_gitattributes_is_covered_and_declarable`,与 `.gitignore` 的既有用例同构。
- `docs/07-roadmap/open-questions.md`:OQ-01“关闭证据”补一句,记录 `.gitattributes`
纳入配置类及其用途。
- `SINGLEHOST-SHA256SUMS`、`WORKFLOW-SHA256SUMS`:脚本与测试是钉住文件,按
`update-manifests.py` 刷新。

## Problem / counterexample

- 阶段 #128 的发布后收尾回验只存在于代理目录,仓库内没有可引用的归档;审计索引停在
AUD-20261116-03,`docs/README.md` 的 AUD-20261115 条目仍写“发布后收尾回验另行归档”。
- **PRA-201-02:** 归档报告第 3–7 行是交付件的 Markdown
硬换行;`.github/workflows/validate.yml` 的文档通道在 `make check-docs` 后无条件执行
`git diff --check "${BASE}...HEAD"`。按原字节归档会让必需检查 `local-validation`
必然失败,而删掉空格就不再是逐字节副本。
- `.gitattributes` 是唯一既能保留字节、又能让该检查放行的已跟踪机制;但许可覆盖检查器此前只把 `.gitignore`
列为配置类,`.gitattributes` 会被判为 `unclassified tracked file` 而失败。
- **PRA-201-01(已解除):** 提交 `0cd1542` 的作者不是受信任身份。P1-p(#203)之后 `dco` 只检查 PR
正文的签名者,该头部已由维护者签署,此问题随同步解除;未改写已推送历史。

## Status before → after

| 位置 | 之前 | 之后 |
|---|---|---|
| 回验报告 | 只在本机代理目录 | 已入库,逐字节等于交付件 |
| 审计索引 | 最后一条为 AUD-20261116-03 | 新增 AUD-20261118-01 一段 |
| `docs/README.md` | 最后一条为 AUD-20261116-03 | 新增 AUD-20261118-01 一条 |
| 状态日志 §9 | 无归档记录 | 新增一行,Gate 不变(同步后与 P1-p 行并存) |
| `git diff --check`(文档通道) | 命中报告 5 行硬换行,退出 2 | 退出 0;归档字节不变 |
| `.gitattributes` | 不能引入(许可覆盖判为未分类) | 按配置类受检查,`covered=352 headers=257
declared=95 excluded=457 missing=0` |
| DCO | `0cd1542` 作者非受信任身份而失败 | P1-p 后只检查 PR 正文签名者,正文已由维护者签署 |

## Tests or proofs(本次执行)

分支头 `d54392c`(基线 `203249d`),2026-11-18:

| 命令 | 基线 SHA | 退出码 |
|---|---|---|
| `python3 -B -m unittest tests.workflow.test_license_coverage` |
`203249d` | 0(49 项通过) |
| `python3 -B scripts/check-license-coverage.py --require-git` |
`203249d` | 0(PASS:covered=352 headers=257 declared=95 excluded=457
missing=0) |
| `python3 -B scripts/update-manifests.py` | `203249d` | 0(刷新两份清单) |
| `python3 -B scripts/update-manifests.py --check` | `203249d` | 0(PASS)
|
| `python3 -B scripts/check-repository-evidence.py --repository .` |
`203249d` | 0(PASS,1008 个本地 prose 链接) |
| `cmp <交付件>
docs/08-governance/audits/audit-20261118-01-post-release-closure.md` |
`203249d` | 0(无输出,逐字节相同) |
| `git diff --check origin/main...HEAD` | `203249d` | 0(加
`.gitattributes` 后不再命中归档硬换行) |
| `make -j"$(nproc)" -O check` | `203249d` | 0(PASS) |

本次改到检查器与测试,按效率规则跑一次 `make check`;未跑 `make test` 全量回归。CI 因含非 Markdown
文件会走全量通道,结果以 GitHub 为准,不轮询。

## Evidence tags

无。本条目不新增证据提交。

## 理论缺口

无。本条目不依赖任何未建模性质,也不据此关闭 TG-6(#123)或 SV-62/SV-118 的 partial 缺口。

## Residual risk

- 报告结论原样保留:#196 的历史 DCO 漏签按维护者接受的 PR 正文补签作为补救,原 push DCO 失败仍在;本 PR
不把历史运行写成通过。
- 报告列出的残余事项(外部贡献者 fork 端到端实测免做、P1-n 合并后线上实测免做、“只有维护者合并”为流程约定、#186 的 DCO
补救)按原记录保留。
- `.gitattributes` 规则按模式 `audit-*.md` 豁免该目录下所有归档报告,不限于本条目这一份;索引
`README.md` 与其他文件不受影响。该规则只影响 whitespace 诊断,不改变任何文件字节。
- 本条目的 PR 正文在维护者签署后被更新(新增归档字节与门禁一节),签名行原样保留在最末尾;若维护者认为需要重新确认,可在正文或评论中说明。
- #128 是否关闭由维护者决定;本 PR 只把归档与索引这一前置条件落地。

## Documents updated


`docs/08-governance/audits/audit-20261118-01-post-release-closure.md`、`docs/08-governance/audits/README.md`、`docs/README.md`、`docs/07-roadmap/current-status.md`、`docs/08-governance/audits/.gitattributes`、`scripts/check-license-coverage.py`、`tests/workflow/test_license_coverage.py`、`docs/07-roadmap/open-questions.md`、`SINGLEHOST-SHA256SUMS`、`WORKFLOW-SHA256SUMS`

## 合并检查

- [x] 改动文件都在计划卡的文件集内(#200 已按维护者 2026-11-18 决定同步文件集与目标)
- [x] PARALLEL-1 审计:首轮 0 BLOCKER、1 MAJOR、1 MINOR;PRA-201-01 随 P1-p
解除,PRA-201-02 本 PR 修复,待增量复核
- [x] 已按 §5.4 合并 `origin/main` `203249d`,重跑通过
- [x] CI 通过:以 GitHub 为准(本次走全量通道),未轮询
- [x] DCO:维护者已在本正文最末尾签署 `Signed-off-by`;P1-p 后 `dco` 只检查签名者,提交作者不再单独要求


[![](https://img.shields.io/badge/powered_by-dsh-4D6BFE?style=flat-square&logo=deepseek&logoColor=white)](https://github.com/deepseek-ai/deepseek-harness)

<!-- DCO(CONTRIBUTING §11):维护者合并前在本行下方另起一段加上签名行 `Signed-off-by: 姓名
<邮箱>`。只有正文最末尾的 trailer 区才算数;正文中只含 `---` 的行会把之后的内容当成补丁区。代理不填写本段。 -->

Signed-off-by: inpac <inpac@lingmatrix.cn>

---------

Co-authored-by: dsh <dsh@localhost>
tenneidp added a commit that referenced this pull request Nov 18, 2026
…205)

<!-- PARALLEL-1:docs/08-governance/parallel-workflow.md。不要写入凭据、真实
IP、用户名或本地路径。 -->

Closes #204

## 条目与基线

- Issue:#204(P1-q:`dco` 接受 GitHub 合并说明末尾的共同作者后缀)
- 分支:`ci/p1-q-dco-coauthor-suffix`
- 基线:`ece86b536bef2ba422708acf86ed5f743dd4d396`(开分支时的
`origin/main`,即失败发生的那次提交);本条开 PR 时 `origin/main` 仍是它,合并前按 PARALLEL-1
§5.4 同步
- 实现代理:dsh;审计:Codex(审计会话由调度会话另行安排)
-
提交:`ca2e355`(检查器、测试、文档、清单)、`752b9c6`(模拟脚本把八个减号的分隔行直接写出)、`07f25f1`(删除一个与计划卡反例重复的用例)
- 改动的文件都在计划卡的文件集内,未扩大范围

## Change

### `scripts/check-dco.py`

- 新增 `without_coauthor_suffix()`:剥离 GitHub 在 squash
合并时追加到说明末尾的固定一段——一整行恰好 9 个 `-`、空一行、逐位 `Co-authored-by: 姓名 <邮箱>`,末尾可有空行。
- `trailers()` 在调用 `git interpret-trailers --parse`
之前先剥离;正文检查与推送检查本来就共用这个函数,因此两边对同一段文本的判定一致。
- 只剥离这一种形状,其余一律原样返回、判定与之前一致:
  - 分隔行不是恰好 9 个 `-`(8 个、10 个、或 9 个加空格);
  - 分隔行两侧没有空行(它必须自成一段);
  - 后缀里混入非 `Co-authored-by` 的行;
  - 共同作者行之后还有正文。
- `---` 补丁分隔行的语义、签名名单校验、fork PR 的逐提交检查都没有改动。

### 测试

- `tests/repository_hardening/test_check_dco.py`:新增
`CoauthorSuffixTests`,用 `ece86b5` 的真实说明(`git log -1 --format=%B
ece86b5`,159 行)作夹具。夹具以 `--cleanup=verbatim` 提交:`git commit -m`
的清理会折叠空行,从而掩盖被测形状。
- 覆盖:真实说明通过推送检查与正文检查、`interpret-trailers` 在未剥离时确实只解析出
`Co-authored-by`(说明夹具确实复现原失败)、多个共同作者、后缀之上没有签名、三种不合规分隔行、后缀中混入其他
trailer、分隔行紧贴上一行、共同作者行之后还有正文、签名者不在名单内、CRLF 与 LF 判定相同。
- `PushTests.test_body_check_and_push_check_parse_the_same_text` 新增 5
个后缀子用例,正文判定与推送判定逐一相等。
- `tests/repository_hardening/dco_pr_simulation.py`:新增 5 个工作流形态的后缀场景(通过
`PR_BODY` 环境变量传入,与 `dco.yml` 一致)。

### 文档

- `CONTRIBUTING.md` §11:新增“共同作者后缀(2026-11-18
起,P1-q)”一条,写明格式、只剥离该格式、合并人无需删除但要确认签名仍在正文末尾。
- `docs/08-governance/parallel-workflow.md` §5.5:合并段落补一句,说明 GitHub
可能追加该后缀、`dco` 会先剥离、签名者不必删除。
- `docs/07-roadmap/current-status.md` §9(热点文件):表头下新增一行,Gate 栏“不变”。
- `SINGLEHOST-SHA256SUMS`:脚本与两个测试文件是钉住文件,按 `update-manifests.py`
刷新;`WORKFLOW-SHA256SUMS` 未变,Markdown 只交付、不钉。

### 后续两个整理提交(`752b9c6`、`07f25f1`)

- `752b9c6`:`dco_pr_simulation.py` 的“八个减号”场景原来由
`suffix.replace("--------", "-------")`
从九个减号推导,读者要先确认替换只命中分隔行才敢断定被测的是八个。之后直接写出八个减号的分隔行,与 `test_check_dco.py`
中同一反例的写法一致;场景数与判定不变(15 个)。
- `07f25f1`:`test_the_suffix_alone_is_not_a_signoff` 与
`test_a_missing_signoff_above_the_suffix_fails`
用同一段文本、同一判定,属重复用例。之后删除前者,保留与计划卡反例“后缀前一段没有签名 → 失败”对应的那个;覆盖的反例种类不变,模块测试数
52 → 51。

两次整理都只动测试与对应清单哈希,不改 `scripts/check-dco.py` 的判定;已推送历史未改写。

## Problem / counterexample

- `main` 上的 `ece86b5`(#201 的归档合并提交:`docs: archive the post-release
closure recheck (AUD-20261118-01)`)让 `dco` 的推送检查失败:`FAIL: ece86b5
on main has no Signed-off-by
trailer`([run](https://github.com/ZeroMatrixTech/ACLt/actions/runs/44353832582))。
- 原因:该 PR 的提交有两个作者(`dsh <dsh@localhost>` 与维护者身份),GitHub 在 squash
合并时于说明末尾追加了 `---------` 与 `Co-authored-by: dsh <dsh@localhost>`。`git
interpret-trailers --parse` 只把最后一段当 trailer 区,于是只看到
`Co-authored-by`,维护者写在正文末尾的 `Signed-off-by`(倒数第二段)不被计入。
- PR 阶段的正文检查拦不住:追加发生在合并那一刻,正文里还没有它。失败因此落在 `main` 上。
- 反例(本次已作对照执行):把 `HEAD` 的 `scripts/check-dco.py` 用在同一范围
`203249d..ece86b5` 上,退出 1,与原失败一致;新测试在该脚本上运行有 6 项失败。`203249d` 是 P1-p #203
的 main 提交,也是 `ece86b5` 的父提交,即推送检查范围的下界。

## Status before → after

| 位置 | 之前 | 之后 |
|---|---|---|
| `scripts/check-dco.py` 的解析 | 后缀被当作最后一个 trailer 段,签名判为缺失 | 先剥离固定后缀再解析 |
| 推送检查 `203249d..ece86b5` | 退出 1(`FAIL: ece86b5`) | 退出 0(`PASS: 1
commit(s)`) |
| 其他 `---` 行、签名名单、fork 逐提交检查 | 各自判定 | 判定不变 |
| `tests.repository_hardening.test_check_dco` | 37 项 | 51 项(另有 5
个共用解析子用例) |
| `dco_pr_simulation.py` | 10 个场景 | 15 个场景 |
| 文档 | 未记录该后缀 | CONTRIBUTING §11、PARALLEL-1 §5.5、状态日志 §9 各一处 |

## Tests or proofs(本次执行)

分支头 `ca2e355`(基线 `ece86b5`),2026-11-18:

| 命令 | 基线 SHA | 退出码 |
|---|---|---|
| `python3 -B -m unittest tests.repository_hardening.test_check_dco` |
`ece86b5` | 0(51 项通过) |
| `python3 -B tests/repository_hardening/dco_pr_simulation.py` |
`ece86b5` | 0(15 个场景全部 PASS) |
| `python3 -B scripts/check-dco.py push --before 203249d --after
ece86b5` | `ece86b5` | 0(`PASS: 1 commit(s) after the DCO adoption point
carry a sign-off`) |
| 同上,改用 `HEAD` 版脚本(对照) | `ece86b5` | 1(`FAIL: ece86b5`,复现原失败) |
| `CoauthorSuffixTests` 在 `HEAD` 版脚本上运行(对照) | `ece86b5` | 1(6 项失败) |
| `make check` | `ece86b5` | 0 |
| `python3 -B scripts/check-repository-evidence.py --repository .` |
`ece86b5` | 0 |
| `python3 -B scripts/check-license-coverage.py --require-git` |
`ece86b5` | 0(`covered=352 headers=257 declared=95 excluded=457
missing=0`) |
| `python3 -B scripts/update-manifests.py --check` | `ece86b5` | 0 |
| `git diff --check origin/main` | `ece86b5` | 0 |

改到检查器与测试,按效率规则跑一次 `make check`;未跑 `make test` 全量回归。CI 结果以 GitHub 为准,不轮询。

## Evidence tags

无。本条目不新增证据提交。

## 理论缺口

无。本条目不依赖未建模的性质,不改协议语义,也不据此关闭任何 `theory-gap` Issue。

## Residual risk

- 剥离只认这一种固定格式。GitHub 若改变追加内容(例如在后缀里加入其他 trailer),检查退回旧判定、让 `main`
上的推送检查失败,不会静默放行;这是本次刻意选择的保守方向。
- 剥离只会让原本被后缀遮住的签名重新可见,不会把任何行变成签名:`Signed-off-by` 仍须是正文最末尾的一段,且签名者仍须在
`.github/dco-maintainers.txt` 名单内。
- 分支前缀 `ci/` 按 Issue 指定,不在 PARALLEL-1 §5.1 列出的 `docs/`、`fix/`、`feat/`
之内。
- 历史失败记录保留:`ece86b5` 那次 `dco` 失败的 run 与日志不被改写;本 PR 只让同一段文本今后能被正确判定。
- `ece86b5` 的签名补录按计划卡第 4 项由维护者合并前加入本正文(文本由调度会话提供),本正文不写 `Signed-off-by`。

## Documents updated


`scripts/check-dco.py`、`tests/repository_hardening/test_check_dco.py`、`tests/repository_hardening/dco_pr_simulation.py`、`CONTRIBUTING.md`
§11、`docs/08-governance/parallel-workflow.md`
§5.5、`docs/07-roadmap/current-status.md` §9、`SINGLEHOST-SHA256SUMS`

## 合并检查

- [x] 改动文件都在计划卡的文件集内
- [x] PARALLEL-1 审计:待 Codex 审计会话
- [x] 基线与开分支时的 `origin/main` 一致(`ece86b5`);合并前按 §5.4 同步
- [x] 本地检查全部通过;CI 结果以 GitHub 为准,未轮询
- [x] DCO:本正文不写 `Signed-off-by`;签名者(维护者)在合并前把它加在正文最末尾,`ece86b5`
的补录声明也由签名者同时加入(CONTRIBUTING §11、计划卡第 4 项)


[![](https://img.shields.io/badge/powered_by-dsh-4D6BFE?style=flat-square&logo=deepseek&logoColor=white)](https://github.com/deepseek-ai/deepseek-harness)

<!-- DCO(CONTRIBUTING §11):维护者合并前在本行下方另起一段加上签名行 `Signed-off-by: 姓名
<邮箱>`。只有正文最末尾的 trailer 区才算数;正文中只含 `---` 的行会把之后的内容当成补丁区。代理不填写本段。 -->

Signed-off-by: inpac <inpac@lingmatrix.cn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: add Ankar as a DCO sign-off identity (P1-p)

2 participants