Skip to content

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

Open

Description

@cemililik

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: dev-toolingCode area: dev-toolingseverity: lowMinor defect, inaccuracy or rough edgesource: roadmapPlanned or deferred work recorded in docs/roadmap/wave: 4Roadmap wave 4: low / info / watch, when touching the module

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions