Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Adopt the `minimal_config` test factory across the suite and add a CI guard on its adoption rate

未关闭
#910 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
活跃
技术栈
github-actions, python
领域
ci-cd, testing

调研方向

Start by reading minimal_config in tests/_helpers/factories, then grep tests/test_*.py for inline "name_or_path": dicts to see which modules still build configs by hand. The guard script tools/check_test_factory_adoption.py does not exist yet; it needs to fail below 70% adoption and be wired into ci.yml and tests/test_guard_wiring.py. Done means the migrated modules pass, the guard runs in CI, and the CHANGELOG names the deferral ID.

由索引模型根据 Issue 内容生成。

描述

area: dev-tooling severity: low source: roadmap wave: 4

Deferred work · F-PR29-A4-03 · severity Low · cost ~3-4 h · recorded in docs/roadmap/risks-and-decisions.md:81

Summary

tests/_helpers/factories.minimal_config is documented as the single source of a minimal valid ForgeConfig, but only 21 of 128 test modules use it and 21 modules build inline config dicts without it, so a schema change has to be applied by hand to every inline copy. The PR #29 plan was a bulk migration plus tools/check_test_factory_adoption.py failing CI below 70 % adoption; adoption has since fallen from 30 % to about 16 % as the suite grew.

Condition or budget

None recorded (the row still names v0.6.x, long past). Guard threshold: 70 % adoption.

State today (re-checked 2026-10-09)

21 of 128 tests/test_*.py modules use the factory; 36 modules hold 116 inline "name_or_path": config dicts; tools/check_test_factory_adoption.py does not exist.

Acceptance criteria

  • Inline ForgeConfig dicts in tests use minimal_config(...) (or document why they cannot).
  • tools/check_test_factory_adoption.py fails below the agreed rate and is wired into ci.yml, the CLAUDE.md / AGENTS.md / CONTRIBUTING.md gauntlet and tests/test_guard_wiring.py.
  • The row is removed from the deferral table and the CHANGELOG names its ID (the table's removal contract).

Recorded in docs/roadmap/risks-and-decisions.md (read at f94595f) and re-checked against the code on 2026-10-09. The row leaves that table only when the fix is on main, the CHANGELOG names its ID and any promised guard exists.

主要语言
Python
星标
9
派生
1
平均合并
8 小时 10 分钟
30 天内合并 PR
5

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

HodeTech/ForgeLM 的其他 Issue

查看 HodeTech/ForgeLM 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。