Repository navigation
feat(governance): 维护与贡献章节 + 分级合入门禁(Tier A 自动合入 / Tier B 仅人工) - #971
Open
Sunrisepeak wants to merge 2 commits into
Open
Sunrisepeak wants to merge 2 commits into
Sunrisepeak wants to merge 2 commits into
Conversation
… wall - MAINTAINERS.yml as the single source: responsibility domains (duty/scope/intro, several clickable maintainers per cell joined by ·) with a merge tier per domain - rendered maintainer tables in both READMEs (tools/render_maintainers.py; --check on PRs, bot render PR from main) - merge-gate: /merge squash-merges Tier A (pkgs/tests) after 1 write-user approval + green checks/statuses; refuses every PR touching Tier B (workflows, index.toml, mcpp.toml, schema/governance docs) — those merge by human hands only - CODEOWNERS mirrors the same scopes for required code-owner review - weekly thanks-contributors wall (pinned 1a1fa1f) in PR mode, mirrored into README.zh-CN.md - docs/governance.md + zh: roles, quorum, AI-review-as-status rationale, branch-protection checklist, escalation - Contributing renamed to Maintenance & Contribution (维护与贡献)
…/permissions/intro/names) - MAINTAINERS.yml: `roles` (仓库负责人 admin / 核心维护者 maintain / 维护者 Committer write / 活跃贡献者 triage+moderate) replaces duty domains; `tiers.manual` is now a standalone path list - rendered table is 4 columns: identity | GitHub permission | one-line intro | maintainers (clickable, · separated) - merge_gate reads `tiers.manual`; gate behavior unchanged - governance docs: GitHub role mapping, Triage (sort & route) vs Moderate (edit & enforce, GA 2026-10-28) research result
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
目标
把 README 的
Contributing升级为「维护与贡献」:维护者表按身份与 GitHub 权限模型组织,加贡献者头像墙;并落地分级合入门禁——三方包达标可自动/at-bot 合入,mcpplibs/mcpp 官方管理路径任何 bot 不得合入,必须人工在 GitHub 上主动合并。AI 时代开源自治的第一次落地:策略写在文件里,人、AI agent、bot 读同一份。维护者表(身份 → GitHub 权限 → 简介 → 名单)
README 表格只有四列,第一列是治理身份、第二列是对应的 GitHub 仓库角色(真实被执行的权限,不是口头承诺)、第三列一句话介绍、第四列开发者名单(可点击、
·分隔、hover 出简介):adminmaintainwrite/merge(Tier A)triage,moderate活跃贡献者 = Triage + Moderate(Moderate 2026-10-28 GA):Triage 做分类与路由(标签、指派、关闭/重开、标重复、请求 review);Moderate 额外给改写与执法——编辑任何人的 issue 标题/正文/评论、锁定 issue、转移 issue、创建编辑标签里程碑,但对 PR 没有任何额外权力(锁 PR 会话需
write)。Moderate 是议题规范化 agent 的天然席位,Triage 是社区席位;两者都不能 approve/merge。详见调研结论(docs/governance.md「角色」节)。设计:单一事实来源
.github/MAINTAINERS.yml两段决定一切:rolesgithub字段)→ 一句话简介(双语)→ 维护者名单tiers.manualmerge_gate.py运行时现读).github/CODEOWNERS把tiers.manual路径映射到 GitHub code-owner review(branch protection 强制)。初始引导:org team 尚未建立,全部指向@Sunrisepeak;认领席位 = 发 PR 往对应角色的maintainers:加 login,晋升需该角色现有成员或仓库负责人 approve。分级合入策略(不变)
pkgs/**、tests/**等tiers.manual之外xpkgindex-update/ci)→ PR 上开 auto-merge,或评论/merge由merge-gate.ymlsquash 合入并公布批准者;quorum 不满足只在 PR 上说明缺什么tiers.manual:workflows、index.toml、mcpp.toml、schema 与治理文档、CODEOWNERS/MAINTAINERS/merge一律拒绝(无论多绿),仓库负责人人工 review 后在 GitHub 主动合并Tier B 留给人的理由:这些文件决定每个客户端能解析什么(
min_mcpp下限语义)、以及之后谁能合入什么;坏包合入的损害被每周全量回归兜住,坏策略合入的损害没有边界——这个不对称就是分级。为什么 AI review 是 status 不是 approve:GitHub 要求 approve 由人负责,机器 approve 不计入可合并性,且 PR 作者(含更新 bot)永远不能 approve 自己的 PR。所以自动 review 与更新 bot 的 CI 同构:一张有否决权的 commit status。规划中的 AI reviewer 发
ai-review/approved|blocked;blocked让/merge停下,approved单独永远不够。变更清单
.github/MAINTAINERS.ymlroles(身份/权限/简介/名单,按 GitHub 角色模型)+tiers.manual(Tier B 路径).github/CODEOWNERS@Sunrisepeak)tools/render_maintainers.py--check供 PR CI 校验新鲜度tools/merge_gate.py+merge-gate.yml/merge门禁:quorum 核对 → squash 合入;触及tiers.manual拒绝并留言tools/render_contributors.py+thanks-contributors.yml1a1fa1f)每周 PR 模式采集注入 README.md,再镜像中文 README 到同一条 bot PRmaintainers.yml--check;main/手动触发时渲染并开 bot PR 回填(Tier B,人工合并)README.md/README.zh-CN.mdContributing/贡献→Maintenance & Contribution/维护与贡献:维护者表(marker 渲染,已含当前内容)、贡献者墙 marker、分级合入策略摘要、原贡献指南移入Contribute小节docs/governance.md/docs/zh/governance.mdCHANGELOG.md启用前需要的一次性仓库设置(merge 后)
validate;允许 auto-merge;允许 GitHub Actions 创建/approve PR(bot PR 需要);合并方式限 squash。GITHUB_TOKEN。mcppplibsorg team 并把 CODEOWNERS 指到 team。验证
python tools/render_maintainers.py --check通过,渲染幂等(重跑 diff 为空);四列表格双语内容已人工核对tools/render_contributors.py用 fixture 贡献者表实测:正确落进中文 README marker 区并保持幂等MAINTAINERS.yml新 schema 断言通过(tiers.manual7 条路径、4 个角色);YAMLsafe_load通过;Python 工具py_compile通过main.py/git.py/config.py):PR 模式在我们 checkout 建thanks-contributors/update分支、提交 5 个文件(含 README.md 注入)、开/复用 PR,永不直推 mainmerge_gate.py改读tiers.manual后逻辑未动,但未在真实 PR 上演练过——建议合并后第一个/merge在一条普通包 PR 上试跑明确不做(留讨论)
/merge