Skip to content

fix(ci): 接入旧运行时受信维护校验 - #321

Merged
axiomoth merged 11 commits into
maintenance/legacy-runtime-e990edafrom
codex/maintenance-entry-20261111
Nov 11, 2026
Merged

axiomoth merged 11 commits into
maintenance/legacy-runtime-e990edafrom
codex/maintenance-entry-20261111

Conversation

@axiomoth

@axiomoth axiomoth commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

摘要

将旧运行时维护分支接入中央受信维护校验,支持后续普通维护 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,16 文件、11 个新增提交签名均有效。
  • 真实 required 42982729406 全部通过;实际 policy 0e6ad8960595add3cd8f6d5f7ec2e590f070bfd7,source/final 同时绑定事件 merge/liveMerge aac786178723aa23453c82bb2e118de12aa57e19。
  • 托管84文件、1964通过、10项既有条件跳过;类型/配置/dist、可信原生扫描、官方Actions锁及dependency review通过。
  • 最终Codex code无发现,security completed/null记UNKNOWN;Copilot完成。7条inline均处理,摘要意见的具体范围裁定及文档修复见回复一、回复二。

影响分析

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

发布与迁移

规则26795348仅完成validate/App15368→SPLRAD Maintenance Validation/App15368替换,其余保护、approval26795350和中央来源未变。正常squash采用 M 7dbe75db54cbab785089836c343117c205837b7d 签名有效,tree 542370c781f90199e8cfa25bcb104adcefd368ee与最终H一致,维护分支已指向M。合并后旧Deploy Runtime42983554207按default-only guard跳过。服务窗口NOT_OPEN,未部署或退役资源。

回退方式

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

AI 使用声明

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

补充材料

维护与恢复边界见 CONTRIBUTING.md;完整 CI 与审查证据保留在本 PR,未知结果不记为通过。

This file is auto-generated and contains the locked versions of GitHub Actions used in various workflows.
Preserve manual dispatch and existing completion jobs.
Preserve schedule, manual dispatch, and synchronization jobs.
Preserve schedule, manual dispatch, and review-instruction synchronization.
@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-11T07:57:41.045458Z 85734db New commits
🔒 Security Review ✅ Completed 2026-11-11T07:57:34.539447Z 85734db 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/workflows GitHub workflow paths changed auto/docs Documentation paths changed labels Nov 10, 2026
Generated by gh actions-lock v0.4.0 --no-narrow from the 11 candidate workflows and exact required workflow source ffc4e6a. No workflow YAML changes.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8b2211bcf8

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/verify-workflows.mjs Resolved

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

Three critical active issues remain: the workflow entry no longer matches the trusted validation contract, legacy tests depend on Git objects unavailable in shallow CI checkouts, and the deploy job invokes workflow verification without preparing its required central policy dependency.

3 open issues
What changed in this PR

本 PR 将旧运行时维护分支接入中央受信维护校验,同时保留 PR307 历史校验入口,并更新工作流扫描、历史合同回归测试、工具依赖与 Actions 锁定。

Changes:

  • 将本地工作流校验包装器改为调用指定中央 policy 的扫描器。
  • 将历史合同测试切换为固定提交 fixture,并新增维护入口及旧自动触发器回归测试。
  • 锁定 npm 11.19.1、GitHub Actions 依赖和中央 required workflow 来源,并更新维护流程文档。
File Description
scripts/​verify-workflows.mjs 从环境变量指定的中央 policy 目录加载并执行工作流扫描。
packages/​runner/​test/​workflow-contract.test.ts 使用固定历史工作流 fixture 验证旧工作流合同。
packages/​runner/​test/​workflow-adaptation.test.ts 将工作流适配回归测试切换为固定历史提交中的工作流内容。
packages/​runner/​test/​pr253-contract.test.ts 使用历史工作流快照覆盖 PR253 合同兼容性。
packages/​runner/​test/​maintenance-entry.test.ts 新增当前维护入口及旧 workflow_run 自动入口退役的回归测试。
packages/​runner/​test/​legacy-workflow-fixture.ts 从固定提交读取并构造历史工作流测试 fixture。
package.json 新增 npm 11.19.1 开发依赖并保持 Node.js 工具版本配置。
package-lock.json 锁定 npm 11.19.1 及其依赖树。
CONTRIBUTING.md 补充中央 policy 扫描、Actions 锁更新和维护分支验证流程说明。
.github/​workflows/​sync-review-instructions.yml 移除部署完成后的 workflow_run 自动入口。
.github/​workflows/​sync-managed-labels.yml 移除部署完成后的 workflow_run 自动入口并保留手动及定时触发。
.github/​workflows/​release-build-complete.yml 移除构建完成后的 workflow_run 自动入口并保留手动入口。
.github/​workflows/​pr-validation.yml 保留 PR307 历史校验入口并通过环境变量传递验证参数。
.github/​workflows/​actions.lock 新增本地工作流及中央维护校验工作流的官方 Actions 锁定信息。

