Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
Security findingsAdvisory findings (1)
ℹ️ 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.
Note
Copilot was unable to run its full agentic suite in this review.
Copilot review overview
4 open issues
The retirement guard is duplicated in bothsendWithClientandsend. Sincesendcalls… · New SettingLEGACY_RELEASE_RETIREDto\"true\"in the shared/base env fixture makes the retired… · New SettingLEGACY_RELEASE_RETIRED = \"true\"inwrangler.tomlwill force-retire legacy release… · New This test’s env fixture now always enables retirement. If these tests are intended to validate PR… · New
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_RETIREDenv 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
There was a problem hiding this comment.
🟡 Changes recommended
现有部署后复核未验证实际 Worker 中的 LEGACY_RELEASE_RETIRED 是否仍为 true,因此变量未传播或被覆盖时部署仍可能成功并继续处理旧 release webhook/route。
5 open issues
部署复核未验证 LEGACY_RELEASE_RETIRED=true,旧路由可能仍启用 · New SettingLEGACY_RELEASE_RETIRED = \"true\"inwrangler.tomlwill force-retire legacy release… SettingLEGACY_RELEASE_RETIREDto\"true\"in the shared/base env fixture makes the retired… The retirement guard is duplicated in bothsendWithClientandsend. Sincesendcalls… This test’s env fixture now always enables retirement. If these tests are intended to validate PR…
Review effort: Lite
There was a problem hiding this comment.
🟡 Changes recommended
专用校验将 PR 的 merge_commit_sha 错误地与调用方传入的 policySha(工作流提交 SHA)强制相等,导致真实的维护 PR 在读取源码前被拒绝。
2 open issues
4 resolved since last review
SettingLEGACY_RELEASE_RETIRED = \"true\"inwrangler.tomlwill force-retire legacy release… SettingLEGACY_RELEASE_RETIREDto\"true\"in the shared/base env fixture makes the retired… The retirement guard is duplicated in bothsendWithClientandsend. Sincesendcalls… This test’s env fixture now always enables retirement. If these tests are intended to validate PR…
Review effort: Lite
There was a problem hiding this comment.
Note
Copilot was unable to run its full agentic suite in this review.
Copilot review overview
5 open issues
SettingLEGACY_RELEASE_RETIRED = \"true\"in the base[vars]applies to all Wrangler… · New The origin validation does not reject URLs with an explicit port (e.g.https://host:8443/). If… · New Theversioncheck is overly permissive for a UUID (it accepts any 36-char mix of hex and dashes,… · New Comparing/healthresponses viaJSON.stringifyis brittle: key ordering (or benign additional… · New The legacy-dispatch guard is applied in bothsend()andsendWithClient(), which is redundant… · New
2 resolved since last review
Review effort: Lite
There was a problem hiding this comment.
🔵 Needs a closer look
Human review is needed because the deployment gate does not bind the probe to the trusted runtime origin or the fixed reviewed commit and bundle digest, allowing an unverified worker or arbitrary signed candidate to be reported as successfully deployed.
2 open issues
3 resolved since last review
Comparing/healthresponses viaJSON.stringifyis brittle: key ordering (or benign additional… Theversioncheck is overly permissive for a UUID (it accepts any 36-char mix of hex and dashes,… The origin validation does not reject URLs with an explicit port (e.g.https://host:8443/). If…
Review effort: Lite
There was a problem hiding this comment.
🟡 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
There was a problem hiding this comment.
🔵 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
|
针对 review5817557127 汇总中的四项疑问,逐项核对:
两个既有配置/双 guard 设计讨论已按准确范围完成独立复核,并纠正当前 |
There was a problem hiding this comment.
💡 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".
There was a problem hiding this comment.
🔵 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
There was a problem hiding this comment.
🛡️ 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.
There was a problem hiding this comment.
Note
Copilot was unable to run its full agentic suite in this review.
Copilot review overview
3 open issues
send()andsendWithClient()both callassertLegacyReleaseDispatchActive(env, workflow), which… · New The thrown error doesn’t include the detectedcfversion, which makes diagnosing failures harder… · New This error message conflates “missing” with “present but invalid format” and doesn’t indicate which… · New
Review effort: Lite
There was a problem hiding this comment.
🟡 Changes recommended
提交的 dist 入口未包含维护分支逻辑且未通过重建校验,同时裁定引用未绑定当前评论正文哈希,导致旧裁定可能掩盖新的发现。
5 open issues
提交重建后的 dist 入口以启用维护分支校验 · New 将裁定引用绑定到当前正文哈希 · New This error message conflates “missing” with “present but invalid format” and doesn’t indicate which… The thrown error doesn’t include the detectedcfversion, which makes diagnosing failures harder…send()andsendWithClient()both callassertLegacyReleaseDispatchActive(env, workflow), which…
Review effort: Lite
|
最终审查读回(2026-11-08 11:36 UTC):准确签名head
完整Copilot意见已逐条独立判断并回复:准确ref远端dist确含维护逻辑且本head verify-dist成功;重复双guard保留已裁定设计;两项诊断提示属于非阻断可读性建议,未声称已修改;人工裁定引用属于可信中央外部记录定位,实际采用时须创建绑定准确head、review IDs/attempts、原文hash及逐项裁定的不可变快照,正文变化重裁定并新建快照/采用记录,禁止沿用旧快照。当前未生成该生产采用实例。 P1采用受保护分支正常合并后执行路径,实际保护已生效;中央须在候选代码之外核准真实M/签名/tree/来源/保护和最终证据后才启动M。脚本内校验仅防误用,不是自身信任证明。当前PR仍OPEN、未合并、未部署、未修改生产Environments;切换继续等待中央/A/B窗口与在途交接。这是审查交付记录,不是部署批准。 |
21be466
into
maintenance/legacy-runtime-e990eda
|
代码采用读回:PR307已正常squash合并,M= 先前正常合并因dynamic Copilot context不属于平台可评估的required workflow checks而405;依据官方说明,中央只纠正该无效映射,其余严格核心保护和批准规则不变。全部当前head AI、检查、签名及20线程解决已在正常限定head合并前重新核准,无admin。 这仅完成代码采用;未生成真实部署记录/生产裁定快照,未执行部署脚本或改变生产Environments。实际服务切换继续等待协调窗口和在途交接。 |
## 摘要 为共享旧运行时的普通维护 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运行与服务切换分别验收,不以本地检查替代。
## 摘要 将旧运行时维护分支接入中央受信维护校验,支持后续普通维护 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,未知结果不记为通过。



旧 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 窗口和在途交接。