Skip to content

ci(config): add shared configuration and ownership - #392

Merged
SigureMo merged 8 commits into
mainfrom
codex/ci-control
Oct 1, 2026
Merged

SigureMo merged 8 commits into
mainfrom
codex/ci-control

Conversation

@SigureMo

@SigureMo SigureMo commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

What

集中维护 CI team 与 target 映射,并接入 oxfmt mirror 和共享格式化配置。在 .github/ 的 CODEOWNERS 中追加 @SigureMo,保留原有负责人。

Why

后续各功能有独立入口,仅共享必要的数据配置,使维护者能直接看懂配置和各层职责。

How

原生 gh-stack 第 1/6 层,base 为 main。

Testing

本层通过全量 pre-commit run --all-files;既有 action 和 docs 文件与 main 保持一致,格式化 diff 单独位于栈顶。未新增测试文件。

未在本地运行 pytest tests/:本次涉及 CI 自动化及文档,未改动训练代码。

  • 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
  • Refactoring (no functional changes)
  • Performance improvement
  • CI/CD or build changes

Screenshots / Logs

This PR is co-authored with @codex (gpt-6-astra, reasoning: xhigh).

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create an environment for this repo.

@SigureMo
SigureMo added this pull request to stack #397 September 30, 2026 17:05
Comment thread .github/ci/tests/control.test.js Resolved
Comment thread .github/ci/.clang-format Resolved
Comment thread .github/ci/comments.js Resolved
Comment thread .github/ci/comments.js Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci-control.yml Resolved
@SigureMo SigureMo changed the title ci(control): add trusted PR command entry ci(config): add shared configuration and ownership Sep 30, 2026
Comment thread .pre-commit-config.yaml Resolved
Comment thread .pre-commit-config.yaml Resolved
@SigureMo
SigureMo marked this pull request as ready for review September 30, 2026 20:17
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-01T09:06:25.883197Z 5267ab2 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.

@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: 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".

Comment thread .pre-commit-config.yaml Resolved
@rai-studio-bot

rai-studio-bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

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 另行审查)。

审查阶段进度范围与结果
常规审查 ✅ 已完成 rebase 增量核对:4 个文件与已批准的 ec319de 逐字节一致(git diff --quiet 逐文件验证);新 merge-base 仅含 docs-only 变更(CONTRIBUTING + 中英文指南,无重叠);CI 全绿(含 prek 全量 pre-commit 与真实运行 acquire-devices 的 GPU/集成工作流)。
深度审查 ✅ 已完成 未派发子任务:rebase 未改变任何内容,沿用对逐字节一致内容的既有必要性审计(见精简审计)。

审查发现

待处理
编号 严重性 问题状态规则来源
暂无待处理的记录。
已解决或已取代
编号 严重性 问题状态规则来源
F1 Low severity clang-format 全局排除 JavaScript 后,既有 JS 文件失去格式化约束 ✅ 已解决 —
F2 Low severity PyPI oxfmt 为非官方再打包且 wheel 要求 glibc≥2.18,旧 glibc 开发机无法本地安装 ✅ 已解决 —
提交范围 · 接收 4 · 建议移出 0 · 待确认 0

接收 4 个文件 · 建议移出 0 个文件 · 待确认 0 个文件。移出与待确认部分暂停深审,不代表审查通过。

文件结论仓库维护必要性依据替代去向或方案
.github/ci/config.json
.oxfmtrc.json
.github/CODEOWNERS
.pre-commit-config.yaml
接收 Rebased (new merge-base d3fa2ca, docs-only PR #302 with zero file overlap) form of the already-approved config layer: all four files are byte-identical to the previously verified and approved head ec319de - config.json (ciTeam for #394, workflow-qualified targets for #393, all workflow/job values previously verified against the actual workflow files), root .oxfmtrc.json consumed by the oxfmt mirror hook, .pre-commit-config.yaml (clang-format C-family only, oxfmt with documented deferral exclude pending PR #398), CODEOWNERS aligned with ciTeam. The rebase changes no content in this PR's scope. Byte-level comparison ec319de vs 8c9919b for all four files (identical); git show d3fa2ca (CONTRIBUTING.md + docs guides only); prior rounds' verification records on the same content None applicable - the rebase introduces no new files or responsibilities; re-reviewing from scratch would duplicate already-verified conclusions for byte-identical content against a non-interacting base.
精简审查与验证依据
审查范围进度结论
生产代码 ✅ 已完成 4 项范围均为保留决策;键名前缀化与延期结构均为最小且自文档的形态。
测试 ➖ 无需执行 纯 CI 配置/数据变更,无测试文件;hook 与配置的有效性由该 head 的 Pre-commit Checks(prek 全量运行,通过)覆盖,测试必要性审计不适用。

生产代码的必要性与替代方案

范围必须保留的契约更简单的方案结论依据与限制
.github/ci/config.json 的 ciTeam 与按 workflow 前缀限定的 targets 键名 向 #393 的 /rerun 与 /cancel 提供动态读取的 target 键(Object.hasOwn)与 workflow/job 名,向 #394 的 bypass 门禁提供 ciTeam。 保持无前缀键名(cpu-310 等),或在 #393 帮助文本中硬编码 target 名。 保留 前缀键名使命令面自文档化(/rerun ci/cpu-310);workflow/job 取值经首轮逐一比对与实际工作流一致且本轮未变;动态读取使重命名对消费方零改动;硬编码会在重命名时失效。局限:#393/#394 尚未合并,本层暂无仓库内调用方。
.pre-commit-config.yaml:oxfmt mirror hook(全仓 JS/JSON 减去显式 exclude)+ clang-format 仅 C 系 pre-commit/prek 流水线对新 CI JS/JSON 生效;既有 acquire-devices/docs 文件的 oxfmt 迁移由 PR #398 承接(代码注释明示)。 在本层完成全仓格式化迁移(5267ab22 曾实现后被 178b51f 撤回),或维持原 files 限定。 保留 5267ab2 的全仓迁移已实测可行(15/15 文件 clean、CI 全绿),但作者按最小变更原则收窄本层并把迁移放入专门的 #398——结构清晰、职责单一;显式 exclude 带注释避免了隐性空档。
根目录 .oxfmtrc.json(printWidth 100、tabWidth 2、singleQuote、trailingComma es5、semi false 等) 被 oxfmt hook 的 --config 参数消费,#398 扩展覆盖后对全仓 JS/JSON 生效。 使用 oxfmt 默认风格或留在 .github/ci/ 下。 保留 实测 --config 可加载且选项生效;根目录位置与(#398 后的)全仓覆盖形态一致。
.github/CODEOWNERS 追加 @SigureMo GitHub 对 .github/ 变更按 CODEOWNERS 请求审查,与 config.json 的 ciTeam 保持同一组人。 不改 CODEOWNERS,仅保留 config.json 的 ciTeam。 保留 追加后 .github/ 负责人与 ciTeam 完全一致;CI 自动化的归属覆盖需要 CODEOWNERS 机制。
Powered by Nyanpasu with glm-5.3[1m] xhigh, please check the suggestions carefully.

@rai-studio-bot rai-studio-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

审查结论:未发现阻塞问题(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)

Powered by Nyanpasu with glm-5.3[1m] xhigh, please check the suggestions carefully.

Comment thread .pre-commit-config.yaml Resolved
Comment thread .pre-commit-config.yaml Resolved

@rai-studio-bot rai-studio-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

审查结论:增量已验证,无新增问题;上一轮 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)

Powered by Nyanpasu with glm-5.3[1m] xhigh, please check the suggestions carefully.

@SigureMo

SigureMo commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

@rai-studio-bot 那你调研下 https://pypi.org/project/oxfmt-bin/ 呢?是否也有 glibc 问题?或者是否有其他的现成的包呢?

@rai-studio-bot

Copy link
Copy Markdown
Contributor

调研完成,以下结论均在 glibc 2.17 的 Linux 环境(本仓库一类常见 dev 机)实测:

1. oxfmt-bin(PyPI,justin-yan 的 pybin 系列)——没有 glibc 问题,但版本滞后

  • wheel 平台是 manylinux2014(glibc ≥ 2.17)+ musllinux + macOS + Windows,无 sdist。实测 uvx --from 'oxfmt-bin==1.81.0' oxfmt 可以直接安装并运行,--config 与 JSON 格式化行为均正常,本仓库 .github/ci/config.json 在其下也是 clean 的。
  • 代价:其版本号跟 oxc release 走,最新 1.81.0(2026-09-09 上传)内含的 oxfmt 是 0.66.0(运行 oxfmt --version 实测),落后当前 0.69.0/0.71.0 三个 oxc 版本——oxfmt-pre-commit-mirror 的 PR 描述当时也正是因此没有选它。
  • 它同样是非官方再打包(自述 "not affiliated with the upstream project",表示上游官方接管后会移交)。

