Repository navigation
fix: 自动提升维护工作流可信来源 - #319
Merged
Merged
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🟡 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
Merged
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,未知结果不记为通过。
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.

现有 governance-promotion 只提升中央 required workflow,维护分支的独立规则不会随已验证 main 自动更新。本变更在既有受限 App、来源保护及工作流中增加准确维护目标 26975344,先验证两个完整规则,再顺序更新各自 SHA,并保留非 SHA 字段校验、失败读回和部分成功后的重入恢复。
验证:针对性 Vitest 61 项、原生 Node 62 项通过;typecheck、build、dist、配置和工作流验证通过。测试覆盖作用域漂移、disabled 规则、部分失败、丢失响应和最终双目标读回。线上双目标自动提升尚待采用后验证。
采用依赖:维护规则必须先按准确作用域激活并完整读回,再正常合并;disabled 状态会在任何规则写入前拒绝。两次规则写入不是原子事务,已成功目标保留,重入只协调未采用目标。使用正常 PR 修复或回退,禁止绕过保护。