aeat.core.observability._redaction_rules module

Lazily-resolved SensitivityClass DIAGNOSTIC redaction rule set.

The diagnostic_rules() helper resolves the DIAGNOSTIC-class rule set lazily on first call so the observability package does not pull aeat.adapters.persistence.storage (which triggers Alembic plugin discovery and emits INFO log lines on stderr at import time) into every CLI command’s import chain. The cost of resolving the rule set once is negligible compared with one-time Alembic discovery.

diagnostic_rules()[source]

Return the DIAGNOSTIC-class default rule set, resolved on first call.

Cached at module scope after first resolution so repeated emits do not re-import the redaction substrate.

Return type:

tuple[RedactionRule, ...]

Returns:

A tuple of RedactionRule instances for the DIAGNOSTIC sensitivity class.