Skip to content

fix(runtime): 独立停用旧发行入口并保留共享服务 - #307

Merged
axiomoth merged 10 commits into
maintenance/legacy-runtime-e990edafrom
codex/legacy-runtime-retirement-20261108
Nov 8, 2026
Merged

axiomoth merged 10 commits into
maintenance/legacy-runtime-e990edafrom
codex/legacy-runtime-retirement-20261108

Conversation

@axiomoth

@axiomoth axiomoth commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

旧 runtime 的发行恢复与正文恢复、校验共用 Worker 和 cron。本变更以 LEGACY_RELEASE_RETIRED=true 停止旧发行 webhook、恢复、内部 HTTP 路由及派发,保留共享服务。

仅面向 maintenance/legacy-runtime-e990eda,固定历史基线 e990eda24ef7099264dada118b3e7ddfad883cea。原版固定工具链重建与部署留存 JS 逐字节相同。缺省/false 的历史行为仍有测试;true 是整个维护候选的目标。send 在令牌签发前检查,sendWithClient 保留函数自身防御约束;目前后者仅由 send 调用。

专用维护校验绑定准确历史 base、同仓来源、签名 head、原生 merge ref/父提交、文件清单及固定契约,并复读身份。兼容 GitHub API 2026-03-10;默认分支合同、workflows 和完整 11 项验证任务不变。

部署流程必须先完成有效维护分支保护和最终审查,正常合并后,由中央在候选代码之外通过原生平台核准准确合并提交 M、签名、tree 及实际保护,再启动部署器。禁止在中央认证上下文运行未合并候选。此前 protected=true 仅源于 Copilot 规则;中央已补齐准确维护 ref 的有效规则 26795348(核心无绕过)和 26795350(仅既有 Team 20544072 的 PR 批准例外),原生读回一致。规则生效不代表可合并或部署。脚本内 MERGED、同仓 headRepository、准确维护 baseRef、真实 mergeCommit 及同树检查只是防误用,不能证明候选代码自身可信。

deploy-legacy-runtime.mjs 只接受 checkout 外中央指定的采用记录;记录不是密码学授权凭证。它绑定 reviewedHead 与实际合并 deploymentHead、tree、bundle、目标/当前版本、policy/evaluator、窗口及具体审查证据。记录精确绑定 validationRunAttempt/copilotRunAttempt 正整数;指定 run 回读和最新完整列表都核对 attempt,同 ID 成功重跑也要求重建采用记录。完整分页双读同 PR/head 的 CI、Copilot run/check/review;未完成、新轮结果、缺页、变化或无法判定时间均拒绝。保留 App/suite/PR/head、review 正文 SHA256 与人工裁定引用,兼容既有 Markdown 和当前 HTML overview。Codex 双审查须终态,并精确绑定 codexCommentBodySha256;同 ID 汇总正文变化也须中央重新裁定并生成记录。null 不视为零,发现须人工裁定,不能机械把 true 当永久阻断。

复用 cf 原生认证客户端,上传前后核账户 origin、workers.dev 启用和唯一 100% 活动版本;重建摘要匹配后上传并强制核 health 与旧 permit 410/no-store。成功仅表示新请求屏障,后续仍须在途对账。无 D1 迁移;不调用旧部署 workflow;已上传但复核失败须先对账。窗口检查属于有时限前置检查,不是 GitHub/Cloudflare 原子事务。cf beta.27 内部适配随组件更新验证,不永久冻结升级。

验证:本地 73 项相关测试、typecheck 和 diff 检查通过;完整原生 CI 与全部 AI 审查须匹配 PR 最终 head,准确结果见 Checks 及收尾评论。历史 actionlint 下载故障保留记录,不盲目重试或豁免,也不沿用其他 head 结果。可信合并执行 P1 已由代码、实际保护及外部执行前核验流程修正,生产采用仍需逐项执行这些门槛。

固定 Node 24.22.0/npm 11.19.1/Wrangler 4.149.0/esbuild 0.28.2。Worker 产物未变:441398 bytes,SHA256 733ec5a361c16ce7c0d607de1a1161516fba7985937ac4cc6c085f1294cab792。未生成真实批准实例,未合并、部署或修改 Environment。生产切换仍等待中央/A/B 窗口和在途交接。

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

chatgpt-codex-connector Bot commented Nov 8, 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-08T11:23:55.864356Z 214a56c New commits
🔒 Security Review ✅ Completed 2026-11-08T11:30:15.356926Z 214a56c New commits

