Skip to content

fix: 验证维护 PR 等价 synthetic merge 重建 - #323

Merged
axiomoth merged 1 commit into
mainfrom
fix/maintenance-merge-identity-20261111
Nov 11, 2026
Merged

axiomoth merged 1 commit into
mainfrom
fix/maintenance-merge-identity-20261111

Conversation

@axiomoth

Copy link
Copy Markdown
Member

问题与变更

PR #321 reopen 后,GitHub 将 synthetic merge 从 c4f582991c5bcb2aebda9f84a54a0816f9851cc0 重建为 6c91a0ef3977d068b01fd7a1869ff57161cecb89,但有序父提交仍是相同 base21be466 与 head8b2211b,tree 同为 a9737fb41e8ed046f1eccf684d7d3411ca095e05。required run42958651113 已越过启动阶段,却被 liveIdentity 的纯 SHA 相等检查拒绝。原生 rerun 保持原事件 SHA,不能取得新事件 merge。

仅修改维护身份脚本及对应测试:事件 merge 和实际 checkout 不变;两次读回的 PR、base/head refs 必须精确匹配,检查期间 live merge ref 必须稳定。live merge 与事件 merge 不同时,仅在两份提交均有且仅有两个父提交、同序严格等于事件 base/head,且有效 tree SHA 完全相同时接受重建。原 head 签名、policy 已采用检查、本地 checkout/parents、历史合同及结果检查保持。审计输出新增 liveMerge,保留原 merge 字段。

验证

Node26.12.1 本地10项测试通过,覆盖真实PR321回归、不同tree、父提交反序/替换/增添、缺对象、API身份不符、检查期间live merge变化、base/head移动、unsigned head拒绝,以及等价新commit也不能替换原checkout。git diff --check通过。

只读真实API复验:旧逻辑报 MAINTENANCE_CI: refs moved;候选在准确base/head与两个merge SHA下通过。该结果不替代采用后真实required运行。最终PR AI审查及原生CI待本PR完成;不修改workflow、规则、签名要求或业务部署。源码采用后经main Native及既有双目标Promotion再交维护PR验收。

本次贡献由AI编程助手准备;新增head须按实际影响完成最终审查和必要检查。

Copilot AI lite review requested due to automatic review settings November 11, 2026 04:30
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 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-11T04:31:18.234536Z 3d66881 PR opened
🔒 Security Review ✅ Completed 2026-11-11T04:33:48.001326Z 3d66881 PR opened
ℹ️ 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.

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

该变更放宽了维护身份与 synthetic merge SHA 的信任边界,尽管静态检查和本地 fixture 覆盖主要分支,仍需维护者结合真实 GitHub API、required run 重试及并发 ref 变化确认运行时安全性。

No open issues 🎉

What changed in this PR

本 PR 修复维护 PR 重新打开后 GitHub 重建等价 synthetic merge 导致验证被错误拒绝的问题,同时继续使用事件中的原始 merge SHA 进行 checkout。

Changes:

  • 验证 live merge 与事件 merge 的 base/head 父提交顺序、tree SHA 及检查期间 ref 稳定性。
  • 在审计输出中新增 liveMerge,并保留原始 merge 字段。
  • 增加 PR321 回归测试及多种身份不一致、对象缺失和 ref 变化场景测试。
File Description
scripts/​test/​maintenance-ci.test.mjs 增加 synthetic merge 重建、身份校验失败、对象缺失、ref 变化及 PR321 回归测试。
scripts/​maintenance-ci.mjs 实现 synthetic merge 等价性验证、live merge 稳定性检查及 liveMerge 审计输出。

Review effort: Lite

@axiomoth
axiomoth merged commit 0e6ad89 into main Nov 11, 2026
15 of 16 checks passed
@axiomoth
axiomoth deleted the fix/maintenance-merge-identity-20261111 branch November 11, 2026 04:44
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/tests Test paths changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants