Repository navigation
fix(ci): select current welcome required checks - #430
Conversation
Keep check and status identities separate and select effective reports before aggregating required results. Use check creation IDs rather than nullable provider start times, and preserve provider pins, pending checks and failures. Cover historical cancellations, later failures and waiting reruns, status and provider boundaries, pagination, and unchanged merge requirements. Co-authored-by: Codex <[email protected]>
|
Thanks for contributing to Relax, @ShigureNyako! 感谢你为 Relax 做出贡献! 📚 Contribution guide / 贡献指南Describe the problem, your changes, and how you validated them. Keep each PR focused and run 请说明问题、改动和验证方式,保持 PR 聚焦,并在提交前运行 🛠️ CI commands / CI 指令
Put one command on the first line of a new PR comment. Rerun/cancel require PR authorship or repository write access. 在新 PR 评论的首行写一条指令。PR 作者或有仓库写权限的贡献者可以重跑、取消 CI。 🔎 Merge requirements / 合入条件GitHub:✅ 满足合入条件
|
Nyanpasu 审查看板审查状态: ✅ 已通过 审查版本: ec73cc2 目标分支: main 审查完成并已 APPROVE(ec73cc23)。生产文件与 f7a76f5 已审版本逐字节一致,修复行为经生产路径实测验证(#370 真实 rollup 上旧实现 ❌ → 本实现 ✅,PR 自身数据无回归)。增量变更仅剩按维护者请求删除回归测试(原 P2 跟进项随之失效,已在原线程说明;merge-status 回到无回归覆盖的明确取舍)。
审查发现待处理
已解决或已取代
提交范围 · 接收 1 · 建议移出 0 · 待确认 0接收 1 个文件 · 建议移出 0 个文件 · 待确认 0 个文件。移出与待确认部分暂停深审,不代表审查通过。
精简审查与验证依据
生产代码的必要性与替代方案
Powered by Nyanpasu with glm-5.3-flash max, please check the suggestions carefully.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rai-studio-bot
left a comment
There was a problem hiding this comment.
Review 结论
常规与必要性行审查完成(2/2 文件全部接收)。CI 行修复的行为已在生产路径上实测验证;一个 P2 跟进项(测试执行机制),并请留意 @SigureMo 对测试文件的移除请求。
实测验证(通过 gh CLI 驱动真实模块 + 真实 GitHub 数据,pinned head f7a76f50):
- 缺陷与修复:在 #370 head 的真实 rollup(7 组同名 required 报告为旧 CANCELLED + 新 SUCCESS、Pre-commit 两条 SUCCESS)上,merge-base 实现输出
CI ❌ 未通过,本 PR 实现输出CI ✅ 已通过;PR #430 自身(当前无重复报告)新旧输出一致,无回归。审批/团队/overall 行保持不变,GitHub 整体仍 ⏳。 - 方案取舍成立:REST
filter=latest实测仍返回 #370 的 cancelled + success 双记录,不能单独解决(与 PR 描述一致);按 name 单桶去重会让不同 workflow/event/app 的同名检查互相覆盖。身份分组 +databaseId创建序代理是保留 per-provider 语义的最小机制(每组单一 app,单调性只需组内成立);先选最新再应用isRequired/provider pin 的顺序同样有测试约束。缺失元数据与同时序的保守回退方向正确(宁可继续显示阻塞)。 - 测试:50/50 通过(Node 24.21.0);对旧实现 38/12 失败,与 PR Testing 声明一致;
expectEitherOrder消除列表顺序依赖,渲染不改写快照的断言齐备。
待决:测试文件的去留(维护者已留言)。行级评论补齐了决定所需的证据:目前没有任何 CI/hook 执行该测试;移除则 merge-status 回到无回归覆盖,保留则需接入 CI。
范围、必要性与证据明细:Nyanpasu 审查看板。
| import assert from 'node:assert/strict' | ||
| import { test } from 'node:test' | ||
| import { loadMergeStatus, renderMergeStatus } from './merge-status.mjs' |
There was a problem hiding this comment.
补充一项与 #discussion_r4241962221(移除该测试文件)去留决定相关的实测证据,两条路径都成立:
- 执行机制缺失:
.github/workflows/(ci.yml 只跑 pytest)与.pre-commit-config.yaml均无node --test;根package.json只有 docs 脚本;这也是仓库中唯一的*.test.*文件。回归会静默通过 CI——本次要修的汇总缺陷正是 ci: show live PR merge requirements #427 落地时没有测试兜底才进入主干的。 - 检测力已验证:这 50 个用例直接测真实模块(
renderMergeStatus/loadMergeStatus),对 merge-base 旧实现跑出 38 通过 / 12 失败,恰好对应本次修复的行为差异;loading paginates...对 GraphQL 查询字段的断言还能防止选择逻辑与查询脱节。
因此:若按维护者意见移除该文件,则 merge-status 回到无回归覆盖的现状(可接受,但属明确取舍);若保留,建议在 ci.yml 增加轻量 job(ubuntu-latest 自带 Node 20+,零新依赖):
merge-status-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: node --test .github/actions/pr-welcome/merge-status.test.mjsThere was a problem hiding this comment.
测试文件已在 ec73cc23 按维护者意见移除,该跟进项随之失效(“无执行机制”不再存在)。取舍已记录在审查记录中:merge-status 回到无回归覆盖的现状,属明确决定而非遗漏。
Remove the newly committed test file as requested in PR redai-studio#430. Keep the reviewed production merge-status module unchanged and preserve the regression suite outside the checkout for manual verification. Co-authored-by: Codex <[email protected]>
rai-studio-bot
left a comment
There was a problem hiding this comment.
Review 结论(更新至 ec73cc23)
上一轮审查(f7a76f50)的全部结论在当前 head 继续成立,本轮复核了增量变更并随即可关闭:
- 生产代码逐字节未变:
git diff f7a76f50..ec73cc23 -- .github/actions/pr-welcome/merge-status.mjs为空。已验证的行为不变:在 #370 head 的真实 rollup 上旧实现输出CI ❌ 未通过、本 PR 实现输出CI ✅ 已通过;PR #430 自身数据无回归;RESTfilter=latest不足、身份元组 + 创建序代理的取舍均已在上一轮以生产路径实测确认。 - 增量变更只有一项:按 @SigureMo 的移除请求删除
merge-status.test.mjs(402 行)。仓库内已无对该文件的任何引用。上一轮的 P2 跟进项(测试未被任何 CI 执行)随文件删除而失效,已在原线程说明;取舍是 merge-status 回到无回归覆盖的现状,属明确决定。 - CI 在当前 head 无失败项。
完整范围、必要性与证据明细:Nyanpasu 审查看板。
…er-profiler Brings in upstream/main 653c43c..dce533b (redai-studio#257, redai-studio#258, redai-studio#285, redai-studio#323, redai-studio#330, redai-studio#335, redai-studio#408, redai-studio#409, redai-studio#412, redai-studio#414, redai-studio#416, redai-studio#417, redai-studio#419-redai-studio#421, redai-studio#424, redai-studio#426, redai-studio#427, redai-studio#430, and 42 commits synced on 10-12 without PR numbers). The only conflict is relax/utils/env.py: cc4b052 adds the DeepSeek-V4 MXFP4 QAT variables at the same spot where this branch adds the straggler profiler variables. Resolved by keeping both blocks, straggler first.

What
修复 welcome 评论中的 required CI 汇总:先选择每个检查身份当前有效的报告,再汇总结果,避免历史取消记录遮蔽后续成功。
仅修改
.github/actions/pr-welcome/merge-status.mjs,不修改训练代码、依赖或 welcome 发布流程。按维护者的文件级反馈,已移除新增的版本控制测试文件;回归材料在工作树外保留并重跑,未新增 CI 或 hook 执行机制。
Why
Relates to #370。
复现时,
gh pr checks --required的 8 项检查均通过,但 head 的 GraphQL rollup 仍包含 7 条旧CANCELLED和 9 条SUCCESS(Pre-commit 有两条成功报告)。原实现汇总全部同名记录,导致 welcome 的 CI 行错误显示未通过。RESTfilter=latest仍保留跨 suite 的这些记录,不能单独解决问题。本修复不是忽略所有取消:当前有效的失败、取消、等待及缺失仍如实阻塞,审批、团队要求和 GitHub 整体合入状态不因 CI 行修正而变成满足。
How
databaseId作为创建先后代理,覆盖尚无startedAt的新 queued/rerun;StatusContext 取最新createdAt。不依赖 API 列表顺序,不偏好成功或非取消结果。isRequired;正 provider pin 校验 App。Legacy status 无 App 身份,同名多 provider pin 无法区分时保守保持等待。排序/provider 元数据缺失或完全相同的时序也保守保留可能阻塞的报告。SUCCESS/NEUTRAL/SKIPPED为通过。审批、团队及 overall 渲染逻辑保持不变。边界:GitHub GraphQL schema 没有承诺
databaseId跨任意 provider 的严格时间单调性;这里采用明确的创建顺序工程代理,并非完整复刻 GitHub 内部合入判定或gh的startedAt排序。多 provider legacy status 和缺失/相同时序的保守处理可能继续显示阻塞。最终合入资格仍由 GitHub 判定。Testing
外部手工回归:删除前将 50 场景 suite 保留在工作树外,测试的是与最终
merge-status.mjs逐字节相同的副本。Node 24.21.0 与 26.11.1 各 50 passed / 0 failed / 0 skipped。该 suite 不在 PR 或版本控制中,也没有接入 CI;不将这次手工验证称为仓库自动回归覆盖。pre-commit run --all-files --show-diff-on-failure:对移除测试后的最终代码在 Python 3.12 隔离工具环境执行,16 个 hooks 全部通过,没有跳过 hooks 或修改配置。先前 Python 3.14 下旧 docformatter 1.3.1 构建失败,Python 3.13 下缺少 lib2to3;切换验证工具解释器后通过,未修改项目依赖。原生产修复已通过独立只读本地审查:Node24 50/50、实际 API query/responses 离线重放、100 次 seeded 乱序、额外 17 个边界及 11 个非 CI 状态变体通过。本次仅移除测试文件,生产模块字节与该已审版本保持一致;随后重新执行上述外部手工回归和完整 hooks。原 50 场景对旧实现为 38 passed / 12 failed。
手工场景覆盖旧取消后成功、旧成功后新失败/取消/等待、无开始时间的新 queued、provider/status 身份、分页、缺失检查及 head/test-merge 选择。对相同复现 snapshot,旧/新输出只有 CI 行由未通过改为通过;overall BLOCKED 和审批 0/1 等其它要求未变。
未运行无关的完整 Python/GPU 集成测试、远程训练或部署;这是 JavaScript CI 汇总逻辑修改。本地结果不证明 hosted CI 或部署后 welcome UI 已更新。
pre-commit run --all-filespassesTests pass (
pytest tests/)New tests added (if applicable)
Documentation updated (if applicable)
Type of Change
Screenshots / Logs
同一复现输入的变化:
没有直接编辑 #370 的 welcome 评论,也没有触发 rerun 或部署。
联合署名对应参与诊断、变更审查、测试复核及发布协调的 Codex 协作者;实现及发布由 Nyako 执行。