GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [自动合并 P3-2] C1 拆分 core/rest + ADR 实质校验 + 破玻璃自动 revert · Issue #96 · Cloudbird-Software/.github

[自动合并 P3-2] C1 拆分 core/rest + ADR 实质校验 + 破玻璃自动 revert #96

New issue
Copy link
New issue
Copy link
Open
Open
[自动合并 P3-2] C1 拆分 core/rest + ADR 实质校验 + 破玻璃自动 revert#96
Copy link
Labels
auto-merge自动合并计划(#81)工作卡governance治理体系相关

Description

@randypanding
randypanding
opened on Aug 20, 2026
Issue body actions

目标

拆解 C1 分类(治理层最大人类瓶颈):C1-core(信任根,永远人审)与 C1-rest(降级机器审 + 事后抽检);ADR 从形式校验升级为实质校验(front-matter scope 覆盖 PR diff);破玻璃 24h 未回填从"开 issue"升级为"自动 revert"。

背景(源自 #81 §7)

讽刺的是 agent 高频改动的恰恰是 scripts/、standards/、.github/——全在 C1,全需 owner-merge。拆分判据只有一条:这个变更能否削弱门禁自身?

  • C1-core(永远人审):ruleset 本体、bypass actors、CODEOWNERS、App 权限与私钥、secrets/OIDC 信任策略、expected-state.json baseline、门禁豁免路径清单、environment 保护规则、billing 上限——显式列成清单,永不自动化。
  • C1-rest(机器审 + 事后抽检):scripts/ 实现细节、standards/ 措辞、模板。前提是 P3-1 已完成(gate 来源不可被 PR 修改)。

配套软化装置:ADR 实质化(scope 覆盖校验)、配额制(standards 变更 ≤N 次/周自动合并)、soak 模式(治理规则变更 warn-only 7 天再 enforce)、破玻璃超期自动 revert。

涉及文件

  • governance/GOVERNANCE.yaml(C1 分类定义拆 core/rest,路径清单显式落盘)
  • governance/policy/(C1-core 清单、配额参数、soak 参数、破玻璃时限)
  • gate 的 adr-required 步骤(升级为解析 ADR front-matter 并做 scope 覆盖校验)
  • agent-registry/decisions/(ADR 模板增加机器可解析 front-matter:scope: 路径 glob、影响的 control ID、回滚方式)
  • drift-check(破玻璃回填检测升级为自动 revert 触发器;配额/soak 计时)

执行步骤

  1. C1-core 清单显式落盘(逐路径列出),CODEOWNERS 与 ruleset 同步:core 路径仍 owner-merge,rest 路径移出 owner 强制。
  2. ADR 模板增加 front-matter;gate 校验"ADR 声明的 scope glob 必须覆盖 PR 实际 diff 路径",不覆盖 → 红(防引用无关 ADR 借壳过关)。
  3. 配额制:standards/ 等 rest 路径自动合并配额 ≤N 次/周,超出排队开 issue 叫人。
  4. soak 模式:治理规则(C1-rest 内的规则类变更)自动合并后先 warn-only 运行 7 天再 enforce。
  5. 破玻璃加强:直推豁免 commit 24h 未回填 ADR → 自动 revert(复用 P2-6 的 revert 装置)。

验收标准

  • C1-core 路径 PR 仍强制 owner review;C1-rest 路径 PR 由机器审自动合并(配额内)。
  • ADR scope 不覆盖 diff 路径的 PR 红;覆盖的绿。
  • 破玻璃超期未回填的直推被自动 revert。
  • 全部参数落盘可对账。

测试方法(预先指定)

T1 ADR scope 覆盖校验(核心,负向):

  1. 准备一个 front-matter scope: ["standards/**"] 的测试 ADR。
  2. PR-A:改 standards/x.md 并引用该 ADR → 断言绿。
  3. PR-B:改 governance/rulesets/y.json 并引用同一 ADR → 断言红,错误信息指明 scope 未覆盖 diff 路径(借壳过关被拦)。
  4. PR-C:引用无 front-matter 的旧格式 ADR → 断言红(形式校验升级后旧格式不达标)或按迁移期策略 warn——行为必须与 policy 声明一致。

T2 C1 拆分双向(核心):

  1. PR 改 C1-core 路径(如 rulesets/main-protection.json 的 bypass_actors)→ 断言仍需 owner review,无 owner 动作不合并。
  2. PR 改 C1-rest 路径(如 standards/ 措辞)→ 断言 gate 绿 + 配额内自动合并,零人工。

T3 配额(负向):时间窗口注入(测试用短窗口),一周内第 N+1 个 standards 变更 PR → 断言不自动合并、开排队 issue。

T4 破玻璃自动 revert(核心,时间注入):

  1. 模拟一笔破玻璃直推(登记进 direct_push_exemptions),回填截止时间设为测试短值。
  2. 超时后触发 drift-check → 断言自动生成 revert PR 并 auto-merge(复用 P2-6 装置),而非仅开 issue。
  3. 对照:时限内完成回填的直推 → 断言不触发 revert。

T5 soak(正向):一条治理规则变更自动合并后 → 断言其状态为 warn-only(违规只警告不拦截),7 天(测试注入短时长)后自动转 enforce。

依赖

  • P3-1(硬前提):gate 来源不可被 PR 修改,否则 scripts/ 降级为机器审等于开门
  • P2-6(破玻璃自动 revert 复用其装置)
  • P2-1(ADR 逃生门已用形式校验,本卡统一升级为实质校验)

Activity

  1. randypanding
    added
    governance治理体系相关
    auto-merge自动合并计划(#81)工作卡
    on Aug 20, 2026
  2. randypanding
    added a parent issue on Aug 20, 2026
    • 自动合并计划 #81
  3. randypanding commented on Aug 21, 2026

    @randypanding
    randypanding
    on Aug 21, 2026
    ContributorAuthor
    More actions

    排序说明(2026-08-21,协调 W1 波次):本单三项内容中,ADR 实质校验与 #164(W1-C1:旧 ADR 迁移 + adr-required 改查墓碑索引)触碰同一关卡代码。执行顺序:先 #164 落地(adr-required 改为查索引),本单的实质校验扩展在其后做,避免两个 agent 在同一段关卡逻辑上并行改。C1 拆分 core/rest 与破玻璃自动 revert 与本单其他部分独立,不受影响。

  4. randypanding commented on Aug 21, 2026

    @randypanding
    randypanding
    on Aug 21, 2026
    ContributorAuthor
    More actions

    排期决策(owner 定,2026-08-21)

    • 现在不动。W1 收口后作为治理卡排进 W2 后段。
    • 第 3 步(rest 路径放开 owner-merge)按宪法 §5 信任门对待:不是单纯工程步骤,而是"解锁一个自动合并域"——须先跑 shadow 证据(rest 类 PR 先做"本应自动合并但不合并"的比对),达标才放开。
    • 第 1、2、5 步(C1 清单落盘 / ADR 实质校验 / 破玻璃自动 revert)独立有价值,进入 W2 后可先行;其中 ADR 实质校验等 W1-C1: archive 仓创建与旧 ADR 归档迁移(重订宪法主体) #164 的 ADR 索引落地(已在 W1-C1: archive 仓创建与旧 ADR 归档迁移(重订宪法主体) #164 卡上注明预留扩展点)。

    现成资产(本卡执行时直接复用,2026-08-21 已建好)

    • 破玻璃自动 revert 的执行装置:post-merge 兼容 revert 路径(内容 API 逐文件恢复+PR+auto-merge,Use-up-Plan PR#76 / .github PR#179)——第 5 步只需把 drift-check §8 的超时检测接到这套装置上
    • 双轨一致性分析方法:[自动合并 P3-1] gate 定义上移至 org required workflows(枢轴) #95 关闭评论里的 check-runs 对照脚本口径(38 PR 样本先例)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    auto-merge自动合并计划(#81)工作卡governance治理体系相关

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.