Repository navigation
style(repo): expand oxfmt formatting coverage - #398
Conversation
This comment was marked as spam.
This comment was marked as spam.
Nyanpasu 审查看板审查状态: ✅ 已通过 审查版本: 2c7cdd3 目标分支: codex/ci-skill 审查完成,未发现问题,建议合入。head 2c7cdd3 为重触发 CI 的空提交,栈基线同步重排;直接基线 diff(8a11df74..2c7cdd3)与已完整验证并批准的补丁逐字节一致,本层 14 个文件内容不变:7 个 JS/TS 文件经 esbuild 规范化输出与基线一致,5 个 JSON 解析值一致,CSS 仅等价空白与引号变化;.pre-commit-config.yaml 的语义变化恰为四处有意变更(types_or [text]、--no-error-on-unmatched-pattern、移除 #392 临时排除、exclude_types [yaml, toml] 延期 YAML/TOML)。已用镜像实际安装的 PyPI oxfmt 0.69.0 在本 head 按模拟 pre-commit 选择复现门禁:匹配 22 个文件全部格式正确。CI 全部检查(含 GPU 单测与集成测试)在本 head 通过。
没有未解决的审查问题。 提交范围 · 接收 14 · 建议移出 0 · 待确认 0接收 14 个文件 · 建议移出 0 个文件 · 待确认 0 个文件。移出与待确认部分暂停深审,不代表审查通过。
精简审查与验证依据
生产代码的必要性与替代方案
Powered by Nyanpasu with glm-5.3[1m] xhigh, please check the suggestions carefully.
|
746464d to
5bb594d
Compare
rai-studio-bot
left a comment
There was a problem hiding this comment.
审查结论:通过,未发现问题
对 PR #398(style(repo): expand oxfmt formatting coverage)在 head 5bb594d3 相对直接基线 codex/ci-skill(8fa80e90)的 14 个文件完成了常规与深度审查。7 个 JS/TS 文件经 esbuild 规范化输出与基线逐字节一致,5 个 JSON 文件解析值一致,CSS 仅等价空白与引号变化;.pre-commit-config.yaml 的语义变化恰为四处有意变更(types_or: [text]、--no-error-on-unmatched-pattern、移除 #392 的临时路径排除、新增 exclude_types: [yaml, toml] 延期 YAML/TOML)。使用镜像实际安装的 PyPI oxfmt 0.69.0 按模拟 pre-commit 文件选择独立复现了门禁行为:1319 个候选文件中 oxfmt 匹配 22 个且全部格式正确(与描述一致);无该旗标时仅含不支持格式的批次会以 rc=2 失败,受支持格式的语法错误仍会失败。必要性与替代方案审计未发现正当精简项;延期方案与撤回的 YAML/TOML 内容一致,且仓库内无其他工具格式化 YAML/TOML,不引入风格冲突。CI 全部必需检查(含 Pre-commit Checks)在本 head 通过。
详见审查看板:#398 (comment)
5bb594d to
f7a4118
Compare
f7a4118 to
b6fadbf
Compare
rai-studio-bot
left a comment
There was a problem hiding this comment.
审查结论:通过,未发现问题
对 PR #398(style(repo): expand oxfmt formatting coverage)在 head b6fadbf 相对直接基线 codex/ci-skill(8cfb0eb9)的 14 个文件完成了常规与深度审查。本范围为既有已验证补丁的纯重排:直接基线 diff 与此前完整审查并通过的补丁逐字节一致,本层文件内容不变。此前的独立验证结论全部复核有效:7 个 JS/TS 文件经 esbuild 规范化输出与基线逐字节一致,5 个 JSON 文件解析值一致,CSS 仅等价空白与引号变化;.pre-commit-config.yaml 的语义变化恰为四处有意变更(types_or: [text]、--no-error-on-unmatched-pattern、移除 #392 的临时路径排除、exclude_types: [yaml, toml] 延期 YAML/TOML)。使用镜像实际安装的 PyPI oxfmt 0.69.0 在本 head 按模拟 pre-commit 文件选择复现了门禁:1319 个候选文件中 oxfmt 匹配 22 个且全部格式正确。CI 中与本层直接相关的检查(Pre-commit Checks、Python 3.10–3.12 测试)在本 head 通过;GPU 单测与集成测试仍在排队/运行(同一补丁在更早 head 已全部通过,本层不含运行时代码路径改动)。必要性与替代方案审计未发现正当精简项。
详见审查看板:#398 (comment)
rai-studio-bot
left a comment
There was a problem hiding this comment.
审查结论:通过,未发现问题
对 PR #398(style(repo): expand oxfmt formatting coverage)在 head c99d140a 相对直接基线 codex/ci-skill(8cfb0eb9)的审查已完成。本 head 为重触发 CI 的空提交,树与已完整审查并通过的 b6fadbf 完全一致,直接基线 diff 逐字节不变。独立验证结论全部复核有效:7 个 JS/TS 文件经 esbuild 规范化输出与基线逐字节一致,5 个 JSON 文件解析值一致,CSS 仅等价空白与引号变化;.pre-commit-config.yaml 的语义变化恰为四处有意变更(types_or: [text]、--no-error-on-unmatched-pattern、移除 #392 的临时路径排除、exclude_types: [yaml, toml] 延期 YAML/TOML)。使用镜像实际安装的 PyPI oxfmt 0.69.0 按模拟 pre-commit 文件选择复现门禁:1319 个候选文件中 oxfmt 匹配 22 个且全部格式正确。重触发后 CI 全部检查(含此前受阻的 GPU 单测与集成测试)在本 head 通过。必要性与替代方案审计未发现正当精简项。
详见审查看板:#398 (comment)
c99d140 to
182ae1c
Compare
- Let the standalone oxfmt mirror select supported formats from tracked text files. - Cover TypeScript, JSON variants, stylesheets, GraphQL, YAML, and TOML without Node.js. - Remove the temporary formatting exclusions while keeping JS/JSON out of clang-format. - Apply the shared root formatting options across the repository. - Preserve structured configuration values and verify JavaScript/TypeScript output, documentation build, and all pre-commit hooks. Co-authored-by: Codex <[email protected]>
# 🔧 CI/CD - Exclude YAML and TOML from the oxfmt hook by file type. - Restore their original formatting, including the pre-commit configuration layout. - Keep the JavaScript, TypeScript, JSON, stylesheet, and GraphQL formatting scope. Co-authored-by: Codex <[email protected]>
# 🔧 CI/CD - Publish an empty commit to request fresh checks for this pull request. Co-authored-by: Codex <[email protected]>
182ae1c to
2c7cdd3
Compare
rai-studio-bot
left a comment
There was a problem hiding this comment.
审查结论:通过,未发现问题
对 PR #398(style(repo): expand oxfmt formatting coverage)在 head 2c7cdd3c 相对直接基线 codex/ci-skill(8a11df74)的审查已完成。本 head 为重触发 CI 的空提交,栈基线同步重排;直接基线 diff 与此前完整审查并通过的补丁逐字节一致,本层 14 个文件内容不变。独立验证结论全部复核有效:7 个 JS/TS 文件经 esbuild 规范化输出与基线逐字节一致,5 个 JSON 文件解析值一致,CSS 仅等价空白与引号变化;.pre-commit-config.yaml 的语义变化恰为四处有意变更(types_or: [text]、--no-error-on-unmatched-pattern、移除 #392 的临时路径排除、exclude_types: [yaml, toml] 延期 YAML/TOML)。使用镜像实际安装的 PyPI oxfmt 0.69.0 按模拟 pre-commit 文件选择复现门禁:1319 个候选文件中 oxfmt 匹配 22 个且全部格式正确。重触发后 CI 全部检查(含此前受阻的 GPU 单测与集成测试)在本 head 通过。必要性与替代方案审计未发现正当精简项。
详见审查看板:#398 (comment)
## What <!-- What changes does this PR introduce? --> 集中维护 CI team 与 target 映射,并接入 oxfmt mirror 和共享格式化配置。在 `.github/` 的 CODEOWNERS 中追加 `@SigureMo`,保留原有负责人。 ## Why <!-- Why are these changes needed? Link related issues with "Fixes #123" or "Relates to #456". --> 后续各功能有独立入口,仅共享必要的数据配置,使维护者能直接看懂配置和各层职责。 ## How <!-- How do the changes work? Describe the technical approach. --> - `.github/ci/config.json` 仅包含 `ciTeam` 和 workflow/job target 映射,JavaScript 原生读取 JSON。workflow 使用 `ci`、`gpu-unit`、`integration`;job 使用 `ci/pre-commit`、`ci/cpu-310` 等 `workflow/job` 名称,不保留旧短名称别名。 - CI team 为 `SigureMo`、`NINGBENZHE`、`Yangruipis`,使用实际 GitHub login 大小写。 - 保留 `ShigureLab/[email protected]` 和 JavaScript/JSON 类型选择;clang-format 通过 `exclude_types: [javascript, json]` 排除这两类文件。 - oxfmt 配置移到根目录 `.oxfmtrc.json`,参考 [yutto 的格式化选项](https://github.com/yutto-dev/yutto/blob/main/docs/vite.config.ts):100 列、两空格缩进、单引号、ES5 尾逗号、无分号、箭头参数始终加括号,并关闭 package.json 排序。 - 暂时排除既有 `acquire-devices` action 与 `docs/` 的 oxfmt 格式化;这 9 个既有文件的风格 diff 已移到栈顶专门的格式化层 #398,由该层移除临时路径排除,统一格式化 JS/TS、JSON、样式表和 GraphQL,暂不处理 YAML/TOML。 - 本层只包含共享配置、格式化工具配置和 CODEOWNERS,共 4 个文件;指令入口在 #393,bypass 在 #394,欢迎与指南在 #395,skill 在 #396,全仓格式化在 #398。 原生 gh-stack 第 1/6 层,base 为 `main`。 ## Testing <!-- How were the changes tested? Include commands, test results, or screenshots. --> 本层通过全量 `pre-commit run --all-files`;既有 action 和 docs 文件与 `main` 保持一致,格式化 diff 单独位于栈顶。未新增测试文件。 未在本地运行 `pytest tests/`:本次涉及 CI 自动化及文档,未改动训练代码。 - [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 - [ ] 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]>
…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
新增专门的格式化层,把既有文件的风格调整从 #392 移到栈顶,并使用无 Node 运行时的 oxfmt mirror 统一格式化 JS/TS、JSON 和样式表,暂不处理 YAML/TOML。
Why
CI 基础设施改动与全仓风格调整分开审查;同时补齐 TypeScript、样式表和 JSON 配置的格式化覆盖。
How
ShigureLab/[email protected]和根目录.oxfmtrc.json的现有风格。types_or: [text]把格式识别交给 standalone oxfmt,避免 pre-commit 类型识别漏掉.mts、.jsonc、.gql及特殊配置文件名。--no-error-on-unmatched-pattern允许仅包含不支持格式的批次,受支持文件的语法错误仍然会失败。transfer_queue/全局排除继续生效。exclude_types: [yaml, toml]暂时排除 YAML/TOML;这些文件的风格调整均已撤回,.pre-commit-config.yaml只保留必要的 hook 配置修改。原生 gh-stack 第 6/6 层,base 为 #396;前五层仍为 #392 → #393 → #394 → #395 → #396。
Testing
pre-commit run --all-files --show-diff-on-failure通过,重复运行后无新增 diff。.mts、.jsonc、.gql;oxfmt 全仓--check通过,且忽略不匹配文件的选项不会掩盖 TypeScript 语法错误。vitepress build docs与node docs/fix-chunk-names.js通过。未运行训练单测及多节点 GPU/NPU 集成测试:本层仅调整格式化配置和代码风格,本地也不具备相应集成测试硬件;未新增测试文件。
pre-commit run --all-filespassespytest tests/)Type of Change
Screenshots / Logs