Security findings

Advisory findings (1)

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

Note

Copilot was unable to run its full agentic suite in this review.

Copilot review overview

4 open issues
What changed in this PR

Introduces a runtime “legacy release retirement” switch to short-circuit legacy release endpoints and related dispatch paths, plus tests to validate the retirement behavior.

Changes:

  • Add LEGACY_RELEASE_RETIRED env switch and helper utilities (legacyReleaseRetired, assertLegacyReleaseActive).
  • Block legacy /internal/releases/* requests (410) and prevent release-related workflow dispatch / receipt recovery when retired.
  • Add/extend Vitest coverage for retired behaviors and update runtime/test env fixtures.
File Description
packages/​runtime/​wrangler.toml Enables the retirement switch via runtime vars.
packages/​runtime/​src/​release-retirement.ts Adds the retirement flag helper functions/types.
packages/​runtime/​src/​release-api.ts Returns 410 for legacy release routes when retired.
packages/​runtime/​src/​release-build-api.ts Prevents write-token minting when retired.
packages/​runtime/​src/​pr-body-api.ts Extends env typing with the retirement flag.
packages/​runtime/​src/​index.ts Prevents release workflow dispatch + receipt recovery when retired.
packages/​runtime/​test/​release-retirement.test.ts New tests covering 410 behavior and early-blocking.
packages/​runtime/​test/​release-events.test.ts Tests that webhook/recovery paths no-op when retired.
packages/​runtime/​test/​pr-body-api.test.ts Updates test env fixture with retirement flag.
packages/​runtime/​test/​index.test.ts Updates test env fixture with retirement flag.

Review effort: Lite

Comment thread packages/runtime/src/index.ts Resolved
Comment thread packages/runtime/test/index.test.ts Resolved
Comment thread packages/runtime/wrangler.toml 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.

Comment thread packages/runtime/wrangler.toml Resolved
Copilot AI lite review requested due to automatic review settings November 8, 2026 09:35

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.

Copilot AI lite review requested due to automatic review settings November 8, 2026 09:58

Copilot AI left a comment

Copy link
Copy Markdown

Comment thread packages/runtime/wrangler.toml Resolved
Comment thread packages/runtime/src/index.ts Resolved
Copilot AI lite review requested due to automatic review settings November 8, 2026 10:08

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.

Copilot AI lite review requested due to automatic review settings November 8, 2026 10: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.

🟡 Changes recommended

Deployment acceptance has two critical flaws: it can trust incomplete or unrelated Copilot evidence without validating required bindings and review content, and it checks a workflow name that does not match the repository’s actual workflow.

4 open issues

Review effort: Lite

Comment thread scripts/deploy-legacy-runtime.mjs Resolved
Comment thread scripts/deploy-legacy-runtime.mjs Resolved
Copilot AI lite review requested due to automatic review settings November 8, 2026 10:33

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

Multiple critical integration and deployment-gate issues remain, including a stale CI artifact, non-current review validation, an unavailable deployment client, and a missing draft-status check.

2 open issues
2 resolved since last review

Review effort: Lite

Copilot AI lite review requested due to automatic review settings November 8, 2026 10:50

axiomoth commented Nov 8, 2026

Copy link
Copy Markdown
Member Author

针对 review5817557127 汇总中的四项疑问,逐项核对:

  • draft:verifyAdoptionSource 首条件已有 pull.isDraft 拒绝,GraphQL 请求也读取该字段。
  • deployment client:固定 Node24.22.0 下已实际通过 cf 原生客户端只读取得账户 subdomain、脚本 workers.dev enabled 和当前 100% 部署。该客户端用于受信中央维护主机,未要求 CI 安装 cf;缺失或未知适配版本会在部署前拒绝。
  • CI artifact:9077188 原生 run42472022247 的 npm-verify-dist 已通过;总 CI 仍因 actionlint 官方下载失败,未声明总 CI 通过。新改动仅独立部署脚本和其测试,不改变 runner 源码或 dist。
  • non-current review:确有窄缺口,已在 8d71c2a 修复。完整分页核同仓/PR/head 最新 validation、Copilot dynamic run、App15368 check 和已提交 review;新一轮在途、更新失败或新 review 都使旧采用记录失效。全集分页计数后过滤,双完整读取的身份/状态指纹变化、缺页、重复、未知/并列时间均拒绝。早期终态失败被后续选定成功轮替代后可通过。54 项相关测试及真实 API 只读分页验证通过;最终新 head 仍重新跑全部 CI/AI,不继承旧结论。

两个既有配置/双 guard 设计讨论已按准确范围完成独立复核,并纠正当前 sendWithClient 只有 send 一个调用者的事实。尚未生成中央批准实例或操作生产。

@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: 8d71c2aa69

ℹ️ 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/deploy-legacy-runtime.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.

🔵 Needs a closer look

Human assessment is needed because multiple critical concerns remain around stale generated artifacts, inconsistent review validation, incomplete PR provenance checks, and an adoption-window race.

No open issues 🎉

2 resolved since last review

Review effort: Lite

@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 Security Review · Automatically triggered

Here are some automated security review suggestions for this pull request.

Reviewed commit: 8d71c2aa69

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment thread scripts/deploy-legacy-runtime.mjs Resolved
Copilot AI lite review requested due to automatic review settings November 8, 2026 11:03

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

Human assessment is needed because critical hidden issues affect both workflow-attempt evidence binding and the adoption-record path boundary, undermining the deployment gate’s reliability.

No open issues 🎉

Review effort: Lite

Copilot AI lite review requested due to automatic review settings November 8, 2026 11:13

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

存在关键运行产物未与源码同步,以及部署门禁未严格核验 Codex 发现裁定和外部记录路径等问题,可能导致实际验证入口失效并放行未处理的发现,因此需要人工评估。

No open issues 🎉

Review effort: Lite

Copilot AI lite review requested due to automatic review settings November 8, 2026 11:22

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.

Comment thread packages/runtime/src/index.ts Resolved
Comment thread scripts/deploy-legacy-runtime.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.

Comment thread packages/runner/src/index.ts Resolved
Comment thread scripts/deploy-legacy-runtime.mjs Resolved

axiomoth commented Nov 8, 2026

Copy link
Copy Markdown
Member Author

最终审查读回(2026-11-08 11:36 UTC):准确签名head 214a56cb1017cb29175c8b8b1642589e2f8ae865,tree 527bb7991c822dd0da5765d938e6860aceaed2dc;当前20个inline threads全部resolved。

  • Native validate 42475457204 attempt1成功:83文件1963测试通过、10原有平台skip,全部11项校验通过;标题检查成功。本地73项相关测试、typecheck和diff检查通过。
  • Copilot 42475908597 attempt1成功,check128717122133/App15368/suite115062625127绑定当前head和PR307,完整review5817705530。此前42475444652的HTTP504/127准备失败及不完整fallback5817689309保留,不算成功证据;已通过一次原生UI重新请求恢复。
  • Codex code/security均当前head completed;code findings=false,security flags=null保持未知,不报告零安全发现。

完整Copilot意见已逐条独立判断并回复:准确ref远端dist确含维护逻辑且本head verify-dist成功;重复双guard保留已裁定设计;两项诊断提示属于非阻断可读性建议,未声称已修改;人工裁定引用属于可信中央外部记录定位,实际采用时须创建绑定准确head、review IDs/attempts、原文hash及逐项裁定的不可变快照,正文变化重裁定并新建快照/采用记录,禁止沿用旧快照。当前未生成该生产采用实例。

P1采用受保护分支正常合并后执行路径,实际保护已生效;中央须在候选代码之外核准真实M/签名/tree/来源/保护和最终证据后才启动M。脚本内校验仅防误用,不是自身信任证明。当前PR仍OPEN、未合并、未部署、未修改生产Environments;切换继续等待中央/A/B窗口与在途交接。这是审查交付记录,不是部署批准。

@axiomoth
axiomoth merged commit 21be466 into maintenance/legacy-runtime-e990eda Nov 8, 2026
5 of 7 checks passed
@axiomoth
axiomoth deleted the codex/legacy-runtime-retirement-20261108 branch November 8, 2026 11:41

axiomoth commented Nov 8, 2026

Copy link
Copy Markdown
Member Author

代码采用读回:PR307已正常squash合并,M=21be466b5689a0b8df76249eb1c9249359a6d57a与已审H=214a56cb1017cb29175c8b8b1642589e2f8ae865同tree 527bb7991c822dd0da5765d938e6860aceaed2dc,两者签名valid,受保护维护分支指向M。push Deploy Runtime42476873795 的job128720110399明确skipped。

先前正常合并因dynamic Copilot context不属于平台可评估的required workflow checks而405;依据官方说明,中央只纠正该无效映射,其余严格核心保护和批准规则不变。全部当前head AI、检查、签名及20线程解决已在正常限定head合并前重新核准,无admin。

这仅完成代码采用;未生成真实部署记录/生产裁定快照,未执行部署脚本或改变生产Environments。实际服务切换继续等待协调窗口和在途交接。

axiomoth added a commit that referenced this pull request Nov 10, 2026
## 摘要

为共享旧运行时的普通维护 PR 提供中央受信原生检查,支持工作流、调用者、测试及工具版本在同一 PR 中更新。变更类型:构建与依赖、测试。

## 变更原因

PR307
的一次性身份合同不能接收日常维护;候选自身的同名检查也不能替代固定中央来源。普通工作流更新应由受信原生扫描验证,无需先另合一个允许变更的结构或
SHA 合同。

## 主要改动

- source/final 分别核对同仓 PR、准确 base/head/merge、有效签名、平台 workflow 来源及新鲜
refs;候选测试在独立只读 job 执行。
- 复用中央文件发现、jactionlint、zizmor、mise 锁和官方 Actions 锁验证器,扫描候选真实 YAML、本地调用与复合
Action;候选 npm/mise/ignore 配置不能决定扫描器。
- 普通工作流增删、改名、命令、needs/matrix 与同项目 Action SHA 更新不再依赖精确结构清单或另一份 SHA
批准表。原生项目许可、完整 SHA、安全扫描、审查及必要配置交接继续适用。
- Node/npm 读取维护声明并可同 PR 更新;npm 由维护 package-lock 中的 devDependencies.npm
锁定,必须与 packageManager 一致,bootstrap 后使用该 CLI 执行检查。API 复用 #309 唯一
helper/config,不新增发现器。
- PR307 evaluator 和原恢复合同仅保留历史字节。候选业务测试是自检,不能替代可信扫描;检查器自身升级沿旧 P
检查候选、合入验证后提升来源的既有机制。

## 关联事项

相关 #307、#309。本 PR 只交付中央入口;维护树适配和原生 required-workflow 采用另按准确阶段交接。维护树须先具备
npm 工具锁、Actions 锁和原生扫描兼容性,不能直接把历史树视为已接入。

## 验证结果

- Windows Node26.12.1:独立 Node 6项、Vitest
2项通过;真实扫描覆盖普通路径增改/改名、matrix/命令、完整 SHA 变化,错误 needs 与候选
ignore/命令注入仍拒绝;类型/源码边界、中央18文件原生扫描及官方 Actions 锁检查通过。
- 配套维护树11工作流经真实 jactionlint/zizmor通过,exceptions为空;原生锁验证通过,runner
dist逐字节验证通过。相关历史合同及新入口回归已验证;准确 Node24.22.0/npm11.19.1
全量84文件、1969项通过、5项既有跳过。配套维护改动不包含在线部署。
- 当前 H6e0779a8 已由 GitHub 原生 update-branch 同步主线 b87eb99,签名 valid、相对 main
仍7文件;本地6项Node/2项扫描测试通过,新H Native42878150571 attempt1
success(最终job130055158443);同head Copilot无未解决问题、Codex code
completed/false、security
completed/null=UNKNOWN。实际运行P=f1796f9;待F来源提升后按有效规则、merge
eligibility和受影响实现判断结果适用性,不自动重跑或冒称新P。此前 a8f1112 的
Native42865688367成功及完整AI终态仅保留为历史,不替代新head验收。

## 影响分析

仅 contents/pull-requests read,无
Environment、生产秘密、迁移或部署权限。source/final不执行候选业务代码,候选自检不自动证明测试语义可信,测试/依赖修改仍由完整PR审查承担。security
null保留未知;同名status不能替代ruleset来源绑定。

## 发布与迁移

中央代码完成审查/CI并采用后,固定required
workflow来源,再以真实维护PR验证适配并交接必需检查。保留strict、标题、签名、人工审批和线程解决。受信来源、必需检查、特权身份或未批准外部项目变化仍需准确原生配置交接。业务Worker保持未部署。

## 回退方式

线上采用前可回退本源码PR;采用后先恢复已验证的受信来源并保持检查,不关闭规则绕过。无持久业务数据修改。

## AI 使用声明

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

## 补充材料

接入边界见 docs/maintenance-validation.md。维护实际required
workflow运行与服务切换分别验收,不以本地检查替代。
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