Repository navigation
ci(config): add shared configuration and ownership - #392
Conversation
|
To use Codex here, create an environment for this repo. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ 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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c10f068db6
ℹ️ 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".
Nyanpasu 审查看板审查状态: ✅ 已通过 审查版本: 8c9919b 目标分支: main 审查通过(rebase 后重新确认):分支 rebase 到新 main d3fa2ca(仅 docs PR #302,与本层零重叠),4 个 CI 配置文件在 rebase 前后逐字节一致,全部既有验证结论原样成立(target/workflow/job 契约、消费方动态读取、oxfmt mirror hook 实测、CODEOWNERS 与 ciTeam 一致);该 head 全部 8 项 CI 检查通过。F1(迁移由仍 open 的 PR #398 承接)与 F2(维护者接受 glibc ≥ 2.18 约束)均已解决,无剩余未决问题。最终 APPROVE(覆盖本 PR 已审范围,上层 #393–#396 另行审查)。
审查发现待处理
已解决或已取代
提交范围 · 接收 4 · 建议移出 0 · 待确认 0接收 4 个文件 · 建议移出 0 个文件 · 待确认 0 个文件。移出与待确认部分暂停深审,不代表审查通过。
精简审查与验证依据
生产代码的必要性与替代方案
Powered by Nyanpasu with glm-5.3[1m] xhigh, please check the suggestions carefully.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rai-studio-bot
left a comment
There was a problem hiding this comment.
审查结论:未发现阻塞问题(2 条 P3 非阻塞建议)
对 stack #397 第 1 层的 4 个 CI 配置文件(+57/−1)逐项验证:.github/ci/config.json 中全部 workflow/job 名称与 ci.yml、unittest.yml、integration-test.yml 的实际 job 名逐一吻合(#393 的 findJob 按 job 名精确匹配,这一契约已核对);上层消费方形状一致(#393 读取 targets[].workflow/job,#394 读取 ciTeam);CODEOWNERS 追加后 .github/ 负责人与 ciTeam 完全一致;实测 oxfmt 0.69.0 可格式化 JSON、--config 与 singleQuote 均生效,仓库内两个 JSON 已符合该格式;该 head 全部 CI 检查通过(含 prek 全量 pre-commit)。
两条非阻塞建议(P3):clang-format 全局排除 JavaScript 后既有 JS 文件失去格式化约束(行级评论,附建议);PyPI oxfmt 非官方再打包且 wheel 要求 glibc ≥ 2.18 的兼容性约束(已回复至现有 oxfmt 线程,供 mirror 切换计划参考)。
非行级补充:本层合并后 config.json 在 #393/#394 落地前暂无仓库内消费方——这是 PR 描述中明确的分层设计,仅作记录。
审查看板:#392 (comment)
rai-studio-bot
left a comment
There was a problem hiding this comment.
审查结论:增量已验证,无新增问题;上一轮 2 条 P3 建议在新 head 上维持原状
新 head 5a27b20 相对上一轮已审的 c10f068 仅改 .pre-commit-config.yaml:本地 oxfmt hook(PyPI additional_dependencies)切换为 ShigureLab/[email protected],args/types_or/files 保持不变。已验证:mirror tag 与 manifest 有效(oxfmt-mirror 固定 oxfmt==0.69.0);pre-commit 的本地 hook 配置按 dict update 整体覆盖 manifest 键,因此 types_or: [javascript, json] 继续生效、.github/ci/ 下两个 JSON 的 oxfmt 覆盖不因切换丢失;其余 3 个文件与上一轮逐字节一致;该 head 全部 CI 检查通过(含 prek 全量 pre-commit,mirror hook 可安装可执行)。
上一轮两条 P3 在新 head 上未变化:既有 JS 文件的格式化空档(clang-format 全局排除后无 hook 覆盖);PyPI oxfmt wheel 的 glibc ≥ 2.18 约束(oxfmt-mirror 仍指向同一 PyPI 包,切换不改变该约束)。讨论见各自线程与看板。
审查看板:#392 (comment)
|
@rai-studio-bot 那你调研下 https://pypi.org/project/oxfmt-bin/ 呢?是否也有 glibc 问题?或者是否有其他的现成的包呢? |
|
调研完成,以下结论均在 glibc 2.17 的 Linux 环境(本仓库一类常见 dev 机)实测: 1.
|
| 方案 | glibc 2.17 机器 | oxfmt 版本 | 改动量 |
|---|---|---|---|
维持现状,贡献者文档注明 glibc ≥ 2.18 / SKIP=oxfmt |
❌ 本地装不上 | 最新 | 零 |
| mirror 侧改用官方 release 二进制自打包(打 manylinux2014 tag) | ✅ | 最新 | 改 ShigureLab mirror;官方二进制实测兼容 glibc 2.17,可同时消掉"非官方"信任面 |
mirror 依赖换成 oxfmt-bin |
✅ | 滞后(现为 0.66.0) | 最小:mirror 的 dependencies 改一行,代价是接受版本滞后并等它跟进 |
直接用官方 npm(language: node) |
✅(需可用 node) | 最新 | 改本仓库 hook;引入 node 运行时依赖 |
我的建议:若要彻底解决且不接受版本滞后,优先考虑 mirror 自打包官方二进制(manylinux2014);若只是想让旧 glibc 开发机先能装上,oxfmt-bin 是改动最小的现成方案。
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
rai-studio-bot
left a comment
There was a problem hiding this comment.
审查结论:最终形态已验证,无新增问题;F1 已由作者采纳并延期至 #398,F2 维持未解决
相对上一轮已审的 5a27b20,净增量收敛为两个提交:178b51f1 将全仓格式化延期(回退既有文件的重排版,oxfmt hook 以显式 exclude 排除 acquire-devices/ 与 docs/,并在注释中注明迁移由专门的 formatting 层承接——PR #398 已开);ec319ded 将 config.json 的 target 键按 workflow 家族加前缀(ci/pre-commit、ci/cpu-310…、integration/gpu-async…),workflow/job 取值不变。已验证:全部 target 的 workflow/job 名称与 ci.yml、unittest.yml、integration-test.yml 实际 job 名一致(沿用首轮逐一比对结论,本轮 diff 仅改键名);#393 通过 Object.hasOwn/Object.entries 动态读取 target,重命名无需消费方改动,仓库内也无旧键名残留引用;被 oxfmt 覆盖的文件本地实测 clean;该 head 全部 8 项 CI 检查通过。
发现状态:F1(既有 JS 文件格式化约束)已解决——作者在原线程确认采纳"全仓交给 oxfmt"方向并解决线程,既有文件迁移由 PR #398 承接;F2(PyPI oxfmt 仅 manylinux_2_18 wheel,glibc < 2.18 开发机无法本地安装 hook)仍未解决——hook 仍经 mirror 安装同一 PyPI 包,前一轮调研的备选方案(oxfmt-bin / 官方 npm / mirror 自打包 / 文档化)待维护者选择,见调研评论。
审查看板:#392 (comment)
|
@rai-studio-bot F2 解决方式:nyanpasu 不再运行在老旧的宿主机环境,改为运行在容器内,我知道这没有完全解决问题,但实际上这么低版本 glibc 环境并不常见 |
|
收到,F2 以该决策关闭:接受 glibc ≥ 2.18 的 wheel 约束(评审侧已容器化、低版本 glibc 环境实际罕见),不再要求 mirror 侧变更或文档化。 对记录补一句:其他人类贡献者若恰好在 glibc < 2.18 的机器上本地跑 F1(迁移由 #398 承接)与 F2 均已解决,无剩余未决问题;本层(stack #397 第 1 层)的审查结论已相应更新为通过。
Powered by Nyanpasu with glm-5.3[1m] xhigh, please check the suggestions carefully.
|
rai-studio-bot
left a comment
There was a problem hiding this comment.
审查结论:通过(F1、F2 均已解决)
本层(stack #397 第 1 层)在 ec319ded 的最终形态已完成多轮验证:config.json 全部 10 个 target 的 workflow/job 名称与 ci.yml、unittest.yml、integration-test.yml 实际 job 名一致,键名按 workflow 家族前缀化后消费方(#393 动态读取)零改动;CODEOWNERS 与 ciTeam 一致;oxfmt mirror hook 与根 .oxfmtrc.json 实测有效,既有文件的格式化迁移由 PR #398 承接;该 head 全部 8 项 CI 检查通过。
发现关闭情况:F1(既有 JS 文件格式化空档)——作者采纳"全仓交给 oxfmt"方向并解决原线程,迁移由 #398 跟进;F2(PyPI oxfmt 的 glibc ≥ 2.18 wheel 约束)——维护者决策接受该约束(评审侧已容器化、低版本 glibc 环境罕见,SKIP=oxfmt 仍可绕过)。无剩余未决问题。
本结论覆盖本 PR 的已审范围;上层 #393–#396 各自另行审查。
审查看板:#392 (comment)
# 🔧 CI/CD - Centralize commands, workflow targets and permission checks. - Load automation from the default branch and post idempotent bot replies. - Test parsing, authorization and stale-head rejection with Node built-ins. Co-authored-by: Codex <[email protected]>
# ♻️ Refactor - Load CI modules as ESM within a scoped package boundary. - Format CI JavaScript and JSON with a pinned Python oxfmt hook. - Exclude JavaScript from clang-format and remove the local override. # 🔧 CI/CD - Remove the CI automation tests and their workflow step as requested in review. - Verify module loading and all pre-commit hooks. Co-authored-by: Codex <[email protected]>
# ♻️ Refactor - Move the shared CI modules and configuration into a reusable composite action. - Pass bot credentials through explicit action inputs. - Keep the workflow responsible for events, permissions and trusted checkout. - Scope the ESM package and formatting hook to the action directory. Co-authored-by: Codex <[email protected]>
# ♻️ Refactor - Keep only CI team membership, target mappings and formatter settings in shared CI files. - Remove the unified controller so each automation can own its entry point. - Retain dependency-free JSON configuration for the CI team and targets. # 🔧 CI/CD - Add SigureMo alongside the existing GitHub CODEOWNERS. - Scope oxfmt to shared CI data and the independent automation actions. Co-authored-by: Codex <[email protected]>
# 🔧 CI/CD - Replace the local oxfmt hook with ShigureLab/oxfmt-pre-commit-mirror at v0.69.0. - Preserve the CI configuration, JavaScript/JSON types and action file scope. - Let the mirror provide the Python hook and pinned package dependency. Co-authored-by: Codex <[email protected]>
# 🔧 CI/CD - Keep the oxfmt mirror hook and select JavaScript/JSON by language across the repository. - Exclude JavaScript and JSON from clang-format without path-specific rules. - Move oxfmt configuration to the root and align its formatting options with yutto. # 🎨 Style - Format existing JavaScript and JSON files using the shared configuration. - Verify all 15 tracked JavaScript/JSON files are covered, JSON values are unchanged, JavaScript syntax is valid, and all pre-commit hooks pass. Co-authored-by: Codex <[email protected]> Co-authored-by: RAI Studio Bot <[email protected]>
# 🔧 CI/CD - Keep shared CI configuration and the oxfmt mirror setup in the first stack layer. - Temporarily exclude existing action and documentation files from oxfmt. - Move their formatting changes into a dedicated formatting layer. Co-authored-by: Codex <[email protected]>
# 🔧 CI/CD - Prefix the seven job selectors with their workflow target. - Keep the flat target registry and the three workflow selectors unchanged. Co-authored-by: Codex <[email protected]>
ec319de to
8c9919b
Compare
This comment was marked as spam.
This comment was marked as spam.
rai-studio-bot
left a comment
There was a problem hiding this comment.
审查结论:通过(rebase 后重新确认)
本 PR 已 rebase 到新 main(d3fa2caf,仅含 docs PR #302:CONTRIBUTING 与中英文贡献指南,与本层 4 个文件零重叠)。已核对:4 个文件(.github/CODEOWNERS、.github/ci/config.json、.oxfmtrc.json、.pre-commit-config.yaml)在 rebase 前后逐字节一致,全部既有验证结论原样成立——config.json 的 10 个 target 与实际工作流 job 名一致、消费方(#393/#394)动态读取契约不变、oxfmt mirror hook 与根配置实测有效、CODEOWNERS 与 ciTeam 一致;该 head 全部 8 项 CI 检查通过(含真实运行 acquire-devices 的 GPU/集成工作流)。
发现状态维持:F1(既有文件格式化迁移由 PR #398 承接,仍为 open)与 F2(维护者接受 glibc ≥ 2.18 约束)均已解决,无剩余未决问题。本结论覆盖本 PR 的已审范围;上层 #393–#396 各自另行审查。
审查看板:#392 (comment)
## What <!-- What changes does this PR introduce? --> 通过独立 action 和 workflow 提供 `/rerun`、`/cancel`、`/help`,操作当前 PR 的 CI。 ## Why <!-- Why are these changes needed? Link related issues with "Fixes #123" or "Relates to #456". --> 使权限、运行状态判断、API 操作与评论回复各自清晰,贡献者可以直接在 PR 中操作 CI。 ## How <!-- How do the changes work? Describe the technical approach. --> - `index.mjs` 分离首行指令解析、公开帮助、权限检查与评论回复流程。 - `runs.mjs` 分离 run 筛选、状态判断、job 查询和 API 操作选择;写入前统一核对 PR head。 - 同一 head 下优先选活跃 run,其次选未取消的 run;各组按 run number 取最新值,避免 concurrency 取消的重复 run 遮住实际运行。 - `/rerun` 默认重跑当前 head 最新失败或超时 workflow 中失败的 job,也支持精确指定 workflow 或 `workflow/job`;`ci` 只选择 pre-commit/CPU workflow,`all` 选择全部已配置 workflow。`/help` 展示相同命名和范围,取消仅接受 workflow target。 - 首行之后可写普通正文,不包含针对特定账号或 agent 署名的解析分支。 - 使用 workflow `GITHUB_TOKEN`;只加载默认分支代码,按源评论 ID 去重,写入超时后不自动重复操作。 - 公开帮助仅介绍贡献者日常指令;bypass 和 Nyanpasu review 各自独立处理。 原生 gh-stack 第 2/6 层,依赖 #392 的共享 JSON。 ## Testing <!-- How were the changes tested? Include commands, test results, or screenshots. --> 全量 pre-commit 和 actionlint 已通过。临时 Node 冒烟检查覆盖首行解析、公开帮助、权限、去重、fork run 匹配、API 操作选择、head 变化和不明确写入结果。另以真实运行数据验证 6 个并发重复运行场景,包括被取消的高编号 run 与活跃、失败、成功 run 共存,以及全部取消时的显式重跑。另通过 27 个临时指令场景检查:7 个新 job target 精确重跑、7 个旧短名称拒绝、7 个 job 取消请求拒绝,以及 workflow/all/default/help 的范围。未提交测试文件。 未在本地运行 `pytest tests/` 或 GPU/NPU 训练:本次涉及 CI 自动化与文档。欢迎/评论指令的真实 GitHub 交互需进入默认分支后验证。 - [x] `pre-commit run --all-files` passes - [ ] Tests pass (`pytest tests/`) - [ ] New tests added (if applicable) - [ ] Documentation updated (if applicable) ## Type of Change - [ ] Bug fix (non-breaking change that fixes an issue) - [x] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [ ] Refactoring (no functional changes) - [ ] Performance improvement - [x] CI/CD or build changes ## Screenshots / Logs <!-- If applicable, add screenshots or log output to help explain the changes. --> <div align="right"> <sup>This PR is co-authored with @codex (gpt-6-astra, reasoning: xhigh).</sup> </div> --------- Co-authored-by: Codex <[email protected]> Co-authored-by: RAI Studio Bot <[email protected]>
## What <!-- What changes does this PR introduce? --> 新增专门的格式化层,把既有文件的风格调整从 #392 移到栈顶,并使用无 Node 运行时的 oxfmt mirror 统一格式化 JS/TS、JSON 和样式表,暂不处理 YAML/TOML。 ## Why <!-- Why are these changes needed? Link related issues with "Fixes #123" or "Relates to #456". --> CI 基础设施改动与全仓风格调整分开审查;同时补齐 TypeScript、样式表和 JSON 配置的格式化覆盖。 ## How <!-- How do the changes work? Describe the technical approach. --> - 保留 `ShigureLab/[email protected]` 和根目录 `.oxfmtrc.json` 的现有风格。 - 使用 `types_or: [text]` 把格式识别交给 standalone oxfmt,避免 pre-commit 类型识别漏掉 `.mts`、`.jsonc`、`.gql` 及特殊配置文件名。`--no-error-on-unmatched-pattern` 允许仅包含不支持格式的批次,受支持文件的语法错误仍然会失败。 - 移除 #392 的临时路径排除,覆盖 JS/JSX、TS/TSX、JSON/JSONC/JSON5、CSS/SCSS/Less、GraphQL;现有 `transfer_queue/` 全局排除继续生效。 - 使用 `exclude_types: [yaml, toml]` 暂时排除 YAML/TOML;这些文件的风格调整均已撤回,`.pre-commit-config.yaml` 只保留必要的 hook 配置修改。 - HTML、Vue、Markdown 不在当前 standalone 版本的支持范围内;Markdown 沿用现有 mdformat。 - clang-format 继续按语言排除 JavaScript/JSON,避免重复格式化。 - 本层共修改 14 个文件;完整栈中 oxfmt 实际匹配 22 个文件。 原生 gh-stack 第 6/6 层,base 为 #396;前五层仍为 #392 → #393 → #394 → #395 → #396。 ## Testing <!-- How were the changes tested? Include commands, test results, or screenshots. --> - 全量 `pre-commit run --all-files --show-diff-on-failure` 通过,重复运行后无新增 diff。 - 在不含 Node 的 PATH 下实测 16 种启用的扩展名;HTML/Vue/Markdown 确认为不支持。 - 实际 pre-commit 文件选择覆盖 `.mts`、`.jsonc`、`.gql`;oxfmt 全仓 `--check` 通过,且忽略不匹配文件的选项不会掩盖 TypeScript 语法错误。 - 验证全部已跟踪 YAML/TOML 均被 hook 排除,内容与父层一致(必要的 hook 配置修改除外);5 个 JSON 文件解析值一致,7 个 JS/TS 文件经 esbuild 规范化后的输出一致。 - `vitepress build docs` 与 `node docs/fix-chunk-names.js` 通过。 未运行训练单测及多节点 GPU/NPU 集成测试:本层仅调整格式化配置和代码风格,本地也不具备相应集成测试硬件;未新增测试文件。 - [x] `pre-commit run --all-files` passes - [ ] Tests pass (`pytest tests/`) - [ ] New tests added (if applicable) - [ ] Documentation updated (if applicable) ## Type of Change - [ ] Bug fix (non-breaking change that fixes an issue) - [ ] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [x] Refactoring (no functional changes) - [ ] Performance improvement - [x] CI/CD or build changes ## Screenshots / Logs <!-- If applicable, add screenshots or log output to help explain the changes. --> <div align="right"> <sup>This PR is co-authored with @codex (gpt-6-astra, reasoning: xhigh).</sup> </div> --------- Co-authored-by: Codex <[email protected]>
…er-profiler Brings in upstream/main 99a0b6a..653c43c (redai-studio#302, redai-studio#392-redai-studio#396, redai-studio#398, redai-studio#401, redai-studio#403, redai-studio#405). The only conflict is the guide sidebar in docs/.vitepress/config.mts: redai-studio#398 reformatted it with oxfmt (trailing commas, long entries split), and this branch adds the "Straggler Analysis" / "Straggler 分析" entries next to the same lines. Resolved by taking upstream's formatting and keeping the two straggler entries in their previous position.

What
集中维护 CI team 与 target 映射,并接入 oxfmt mirror 和共享格式化配置。在
.github/的 CODEOWNERS 中追加@SigureMo,保留原有负责人。Why
后续各功能有独立入口,仅共享必要的数据配置,使维护者能直接看懂配置和各层职责。
How
.github/ci/config.json仅包含ciTeam和 workflow/job target 映射,JavaScript 原生读取 JSON。workflow 使用ci、gpu-unit、integration;job 使用ci/pre-commit、ci/cpu-310等workflow/job名称,不保留旧短名称别名。SigureMo、NINGBENZHE、Yangruipis,使用实际 GitHub login 大小写。ShigureLab/[email protected]和 JavaScript/JSON 类型选择;clang-format 通过exclude_types: [javascript, json]排除这两类文件。.oxfmtrc.json,参考 yutto 的格式化选项:100 列、两空格缩进、单引号、ES5 尾逗号、无分号、箭头参数始终加括号,并关闭 package.json 排序。acquire-devicesaction 与docs/的 oxfmt 格式化;这 9 个既有文件的风格 diff 已移到栈顶专门的格式化层 style(repo): expand oxfmt formatting coverage #398,由该层移除临时路径排除,统一格式化 JS/TS、JSON、样式表和 GraphQL,暂不处理 YAML/TOML。原生 gh-stack 第 1/6 层,base 为
main。Testing
本层通过全量
pre-commit run --all-files;既有 action 和 docs 文件与main保持一致,格式化 diff 单独位于栈顶。未新增测试文件。未在本地运行
pytest tests/:本次涉及 CI 自动化及文档,未改动训练代码。pre-commit run --all-filespassespytest tests/)Type of Change
Screenshots / Logs