/** * Severity policy — the one definition of which severities are protected * (kept verbatim) and which may take a lossless lever. * * Two surfaces would otherwise carry private copies of this rule and drift * apart: the POC report renderer, which tells a prospect what will happen, * and `configure_engine`'s solver, which decides what actually happens. A * report promising "ERROR/CRIT/FATAL and low-volume patterns are kept * verbatim. Nothing is sampled or dropped." while the solver assigns * `sample` to every error/warn/warning pattern is the failure this * prevents, along with the two classifying WARN opposite ways and the * renderer disagreeing with itself (risk-review paths treating WARN as * error-class where the action selector does not). * * Everything resolves through here, and `test/severity-policy-drift.test.ts` * fails if the rendered promise and the solver default diverge. * * WARN is PROTECTED. `configure_engine`'s `inferTier` puts warn/warning in the * same tier as error, and the customer-facing text has to match the solver * rather than the other way round. * * Callers uppercase their severity before testing in most cases; both * predicates are case-insensitive so it does not matter either way. */ /** * Error-class severities: ERROR, WARN/WARNING, CRIT/CRITICAL, FATAL. * Never reduced by any auto path. Substring matching is deliberate so * WARNING/CRITICAL and vendor-prefixed spellings ("LOG_ERROR") both match. */ export declare const PROTECTED_SEVERITY_RE: RegExp; /** * Severities an auto path may put a lossless lever on. A pattern with no * severity attribution counts as reducible; `isReducibleSeverity` handles * that case, since it is not something a string test can express. */ export declare const REDUCIBLE_SEVERITY_RE: RegExp; /** True when the severity is error-class and must be kept verbatim. */ export declare function isProtectedSeverity(severity?: string | null): boolean; /** * True when the severity may take a lossless lever. Protected always wins, so * the two predicates can never both be true for the same input. */ export declare function isReducibleSeverity(severity?: string | null): boolean; /** * Minimum share of patterns that must carry a severity before any auto path * may recommend a lossless lever. * * `isReducibleSeverity(undefined)` returning true is correct per-pattern (a * single unlabelled INFO line should not block a recommendation) but it fails * OPEN in aggregate: when severity extraction returns nothing at all, every * pattern reads as reducible and the "ERROR/WARN/CRIT/FATAL kept verbatim" * promise silently cannot fire. An engine config that omits its aggregator * produces exactly that: 0% coverage, and ERROR patterns queued for * reduction. * * A gate has to fail on the known-broken input, so below this floor the * recommender refuses rather than guesses. */ export declare const MIN_SEVERITY_COVERAGE = 0.5; /** * True when enough patterns carry a severity to honour the protected-severity * promise. `coverage` is a 0..1 fraction of patterns, not of events. */ export declare function severityAttributionSufficient(coverage: number | undefined): boolean; /** * The severity names the report's "kept verbatim" sentence lists, in the * order it lists them. The drift test reads this, not the prose, so a prose * edit that drops a severity cannot silently widen what gets reduced. */ export declare const PROTECTED_SEVERITY_LABELS: readonly ["ERROR", "WARN", "CRIT", "FATAL"]; /** * The severity names the report's "reducible pattern" clause lists. */ export declare const REDUCIBLE_SEVERITY_LABELS: readonly ["DEBUG", "INFO", "TRACE"];