Models
models
Data models + module-wide constants for the fix pipeline.
MAX_ITERATIONS = 6
module-attribute
Hard cap on the fix pipeline's fixed-point loop.
The RELOCATE → SPLIT → MERGE → RENAME cascade mutates classification
(a moved test may change tier; a SPLIT may free a NAME_MISMATCH that
was hidden pre-split), so :func:axm_audit.core.fix.run re-runs the
stages until no new ops are planned. The cap fails loud on a buggy
fixed-point instead of looping forever.
OpKind = Literal['flatten', 'relocate', 'split', 'merge', 'rename']
module-attribute
Stage tag for a planned :class:FileOp.
Mirrors the five mutating stages of the fix pipeline (FLATTEN, RELOCATE,
SPLIT, MERGE, RENAME). Stage 0.5 (non-canonical relocate) and stage 1.5
(layout flatten) emit warnings, not :class:FileOp entries.
FileOp
dataclass
A single planned filesystem mutation produced by the pipeline.
target is a list only for SPLIT (one source → many targets); all
other kinds use a single Path. split_map is populated only
when kind == "split" and maps each canonical target filename to
the list of test_* symbols routed into it.
Source code in packages/axm-audit/src/axm_audit/core/fix/models.py
PipelineReport
dataclass
Aggregated output of :func:axm_audit.core.fix.run.
ops lists every planned mutation across all fixed-point
iterations. unfixable carries findings the pipeline declined to
auto-resolve (e.g. TEST_QUALITY_NO_PACKAGE_SYMBOL). applied
distinguishes dry-run from applied mode. warnings collects
non-fatal messages from each stage and the post-pipeline polish.
iterations records how many passes the fixed-point loop ran
before convergence (1 in dry-run).
Source code in packages/axm-audit/src/axm_audit/core/fix/models.py
by_kind()
Return a count of planned ops grouped by :data:OpKind.