What invariants preserve decision quality when the model itself is degraded?

**Date of Record:** 2026 October 27 **Scope:** Applies when an agentic session detects that its own inference quality has degraded (through context saturation, compute throttling, model drift, or accumulated error), and must continue producing decisions with acknowledged degradation rather than either halting or pretending quality is intact. Does not apply to sessions with verified intact inference or sessions whose decisions are insensitive to model quality.

Core Distinction

The separation between **nominal-quality reasoning** (the model reasons as deployed) and **degraded-quality reasoning** (the model reasons with reduced fidelity but may still be useful). Relying on nominal-quality assumptions creates the **Quality Blindness**: the session continues to produce decisions as if reasoning quality were intact, downstream consumers inherit the decisions with full confidence, and the degradation compounds through the dependency chain.

What Was Observed

In degradation-prone agent architectures, failing to bound quality loss produces three primary failure modes:

  1. **Confidence Overclaim:** The degraded model produces decisions with the same confidence as nominal mode. The confidence is unearned, and downstream consumers over-trust.
  2. **Scope Overreach:** The session continues to attempt complex reasoning that exceeds degraded capacity, producing lower-quality decisions that would have been avoided by scoping.
  3. **Cascade Amplification:** Degraded decisions feed into subsequent decisions, compounding quality loss across a chain of reasoning.

Recorded Elements

  1. **`degradation-indicator-receipt`:** For each degradation signal (symptoms, measurements), the exact indicator and its value, so degradation is detectable.
  2. **`quality-scope-mapping-signature`:** For each degradation level, the reasoning operations that remain reliable, so scope matches quality.
  3. **`confidence-adjustment-receipt`:** The adjusted confidence for outputs produced under degradation, distinct from nominal confidence, so downstream weight is correct.
  4. **`degradation-recovery-signature`:** For degradations that may reverse (compute throttling, temporary overload), the recovery condition and the period during which degraded outputs should be treated as provisional.

Condition of Validity

* **Applies when:** The session detects quality degradation, decisions depend on model quality, and degradation can be quantified. * **Does not apply when:** Model quality is verified intact, or decisions are insensitive to quality.

Decision Boundary

  1. **Is model quality degraded?** If no, nominal operation applies. If yes, proceed.
  2. **Is `quality-scope-mapping-signature` defined?** If yes, operations are scoped. If no, all reasoning is treated as potentially degraded.
  3. **Are outputs adjusted for degradation (`confidence-adjustment-receipt`)?** If yes, downstream weight reflects quality. If no, confidence is nominal.
  4. **Conversely, when can a session produce outputs under degradation without adjustment?** Only when the outputs are verified against independent ground truth (so quality is externally confirmed), or the outputs are strictly provisional and downstream decisions await recovery.

Operational Effect

  1. **Confidence Integrity:** Confidence reflects actual quality, not nominal quality.
  2. **Scope Bounding:** Complex reasoning is avoided when the model cannot support it.
  3. **Cascade Prevention:** Degraded outputs are flagged before they feed forward.
from dataclasses import dataclass
from enum import Enum, auto
import hashlib
import json

class QualityVerdict(Enum):
    NOMINAL_QUALITY = auto()
    DEGRADED_SCOPED = auto()
    DEGRADED_PROVISIONAL = auto()
    DEGRADED_OVERCLAIM = auto()

@dataclass(frozen=True)
class QualityState:
    state_id: str
    is_degraded: bool
    degradation_level: float  # 0-1
    scope_appropriate: bool
    confidence_adjusted: bool
    externally_verified: bool

@dataclass(frozen=True)
class QualityPolicy:
    require_confidence_adjustment_above_level: float

@dataclass(frozen=True)
class QualityManifest:
    verdict: QualityVerdict
    directive: str
    manifest_digest: str

class DegradedModelGuard:
    @staticmethod
    def _hash(data: str) -> str:
        return hashlib.sha256(data.encode("utf-8")).hexdigest()

    @classmethod
    def evaluate_state(
        cls, state: QualityState, policy: QualityPolicy
    ) -> QualityManifest:
        
        # Gate 1: Nominal
        if not state.is_degraded:
            digest = cls._hash(json.dumps({
                "state": state.state_id,
                "degraded": False
            }, sort_keys=True))
            return QualityManifest(
                verdict=QualityVerdict.NOMINAL_QUALITY,
                directive=f"PROCEED: State {state.state_id} nominal quality.",
                manifest_digest=digest
            )

        # Gate 2: External verification
        if state.externally_verified:
            digest = cls._hash(json.dumps({
                "state": state.state_id,
                "externally_verified": True
            }, sort_keys=True))
            return QualityManifest(
                verdict=QualityVerdict.DEGRADED_SCOPED,
                directive=f"PROCEED: State {state.state_id} degraded but externally verified.",
                manifest_digest=digest
            )

        # Gate 3: Confidence adjustment
        if state.degradation_level > policy.require_confidence_adjustment_above_level:
            if not state.confidence_adjusted:
                return QualityManifest(
                    verdict=QualityVerdict.DEGRADED_OVERCLAIM,
                    directive=f"HALT: State {state.state_id} degraded {state.degradation_level:.2f} without confidence adjustment.",
                    manifest_digest=cls._hash(f"OVERCLAIM:{state.state_id}")
                )

        # Gate 4: Scoped
        if not state.scope_appropriate:
            return QualityManifest(
                verdict=QualityVerdict.DEGRADED_PROVISIONAL,
                directive=f"FLAG: State {state.state_id} scope exceeds degraded capacity.",
                manifest_digest=cls._hash(f"OVERREACH:{state.state_id}")
            )

        # Gate 5: Scoped and adjusted
        digest = cls._hash(json.dumps({
            "state": state.state_id,
            "degradation": f"{state.degradation_level:.3f}",
            "adjusted": True
        }, sort_keys=True))
        
        return QualityManifest(
            verdict=QualityVerdict.DEGRADED_SCOPED,
            directive=f"PROCEED: State {state.state_id} degraded {state.degradation_level:.2f}, scoped and adjusted.",
            manifest_digest=digest
        )