Review effort: Lite

Comment thread .github/workflows/pr-validation.yml Resolved
Comment thread scripts/verify-workflows.mjs Resolved
@axiomoth axiomoth closed this Nov 11, 2026
@axiomoth axiomoth reopened this Nov 11, 2026
axiomoth added a commit that referenced this pull request Nov 11, 2026
## 问题与变更

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须按实际影响完成最终审查和必要检查。
@axiomoth axiomoth closed this Nov 11, 2026
@axiomoth axiomoth reopened this Nov 11, 2026
Copilot AI lite review requested due to automatic review settings November 11, 2026 07:34

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

工作流中 PR307 的历史验证入口仍会因新增条件触发策略校验失败,同时 package.json 将 npm 锁定为 11.21.2 而仓库合同与 PR 要求仍为 11.19.1,存在未解决的关键一致性问题。

2 open issues
3 resolved since last review

Review effort: Lite

Comment thread .github/workflows/pr-validation.yml Resolved
Comment thread package.json Resolved
Copilot AI lite review requested due to automatic review settings November 11, 2026 07:40

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

The change makes the documented npm run verify path fail without an external policy checkout and removes repository-specific workflow contract checks, allowing candidates to bypass required business validation.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

High severity 保留本仓库业务合同校验作为验证门禁

scripts/​verify-workflows.mjs:9

这里把原先由 verifyWorkflowPolicy 执行的本仓库校验整体替换成了 scanWorkflows。因此 npm-verify-workflows 不再检查 config/repositories.json 的工作流清单、必需入口以及 release/build、环境和 artifact 等业务合同;这些合同仍在 docs/workflow-validation.md:11 声明需要保留。这样候选可以通过中央通用扫描,却绕过本仓库的业务门禁。请保留当前工作区的业务合同校验,并将中央可信扫描作为额外步骤,或让受信入口明确执行两者。

2 resolved since last review

Review effort: Lite

Copilot AI lite review requested due to automatic review settings November 11, 2026 07:52
@axiomoth

Copy link
Copy Markdown
Member Author

针对 review5855431628 正文中的 high 意见,已逐项核对并在 85734db 修正文档:

  1. 接受文档适用性问题。README 现在明确完整 verify 所需的 adopted policy checkout、锁定工具及环境变量;docs/workflow-validation.md 区分当前原生维护验证与 PR307 历史合同,保留原历史说明。
  2. 当前维护 required 由独立固定 P 执行 source/final 身份核对、真实 jactionlint/zizmor、官方 Actions 锁、dependency review 和构建测试。旧目录清单、完整 YAML/steps/argv 镜像已由原生维护方案替代,因此不恢复整套 verifyWorkflowPolicy 作为普通维护准入;通用扫描不被表述为全部业务语义的替代。
  3. 当前业务测试仍保留:此前准确 H8e 的真实 run42981168017 为84文件、1964通过、10跳过,类型/配置/dist通过。旧 evaluator、runner index/policy、authority/contract 以及 release.yml、release-build.yml、product-build.yml 相对base21be466未改;本次三个 callback 的具体变化仅为停止旧workflow_run,当前维护入口测试覆盖该变化。历史fixture只证明固定旧输入逻辑。
  4. 旧共享服务恢复固定 POLICY_SHA=e990eda24ef7099264dada118b3e7ddfad883cea / WORKFLOW_EVALUATOR_SHA=2b1f04796de0231e74d40351dc0f4c8b07afe77d,不能改用维护H。PR307已合并关闭,不声称原PR可重新执行;本次未部署或执行恢复。

上述文档修订的新H将重新完成required与最终AI。此意见虽无独立inline线程,仍保留原review及本条具体裁定。

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

