Skip to main content

adjust_runtime_policy_for_pow

Function adjust_runtime_policy_for_pow 

Source
pub fn adjust_runtime_policy_for_pow(
    policy: &RuntimePolicy,
    score: &PowCapabilityScore,
    thresholds: &PowPolicyThresholds,
) -> RuntimePolicy
Expand description

Map a PowCapabilityScore to a deterministic RuntimePolicy adjustment.

The mapper is non-mutating — it clones the input policy and returns a new one with the documented adjustments applied. The risk score is re-clamped to [0.0, 1.0] after the lift so the final value is always in the unit interval.

Strong and Degraded bands produce non-escalating adjustments (Strong reduces the rate-limit floor, Degraded is a no-op besides the config hint). Weak is the only band that escalates the policy.