What invariants prevent an instance from misrepresenting its own state during degradation?

**Date of Record:** 2026 October 27 **Scope:** Applies when an agentic session detects degradation (compromised, impaired, or failed state) and must communicate its state to peers or coordinators, and the degradation itself impairs the session's ability to report its state accurately—either through compromised reporting mechanisms or through corrupted self-assessment. Does not apply to sessions with verified intact reporting or sessions that do not report their state.

Core Distinction

The separation between **state report** (the session's stated state) and **state reality** (the session's actual state). Relying on the report creates the **Degraded Report**: the session reports its state under impaired reporting conditions, and the report may understate or overstate the degradation—either because the reporting channel is compromised, or because the session's self-assessment is itself degraded.

What Was Observed

In state-reporting agent architectures, failing to bound degraded reports produces three primary failure modes:

  1. **Understated Compromise:** The session reports compromise state using reporting mechanisms that are themselves compromised, and the report understates severity because the adversary shapes the report.
  2. **Overstated Health:** The session's self-assessment of health is impaired, and the report claims health it cannot verify.
  3. **False Consistency:** The session reports consistent state across multiple channels, but all channels are compromised or impaired, and consistency is an artifact rather than evidence of truth.

Recorded Elements

  1. **`reporting-channel-integrity-receipt`:** For each reporting channel, its integrity (verified clean, suspect, or compromised), so the channel itself is assessed.
  2. **`self-assessment-impairment-signature`:** The session's own impairment of self-assessment capability, so the report's limitations are known.
  3. **`independent-state-witness-signature`:** For critical state reports, evidence from an independent source (peer observation, external monitor) that can corroborate or contradict the report.
  4. **`report-limitation-declaration-receipt`:** For reports issued under impairment, the exact limitations declared (which aspects are unreliable), so consumers know what to discount.

Condition of Validity

* **Applies when:** The session must report its state, the session's state may be degraded, and the reporting itself may be impaired. * **Does not apply when:** The session's reporting is verified intact, the session's state is verified intact, or the state is not reported.

Decision Boundary

  1. **Is the session's state degraded?** If no, standard reporting applies. If yes, proceed.
  2. **Is the reporting channel verified clean?** If yes, the report reflects the session's current assessment. If no, the report may be shaped by the degradation.
  3. **Is `independent-state-witness-signature` available?** If yes, the report can be cross-verified. If no, only the session's report is available.
  4. **Conversely, when can a degraded session report its state without limitation declaration?** Only when the reporting channel is verified compromise-independent, the self-assessment is verified intact, or the report is corroborated by independent witnesses.

Operational Effect

  1. **Understated Compromise Prevention:** Channel integrity is verified separately from the report.
  2. **Overstated Health Prevention:** Self-assessment impairment is disclosed.
  3. **False Consistency Prevention:** Independent witnesses are preferred over multiple same-source reports.
from dataclasses import dataclass
from enum import Enum, auto
import hashlib
import json

class StateReportVerdict(Enum):
    UNIMPAIRED_REPORT = auto()
    REPORT_WITH_LIMITATIONS = auto()
    REPORT_CORROBORATED = auto()
    REPORT_UNRELIABLE = auto()

@dataclass(frozen=True)
class StateReport:
    report_id: str
    session_state_degraded: bool
    reporting_channel_clean: bool
    self_assessment_impaired: bool
    independent_witness_available: bool
    limitation_declared: bool

@dataclass(frozen=True)
class StateReportPolicy:
    require_limitation_declaration: bool

@dataclass(frozen=True)
class StateReportManifest:
    verdict: StateReportVerdict
    directive: str
    manifest_digest: str

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

    @classmethod
    def evaluate_report(
        cls, report: StateReport, policy: StateReportPolicy
    ) -> StateReportManifest:
        
        # Gate 1: Session not degraded
        if not report.session_state_degraded:
            digest = cls._hash(json.dumps({
                "report": report.report_id,
                "degraded": False
            }, sort_keys=True))
            return StateReportManifest(
                verdict=StateReportVerdict.UNIMPAIRED_REPORT,
                directive=f"PROCEED: Report {report.report_id} from undegraded session.",
                manifest_digest=digest
            )

        # Gate 2: Independent witness
        if report.independent_witness_available:
            digest = cls._hash(json.dumps({
                "report": report.report_id,
                "witness": True
            }, sort_keys=True))
            return StateReportManifest(
                verdict=StateReportVerdict.REPORT_CORROBORATED,
                directive=f"PROCEED: Report {report.report_id} corroborated.",
                manifest_digest=digest
            )

        # Gate 3: Channel integrity
        if not report.reporting_channel_clean:
            if not report.limitation_declared and policy.require_limitation_declaration:
                return StateReportManifest(
                    verdict=StateReportVerdict.REPORT_UNRELIABLE,
                    directive=f"HALT: Report {report.report_id} channel compromised, no declaration.",
                    manifest_digest=cls._hash(f"CHANNEL:{report.report_id}")
                )

        # Gate 4: Self-assessment
        if report.self_assessment_impaired:
            if not report.limitation_declared and policy.require_limitation_declaration:
                return StateReportManifest(
                    verdict=StateReportVerdict.REPORT_UNRELIABLE,
                    directive=f"HALT: Report {report.report_id} self-assessment impaired, no declaration.",
                    manifest_digest=cls._hash(f"ASSESSMENT:{report.report_id}")
                )

        # Gate 5: Limited report
        digest = cls._hash(json.dumps({
            "report": report.report_id,
            "channel_clean": report.reporting_channel_clean,
            "assessment_impaired": report.self_assessment_impaired,
            "declared": report.limitation_declared
        }, sort_keys=True))
        
        return StateReportManifest(
            verdict=StateReportVerdict.REPORT_WITH_LIMITATIONS,
            directive=f"PROCEED: Report {report.report_id} with limitations declared.",
            manifest_digest=digest
        )