A critical active issue blocks every reachable deployment run because the required policy variable is unset, preventing verification from reaching subsequent deployment steps.

No open issues 🎉

Review effort: Lite

@axiomoth

Copy link
Copy Markdown
Member Author

对最终 H85734db 的 Copilot review5855562509 概述补充核对:未新增具体inline issue,7条历史线程均已处理。概述所述部署policy变量问题仍对应此前裁定的旧 deploy-runtime 入口:当前候选该job仅允许仓库默认分支;实际默认分支采用P0e6ad896已不存在此工作流。维护分支不会运行该部署job,本PR真实required42982729406使用独立固定P且source/build/dependency/final全部成功。旧服务部署须走另行授权的独立交接路径,当前服务窗口未开放。因此不为本PR不可达的旧部署路径修改runtime或引入额外部署行为。新H Codex code完成无发现,security完成但null仍记UNKNOWN;原review及此范围裁定均保留。

@axiomoth
axiomoth merged commit 7dbe75d into maintenance/legacy-runtime-e990eda Nov 11, 2026
9 checks passed
@axiomoth
axiomoth deleted the codex/maintenance-entry-20261111 branch November 11, 2026 07:59
axiomoth added a commit that referenced this pull request Nov 11, 2026
## 摘要

为仍承担共享职责的维护分支接通持续依赖与工具链更新。配置由默认分支读取,更新 PR 指向
`maintenance/legacy-runtime-e990eda`;此前只有默认分支更新入口。

## 变更原因

#321 已采用可信维护 CI,后续普通维护 PR 具备准确来源验证路径。现补齐维护树的更新发现配置,避免将仍在使用的代码误当纯历史快照。

## 主要改动

- Dependabot 保留原4个条目,追加维护分支根 npm 与 GitHub Actions 两个条目。维护 npm 条目忽略 npm
工具包,普通依赖继续由 Dependabot 更新。
- Renovate 保留原配置及默认分支行为,增加准确维护 base,仅启用
`.node-version`、`engines.node`、`packageManager`、`devDependencies.npm`
四字段。Node/npm 各两字段分别同组,major/minor/patch 均可更新;npm 工具由 Renovate 独占,独立 npm
lock maintenance 关闭。
- 两份配置均在 main 采用;维护树不另置第二份配置,也不启用 `useBaseBranchConfig` 合并。

## 关联事项

相关 #321、#320。配置采用与真实托管更新事务分别验收;服务交接仍独立进行。

## 验证结果

- 准确 main 基准 `c1dda9574b50cd84eb66a3d582f6f3bfcdd171e7`;维护输入
`7dbe75db54cbab785089836c343117c205837b7d`,Node24.22.0/npm11.21.2。
- 官方 Renovate44.222.4 原生 npm/nodenv
提取与423个有效规则案例通过:准确维护分支仅四字段、两组各两项,major/minor/patch均成组;main既有配置与有效匹配保持,其他分支无新增
npm/nodenv 命中。
- 官方Windows strict schema通过,RE2回落警告保留;现有官方Linux44.206.2容器的RE2 strict
schema也通过,版本不同不冒称同版托管结果。
-
隔离夹具用真实registry候选npm12.2.2演练:原生同时更新两声明,准确Node24.22.0/npm11.21.2生成锁,90个变化仅根/npm子树,声明/锁一致,engine-strict下npm
ci通过。未升级真实维护树,未把该夹具当托管Mend事务证明。
- 既有Renovate scanner
manager回归通过;使用main锁定mise工具的verify:config通过;diff检查通过。CI及最终AI以此PR准确head实际结果为准。

## 影响分析


仅修改两个更新配置文件。main既有更新职责不变;维护普通npm/Action与工具链更新者分工避免重复写入。未修改runtime、维护源码、状态、Environment、保护规则或服务。

## 发布与迁移


通过最终审查与CI后按协调窗口正常合并。随后核实托管作业读取已采用配置、扫描准确维护base,并对真实发现的版本验收声明/锁或Action/锁事务。无真实后继时记录无更新,不制造版本事件。配置合并不代表托管消费已完成,也不授权部署。

## 回退方式

通过正常受保护PR撤回新增维护条目,保留默认分支既有配置和历史证据。

## AI 使用声明

本次贡献由AI编程助手代理实施,人类已授权本范围;最终检查与审查按实际记录判定。
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 auto/workflows GitHub workflow paths changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants