Skip to content

fix: 自动提升维护工作流可信来源 - #319

Merged
axiomoth merged 2 commits into
mainfrom
fix/maintenance-source-promotion-20261111
Nov 10, 2026
Merged

axiomoth merged 2 commits into
mainfrom
fix/maintenance-source-promotion-20261111

Conversation

@axiomoth

Copy link
Copy Markdown
Member

现有 governance-promotion 只提升中央 required workflow,维护分支的独立规则不会随已验证 main 自动更新。本变更在既有受限 App、来源保护及工作流中增加准确维护目标 26975344,先验证两个完整规则,再顺序更新各自 SHA,并保留非 SHA 字段校验、失败读回和部分成功后的重入恢复。

验证:针对性 Vitest 61 项、原生 Node 62 项通过;typecheck、build、dist、配置和工作流验证通过。测试覆盖作用域漂移、disabled 规则、部分失败、丢失响应和最终双目标读回。线上双目标自动提升尚待采用后验证。

采用依赖:维护规则必须先按准确作用域激活并完整读回,再正常合并;disabled 状态会在任何规则写入前拒绝。两次规则写入不是原子事务,已成功目标保留,重入只协调未采用目标。使用正常 PR 修复或回退,禁止绕过保护。

Copilot AI lite review requested due to automatic review settings November 10, 2026 20:21
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T20:27:17.835745Z 9f8ad8e New commits
🔒 Security Review ✅ Completed 2026-11-10T20:29:31.083558Z 9f8ad8e New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added auto/tests Test paths changed auto/docs Documentation paths changed labels Nov 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

A critical finding remains in scripts/governance-promotion.mjs: the sequential final verification can miss cross-target concurrent changes, allowing stale targets to be recorded and a success returned.

1 open issue
What changed in this PR

本 PR 将 governance promotion 从仅更新中央 required workflow 扩展为同时更新中央 Ruleset 18883080 与维护分支 Ruleset 26975344,通过完整读回、来源保护、顺序写入和部分成功后的重入机制提升双目标治理规则。

Changes:

  • 新增维护 Ruleset 的精确作用域、来源、工作流绑定及 active 状态校验。
  • 实现两个 Ruleset 的顺序提升、失败读回和部分成功恢复。
  • 增加双目标、保护漂移、disabled、丢失响应及最终读回场景的测试,并更新治理文档。
File Description
scripts/​governance-promotion.mjs 实现中央与维护 Ruleset 的双目标验证、顺序提升、失败恢复和重入协调。
packages/​runner/​test/​governance-promotion.test.ts 覆盖双目标提升、保护条件失败、部分成功重入、保护漂移和读回异常场景。
docs/​governance-promotion.md 记录维护 Ruleset 的作用域约束、双目标顺序写入、非原子限制及恢复流程。

Review effort: Lite

Comment thread scripts/governance-promotion.mjs Resolved
Copilot AI lite review requested due to automatic review settings November 10, 2026 20:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

该变更将以非原子顺序写入两个生产级 GitHub Ruleset,但目前仅由本地夹具验证,真实规则结构、权限、原生 API 回读及首次线上部分成功恢复仍缺乏证据。

No open issues 🎉

1 resolved since last review

Review effort: Lite

@axiomoth
axiomoth merged commit ffc4e6a into main Nov 10, 2026
15 of 16 checks passed
@axiomoth
axiomoth deleted the fix/maintenance-source-promotion-20261111 branch November 10, 2026 20:48
axiomoth added a commit that referenced this pull request Nov 11, 2026
## 摘要

将旧运行时维护分支接入中央受信维护校验,支持后续普通维护 PR。变更类型:构建与依赖、测试、文档。

## 变更原因

PR307 的一次性旧校验不能承接普通维护;本 PR 为维护树补齐可信扫描兼容性及可重现工具锁。

## 主要改动

- 后续维护 PR 使用中央 required workflow;旧 validate 仅为 PR307 保留入口。仓库 ID/profile
经环境变量传入 shell。
- 移除三个旧 workflow_run 自动入口,保留其余触发器和 job。
- 为 11 个本地工作流及中央 required workflow 生成官方 Actions 锁。
- 将 npm 11.21.2 纳入 package-lock 工具依赖,内置 brace-expansion 5.0.12 修复
GHSA-6j4f-fj2g-mc7p、GHSA-qhr7-859c-m2p7;Node 保持 24.22.0。
- 历史合同测试读取固定 21be466 提交的真实文件;当前维护入口使用独立固定 P 的扫描与来源核对。

## 关联事项

相关 #307、#317、#319、#322、#323。本 PR 完成维护树首次接入;旧服务部署、消费者切换及资源退役按独立交接窗口执行。

## 验证结果

- 当前
H:85734db63ae4f37429a598975a8514eb976c465f;tree:542370c781f90199e8cfa25bcb104adcefd368ee。
- 前一 H7c69 的真实 required
[42980492484](https://github.com/splrad/steward/actions/runs/42980492484)
全部通过:来源身份、构建测试、dependency review、最终检查。
- 实际 WORKFLOW_SHA 为
0e6ad89;source/final 记录事件 merge 与
liveMerge 均为 de4170b。
- 托管测试 84 文件、1964 项通过、10 项跳过;typecheck、verify:config、verify:dist
通过。平台跳过项保留,不记为通过。
- 11 个工作流经受信 jactionlint/zizmor 扫描通过,exceptions=[];官方 Actions
锁验证通过。工具原始警告及外部根信息项保留。
- Node 24.22.0 / npm 11.21.2 本地 npm ci 与维护入口合同测试通过。
- 当前准确 H 的最终 AI 审查正在完成。此前 H8b 的五条裁定保留历史。H7c69 的两条 Copilot
意见已分别按历史事件不可达裁定、同步维护文档版本处理并解决线程;其 Codex code 无发现,security null 记为
UNKNOWN。H8e的摘要high已按[公开证据裁定](https://github.com/splrad/steward/pull/321#issuecomment-6790356691)修正README与workflow-validation文档范围,旧镜像不恢复;当前最终文档H正在重新完成审查/CI。

## 影响分析

runtime 源码、runner dist、PR307 evaluator 和原 workflow-contract
历史字节保持一致。本次影响维护验证、工具依赖与自动工作流入口,无生产权限增加或业务数据迁移。

## 发布与迁移

中央来源固定 0e6ad89。准确 H
的必要审查结束后,仅将维护规则26795348的 validate/App15368 替换为 SPLRAD Maintenance
Validation/App15368,保留其余保护和 approval26795350,再按期望 H 正常 squash 合并。服务窗口
NOT_OPEN。

## 回退方式

采用前可关闭本 PR;采用后通过正常受保护 PR 回退适配,并协调有效检查来源和 context。

## AI 使用声明

本次贡献由 AI 编程助手代理生成;人类已批准任务范围,代码审查状态以本 PR 实际记录为准。

## 补充材料

维护与恢复边界见 CONTRIBUTING.md;完整 CI 与审查证据保留在本 PR,未知结果不记为通过。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto/docs Documentation paths changed auto/tests Test paths changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants