Skip to content

Split forgelm/cli/_pipeline.py into a sub-package (_state, _events, _verify) #909

Open

Description

@cemililik

Deferred work · F-W20260729-OPS-10-budgets: _pipeline.py · severity Low · cost ~4-8 h · recorded in docs/roadmap/risks-and-decisions.md:261

Summary

forgelm/cli/_pipeline.py is a deferred module split: the multi-stage pipeline orchestrator's state, event emission and verification live in one CLI-side file. The module-size guard holds it to a fatal no-growth budget, but nothing pays the debt down until someone takes the split. #714 (CR-A04-086) separately asks for the orchestrator's business logic to move out of cli/; decide the two together.

Condition or budget

The Phase 14.5 manifest-verification rewrite has landed (it shipped in v0.10.0) — already met, so this split can be taken now.

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

1332 code lines against a budget of 1332; the split was blocked only by the Phase 14.5 rewrite, which shipped in v0.10.0.

Related

#667 and #668 track how the module-size guard counts lines and accepts budget raises; decide them before relying on a module's budget.

Acceptance criteria

  • The module becomes a sub-package along the recorded seams, behaviour-neutral, with every public name still importable from its current path.
  • Its _DEFERRED_SPLITS entry is removed from tools/check_module_size.py and every resulting module is under the normal ceiling.
  • Test patch targets that named the old module are retargeted to the module that resolves the name at call time (the forgelm/verify.py split found five that silently moved).
  • 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: pipelineCode area: pipelineseverity: 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