topmark.pipeline.status¶
Status enums for each axis in the TopMark pipeline.
This module defines the authoritative set of statuses for every pipeline axis.
Each enum captures a phase (e.g., resolve, fs, content, header, generation,
render, strip, comparison, update, write). Steps must only write to the
axes listed in their axes_written contract.
Conventions
- All enums inherit from
EnumIntrospectionMixin(fromtopmark.core.enum_mixins). andStyledStrEnum(fromtopmark.core.presentation) for shared utilities and semantic style roles. - Values are human-readable strings used in CLI/diagnostics; do not rely on
identity (
is) checks; prefer equality (==). - Only the view/API layer synthesizes public outcomes; steps should not attempt to classify coarse buckets.
BaseStatus ¶
Bases: EnumIntrospectionMixin, StyledStrEnum
Represents the base status class of file system checks in the pipeline.
Each member should define a `str value and a semantic StyleRole.
FsStatus ¶
ResolveStatus ¶
Bases: BaseStatus
Represents the status of file type resolution in the pipeline.
Used to indicate whether the file type was successfully resolved or not.
ContentStatus ¶
Bases: BaseStatus
Represents the status of file content checks in the pipeline.
SKIPPED_* states are policy-aware potential non-terminal states.
HeaderStatus ¶
Bases: BaseStatus
Represents the status of header processing for a file in the pipeline.
Used to indicate detection, parsing, and validation results for the file header.
GenerationStatus ¶
Bases: BaseStatus
Represents the status of header generation in the pipeline.
Used to indicate whether a new header was generated, rendered, or if required fields are missing.
RenderStatus ¶
Bases: BaseStatus
Rendering status for expected header text.
Indicates whether the renderer produced an in-memory textual representation of the expected header. This status does not imply that a change is necessary - it only tracks whether rendering completed.
States
PENDING: Rendering has not been executed or did not complete. RENDERED: The expected header text was successfully rendered.
ComparisonStatus ¶
Bases: BaseStatus
Represents the status of comparing the current and expected header in the pipeline.
Used to indicate if the header has changed, is unchanged, or cannot be compared.
StripStatus ¶
Bases: BaseStatus
Represents the status of header stripping in the pipeline.
This axis is orthogonal to scanner detection and write outcomes
- Scanner (HeaderStatus) tells us whether a header exists in the original file.
- StripStatus tells us whether we prepared/performed a removal.
- WriteStatus records the final write outcome (e.g., REMOVED on apply).
PlanStatus ¶
Bases: BaseStatus
Represents the status of the plan (pre-write) phase.
Indicates the intended change (insert/replace/remove/skip) and whether a preview was produced.
PatchStatus ¶
Bases: BaseStatus
Represents the status of patch (diff) generation in the pipeline.
Indicates whether a unified diff was generated, skipped because content is unchanged or an updated image was unavailable, or failed to generate.
WriteStatus ¶
Bases: BaseStatus
Represents the status of the header write operation in the pipeline.
Used to indicate whether the header was written, previewed, skipped, or failed.