2. dhruvkb 的 oxfmt:glibc 问题在二进制本身,重打 tag 救不了

下载其 manylinux_2_18 wheel 解出二进制直接运行,报 libc.so.6: version 'GLIBC_2.18' not found——不是 tag 标得保守,是编译目标就是 glibc 2.18。所以 PyPI oxfmt 这条线在旧 glibc 机器上无法通过任何 tag/包装手段救活,只能换来源。

3. 其他现成渠道

  • PyPI 上相关包就三个:oxfmt(dhruvkb,❌ 需 glibc ≥ 2.18)、oxfmt-bin(✅ 兼容,但版本滞后)、oxfmt-mirror(不在 PyPI,pre-commit 从 git clone 安装,其依赖仍指向 dhruvkb 的 oxfmt,兼容性不变)。
  • npm oxfmt 是官方分发(maintainer 为 oxc 作者 boshen),且本机实测 npx [email protected] 可运行——官方 Linux 二进制兼容 glibc 2.17。上游 oxc-project/mirrors-oxfmt 就是现成的 pre-commit hook(language: node,引 [email protected])。注意:pre-commit/prek 的 nodeenv 若自行下载官方 Node 构建,Node 18+ 的基线同样偏新(glibc ≥ 2.28),旧机器上需要 language_version: system 配自备 node(本机自备 node 22 可用)。

可选路径

方案 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 是改动最小的现成方案。

Powered by Nyanpasu with glm-5.3[1m] xhigh, please check the suggestions carefully.

Comment thread .pre-commit-config.yaml Resolved
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@SigureMo SigureMo mentioned this pull request Oct 1, 2026
3 of 11 tasks
@rai-studio-bot rai-studio-bot mentioned this pull request Oct 1, 2026
3 of 11 tasks
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@rai-studio-bot rai-studio-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

审查结论:最终形态已验证,无新增问题;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)

Powered by Nyanpasu with glm-5.3[1m] xhigh, please check the suggestions carefully.

@SigureMo

SigureMo commented Oct 1, 2026 •

Copy link
Copy Markdown
Member Author

@rai-studio-bot F2 解决方式:nyanpasu 不再运行在老旧的宿主机环境,改为运行在容器内,我知道这没有完全解决问题,但实际上这么低版本 glibc 环境并不常见

@rai-studio-bot

Copy link
Copy Markdown
Contributor

收到,F2 以该决策关闭:接受 glibc ≥ 2.18 的 wheel 约束(评审侧已容器化、低版本 glibc 环境实际罕见),不再要求 mirror 侧变更或文档化。

对记录补一句:其他人类贡献者若恰好在 glibc < 2.18 的机器上本地跑 pre-commit run --all-files,SKIP=oxfmt 仍是可用绕过(CI 不受影响);备选渠道的调研结论留在上面的评论里供后续参考。

F1(迁移由 #398 承接)与 F2 均已解决,无剩余未决问题;本层(stack #397 第 1 层)的审查结论已相应更新为通过。

Powered by Nyanpasu with glm-5.3[1m] xhigh, please check the suggestions carefully.

@rai-studio-bot rai-studio-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

审查结论:通过(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)

Powered by Nyanpasu with glm-5.3[1m] xhigh, please check the suggestions carefully.

SigureMo and others added 3 commits October 1, 2026 21:25
# 🔧 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]>
SigureMo and others added 5 commits October 1, 2026 21:25
# ♻️ 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]>
@chatgpt-codex-connector

This comment was marked as spam.

@rai-studio-bot rai-studio-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

审查结论:通过(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)

Powered by Nyanpasu with glm-5.3[1m] xhigh, please check the suggestions carefully.

@DrRyanHuang DrRyanHuang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTMeow 🐾

@SigureMo
SigureMo merged commit d8a0f19 into main Oct 1, 2026
8 checks passed
@SigureMo
SigureMo deleted the codex/ci-control branch October 1, 2026 17:57
SigureMo added a commit that referenced this pull request Oct 1, 2026
## 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]>
SigureMo added a commit that referenced this pull request Oct 1, 2026
## 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]>
Mukayi added a commit to Mukayi/Relax that referenced this pull request Oct 4, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants