Skip to main content

Module validate

Module validate 

Source
Expand description

Structural validation (decided.core.validation), severity overrides (decided.core.overrides), OKF conformance (decided.services.okf_conformance), and the .decided/config.yaml loaders (decided.services.init) — per PORT-CONTRACT.d/04 §4-6.

Emission order is the contract: [metadata issues][ticketing issues] [per-type issues], with each per-type validator’s internal append order replicated verbatim. Messages are byte-exact, {x!r} via pycompat::py_repr_str.

Structs§

OkfConformanceReport
OkfEntry
One walked corpus entry’s OKF projection: (display path, artifact type, final filename).
OkfFinding
SeverityOverrides

Constants§

MAX_REQUIREMENTS
OKF_TYPES
RESERVED_FILENAMES
TICKETING_SECTION

Functions§

apply_overrides
apply_overrides(issues, artifact_type, overrides).
check_okf_conformance
find_config_file
find_config_file(start_dir): the nearest .decided/config.yaml at or above the resolved start_dir.
has_errors
load_freshness_threshold
load_freshness_threshold(start_dir) (ADR-045): the freshness.stale_after_days from the nearest .decided/config.yaml. Defaults to 180 when there is no config, no freshness mapping, or the value is not a positive int — YAML 1.1 bools are explicitly rejected (true/false are not day counts even though bool is an int subclass in Python).
load_overrides
load_overrides(start_dir) (ADR-053).
load_ticketing_provider
load_ticketing_provider(start_dir) (ADR-088).
py_title
Python str.title() — titlecase the first char of each run of cased chars, lowercase the rest. (Reached only with ASCII section/type names.)
repository_root
repository_root(directory) (scope_paths): nearest dir at or above the resolved directory holding .decided/config.yaml, else the resolved dir.
resolve_severity
resolve_severity(base, code, type, overrides).
validate
decided.core.validation.validate(product, ticketing_provider, artifact_type).
validate_product
validate_product(product, start) — classification-dispatched rules with the repository’s severity overrides applied.