Skip to content

[ci] add Python hardware marks and preserve CPU coverage - #466

Merged
wangtiance merged 2 commits into
ThinkFlowLab:mainfrom
wangtiance:codex/ci-hardware-axis
Nov 23, 2026
Merged

wangtiance merged 2 commits into
ThinkFlowLab:mainfrom
wangtiance:codex/ci-hardware-axis

Conversation

@wangtiance

@wangtiance wangtiance commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Implements PR-4b of #273 on current main. This replaces the Python hardware-axis portion planned in #350; it does not depend on that PR or move the reusable static workflow.

  • Register cpu and reserved gpu/cuda/rocm/xpu/npu. Explicitly mark the existing Python modules as CPU, preserving their current layer/capability/skip marks.
  • Apply the migration CPU default before pytest mark deselection. Reject multiple distinct inherited platforms before a CPU filter can hide conflicts; never relabel reserved accelerator cases CPU.
  • Record per-case and aggregate hardware evidence. Accept a CPU-only full-layer profile only with zero deselections and matching per-case CPU evidence.
  • Select CPU in release, bundled CLI/native-visual, nightly suite/rerun and watchlist phases. Existing layer expressions are intersected with CPU. The ready/merge/nightly cutover remains separate PR-8 work after live queue acceptance.
  • Document the contracts, commands and conservation evidence in Chinese and English.

Validation

Current synchronized tip

  • Tip 14682738 preserves the existing main-merge commit and includes main 797932e36536345cbf158813e027fac9d97a3a7b ([feat] canvas: search voice library by name #467 and [docs] readme: add the official Bilibili account #471). No force push or unrelated Windows fixes.
  • Same-environment collection against updated main: all 2,999 baseline raw IDs and effective layers preserved, plus 11 declared regressions. Full and CPU collections both contain 3,010 cases, zero deselections; ready/merge/nightly = 2,941 / 59 / 10. All 79 voice-library cases explicitly inherit CPU. Full-layer collection audit passed.
  • Hardware/profile/audit + voice-library tests: 111 passed locally on Windows. i18n: 3,326 keys, zero problems.
  • All hosted checks passed on tip 1468273874ed7523d310c3a5e5e8a3c30a3c791f, including Release checks run 45170546224, CodeQL and the plugin checks. The actual Linux Python profile has 3,010 collected explicit-CPU cases, zero deselections: 2,892 passed, 118 skipped. Full-layer audit with --require-executed confirms all 152 protected representatives passed.
  • Same-platform comparison against the previous green tip's profile preserves all 3,005 raw IDs and effective layers; exactly five new voice-library cases from updated main were added. Actual tested merge SHA: f09a352c323b8a965338653c2165eec75580d9e6; the run's head SHA is the synchronized PR tip above.

Previous-tip evidence and limitations

  • Same-environment raw collection comparison: all 2,994 existing IDs and effective layers preserved; 11 new hardware/audit regressions. Full and CPU-only collections both have 3,005 cases, zero deselections; every current case inherits an explicit module CPU mark. Ready/merge/nightly: 2,936 / 59 / 10. Full-layer collection audit passed.
  • AST comparison of 135 existing test modules verified that only CPU marks/imports and the two declared audit tests differ; existing assertions and capability gates remain intact.
  • Final hardware/profile/layer regression run: 32 passed on Windows, Python 3.14.7 / pytest 9.1.1. Real isolated pytest subprocesses verify CPU defaults before filtering, inherited conflicts, reserved-platform isolation and audit rejection of incomplete CPU evidence.
  • Previous tip 4faa4a757905f91a1bcf2c9697274c23d71d775a: all hosted checks passed. Actual Linux profile from run 45147756589 collected 3,005 explicit-CPU cases with zero deselections: 2,887 passed, 118 skipped. These are previous-tip results, not results for the synchronized tip.
  • i18n passed (3,320 keys). All applicable configured Python/YAML/TOML/whitespace hooks passed through system Python loading the installed hook modules. Standard pre-commit virtualenv execution remains locally constrained; this alternative is not reported as a successful standard runner invocation.
  • Official actionlint v1.7.7 Windows release, verified against its published SHA256, passed for both changed workflows (-shellcheck= -pyflakes=).
  • Windows full CPU snapshot: 2,884 passed, 67 failed, 42 skipped, 10 errors in 1,411.90 seconds (not a pass). This 3,003-case snapshot preceded the final two audit regressions, which passed in the final 32-test run. Representative owner-rights directory-permission failure and three GBK decoding failures reproduced using pre-change test sources; this does not explain every failure. The video-resolution case failed during project-directory rename in the full run but passed as a baseline standalone case; its full-run failure remains unclassified. That previous 3,005-case revision subsequently passed Linux CI; fresh Linux CI also passed for the synchronized 3,010-case tip (see current-tip evidence above). No GPU or paid-provider service was used.

Refs #273

Media: N/A — CI/test infrastructure only; no user-visible UI behavior changes.

中文总结

本 PR 落实 PR-4b 的 Python 机型轴:现有测试显式标 CPU,迁移期未标记用例在筛选前补 CPU,机型冲突直接拒绝,预留加速器用例不会被误标。CI 各 Python 阶段选择 CPU,但保留现有全部层级、断言与能力跳过条件。同步最新 main 后,基线 2,999 个用例 ID 和层级保持,新增 11 项回归;全量与 CPU 清单均为 3,010 项、零排除。111 项机型轴及语音库定向测试通过;Windows 全量快照为 2,884 passed、67 failed、42 skipped、10 errors,未通过。代表性权限和 GBK 编码失败在基线复现,但不能据此归因全部失败;同步 main 后的新 tip CI 已全部通过;实际 Linux 全量为 2,892 passed、118 skipped,3,010 项均为显式 CPU、零排除,152 项保护代表全部通过;不提前切换 PR-8 的分层门槛。

## summary

- Register the CPU axis and reserved accelerator platforms, explicitly
  tag current Python modules, and default migration cases before filtering.
- Reject inherited platform conflicts and retain hardware in profiles.
- Select CPU in release/nightly phases while preserving existing layers,
  and require complete CPU evidence in full layer audits.
- Add collection regressions and bilingual contracts and evidence.

Refs: ThinkFlowLab#273
@wangtiance
wangtiance merged commit e43c30f into ThinkFlowLab:main Nov 23, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci Continuous integration and checks type:ci Build, test and release automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant