Skip to content

topmark.resolution.discovery

topmark / resolution / discovery

Discovery-level probe results for explicit input selection.

This module contains small value objects used to explain why an explicitly requested path did or did not reach file-type resolution. It intentionally stays separate from topmark.resolution.probe, because a path excluded during file discovery has no file-type candidates yet.

FileSelectionStatus

Bases: str, Enum

Machine-friendly status for explicit input selection.

Attributes:

Name Type Description
SELECTED

The explicit input reached file-type probing.

FILTERED

The explicit input was filtered before file-type probing.

NOT_FOUND

The explicit input path does not exist.

FileSelectionReason

Bases: str, Enum

Machine-friendly reason for explicit input selection.

Attributes:

Name Type Description
SELECTED

The explicit input was selected for file-type probing.

EXCLUDED_BY_PATH_FILTER

The explicit input was excluded by path filters.

EXCLUDED_BY_FILE_TYPE_FILTER

The explicit input was excluded by file-type filters.

EXCLUDED_BY_DISCOVERY_FILTER

The explicit input was excluded before file-type probing, but the exact discovery filter category was not identified.

NOT_A_FILE

The explicit input exists but is not a regular file.

NOT_FOUND

The explicit input path does not exist.

FileSelectionProbeResult dataclass

FileSelectionProbeResult(*, path, status, reason)

Explain whether an explicitly requested path reached file-type probing.

Attributes:

Name Type Description
path Path

Explicit input path being explained. This may be relative to the current working directory or to a files_from source base.

status FileSelectionStatus

Selection status for the explicit input path.

reason FileSelectionReason

Machine-friendly reason for the selection status. Reasons identify whether a path was filtered by path filters, file-type filters, or a generic discovery filter. Exact pattern/source attribution is still intentionally out of scope and can be added later without changing the basic probe contract.