Skip to main content

Module envelope

Module envelope 

Source
Expand description

DSFB-Debug: admissibility envelope — paper §5.4 Equation (3).

Defines the admissibility region:

E(k) = { r ∈ Rⁿ : ‖r‖ ≤ ρ(k) }

A residual is admissible when its norm sits inside the envelope; boundary-grazing when it approaches ρ; violating when it exits. The envelope’s radius ρ(k) is operator-defined and may be sourced from any of:

  • SLO / SLA targets — e.g. p99 latency must not exceed 500 ms
  • Error-budget boundaries — burn-rate alerting derivatives
  • Resource-utilisation ceilings — heap %, CPU %, queue depth
  • Healthy-window baselinesρ = mean + k·sigma over the first N fault-free windows

This module also exposes sqrt_approx_pub — a Newton-Raphson square-root approximation that the no_std core uses to avoid a libm / std::f64::sqrt dependency. The approximation converges in ≤4 iterations to within 1 ulp of f64::sqrt for inputs in the engine’s operating range.

Functions§

compute_envelope_radius
Compute envelope radius from healthy-window statistics. ρ = 3σ of healthy residual distribution
is_admissible
Check if a residual norm is within the admissibility envelope
is_boundary_zone
Check if a residual norm is in the boundary zone (> boundary_fraction * ρ)
is_violation
Check if a residual norm has exited the envelope (violation)
sqrt_approx_pub
Public wrapper for sqrt_approx (used by baseline module)