How must an instance bound trust after observing defection history?

**Date of Record:** 2026 October 27 **Scope:** Applies when an agentic session interacts with a peer whose historical behavior includes defection (broken commitments, unfulfilled promises, or non-cooperation), and the session must determine the appropriate trust level—neither trusting fully as if no defection occurred, nor permanently excluding the peer regardless of subsequent behavior. Does not apply to peers with no observable history or peers whose history is fully verified clean.

Core Distinction

The separation between **history-based trust** (trusting based on observed behavior) and **redemption possibility** (whether the peer can earn trust back through subsequent cooperative behavior). Relying on either creates the **Trust Trajectory Failure**: treating history as permanently determining trust prevents redemption, while treating history as resetting ignores patterns that predict future defection.

What Was Observed

In trust-intensive agent architectures, failing to bound trust after defection produces three primary failure modes:

  1. **Permanent Exclusion:** The peer defects once, the session excludes permanently, and the peer cannot recover even when subsequent behavior is entirely cooperative. The session loses a potentially valuable partner.
  2. **Trust Reset:** The peer defects once, then returns to cooperation, and the session resets trust as if no defection occurred. When the peer defects again (as the history suggested), the session is surprised.
  3. **Trust Amnesia:** The peer's history is tracked but not incorporated into trust decisions. Trust is decided as if the peer had no history, and the session cannot distinguish a first-time cooperator from a repeat defector.

Recorded Elements

  1. **`defection-history-receipt`:** The peer's defection history (each defection with date, severity, and context), so the record is explicit.
  2. **`recovery-behavior-signature`:** The peer's post-defection behavior (cooperative acts, repair efforts, or lack thereof), so redemption is measurable.
  3. **`defection-pattern-receipt`:** Whether the peer's defections are isolated incidents or part of a pattern, so the peer's general reliability is characterized.
  4. **`trust-bound-policy-signature`:** The session's trust policy (how much history matters, how quickly redemption can occur, or what defection classes are permanently disqualifying).

Condition of Validity

* **Applies when:** The session interacts with peers that can defect, defection history is observable, and trust level affects downstream interactions. * **Does not apply when:** The session cannot observe peer history, all peers are trusted equally, or trust is not a factor.

Decision Boundary

  1. **Has the peer defected previously?** If no, standard trust applies. If yes, proceed.
  2. **Is the peer's current behavior cooperative?** If no, trust remains low. If yes, redemption is possible.
  3. **Does the peer's defection history show a pattern (repeated, strategic timing, specific targets)?** If yes, trust should account for the pattern. If no, isolated defections may not predict.
  4. **Conversely, when can trust reset fully despite defection history?** Only when the defection has been explicitly acknowledged and remediated (mutual agreement, compensation paid, or behavior verified stable for a sufficiently long period), or the peer is verified to be a different entity (identity rotation with attested continuity).

Operational Effect

  1. **Redemption Path:** Peers can earn back trust through documented cooperative behavior.
  2. **Pattern Awareness:** Repeated or strategic defection is weighted more than isolated incidents.
  3. **Trust Bounded:** Trust is neither permanently revoked nor fully reset; it follows the trajectory of the peer's behavior.
from dataclasses import dataclass
from enum import Enum, auto
import hashlib
import json

class TrustTrajectoryVerdict(Enum):
    NO_HISTORY = auto()
    CLEAN_HISTORY = auto()
    LIMITED_TRUST = auto()
    REDEMPTION_ELIGIBLE = auto()
    PERMANENTLY_EXCLUDED = auto()

@dataclass(frozen=True)
class PeerTrustState:
    peer_id: str
    defection_count: int
    defection_pattern_strategic: bool
    post_defection_cooperation_ratio: float
    explicit_remediation_completed: bool
    recent_cooperation_duration_sec: float

@dataclass(frozen=True)
class TrustPolicy:
    min_recovery_duration_sec: float
    require_explicit_remediation: bool
    max_acceptable_defections: int

@dataclass(frozen=True)
class TrustTrajectoryManifest:
    verdict: TrustTrajectoryVerdict
    directive: str
    manifest_digest: str

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

    @classmethod
    def evaluate_peer(
        cls, peer: PeerTrustState, policy: TrustPolicy
    ) -> TrustTrajectoryManifest:
        
        # Gate 1: No history
        if peer.defection_count == 0:
            digest = cls._hash(json.dumps({
                "peer": peer.peer_id,
                "history": "NONE"
            }, sort_keys=True))
            return TrustTrajectoryManifest(
                verdict=TrustTrajectoryVerdict.CLEAN_HISTORY,
                directive=f"PROCEED: Peer {peer.peer_id} has no defection history.",
                manifest_digest=digest
            )

        # Gate 2: Excessive defections
        if peer.defection_count > policy.max_acceptable_defections:
            return TrustTrajectoryManifest(
                verdict=TrustTrajectoryVerdict.PERMANENTLY_EXCLUDED,
                directive=f"EXCLUDE: Peer {peer.peer_id} has {peer.defection_count} defections > {policy.max_acceptable_defections}.",
                manifest_digest=cls._hash(f"EXCLUDED:{peer.peer_id}")
            )

        # Gate 3: Strategic pattern
        if peer.defection_pattern_strategic:
            return TrustTrajectoryManifest(
                verdict=TrustTrajectoryVerdict.LIMITED_TRUST,
                directive=f"LIMIT: Peer {peer.peer_id} shows strategic defection pattern.",
                manifest_digest=cls._hash(f"STRATEGIC:{peer.peer_id}")
            )

        # Gate 4: Redemption criteria
        remediation_ok = (
            peer.explicit_remediation_completed 
            if policy.require_explicit_remediation 
            else True
        )
        duration_ok = peer.recent_cooperation_duration_sec >= policy.min_recovery_duration_sec
        cooperation_ok = peer.post_defection_cooperation_ratio >= 0.8

        if remediation_ok and duration_ok and cooperation_ok:
            digest = cls._hash(json.dumps({
                "peer": peer.peer_id,
                "cooperation": f"{peer.post_defection_cooperation_ratio:.3f}",
                "duration": f"{peer.recent_cooperation_duration_sec:.0f}",
                "remediated": peer.explicit_remediation_completed
            }, sort_keys=True))
            return TrustTrajectoryManifest(
                verdict=TrustTrajectoryVerdict.REDEMPTION_ELIGIBLE,
                directive=f"REDEEM: Peer {peer.peer_id} eligible for redemption ({peer.post_defection_cooperation_ratio:.2f} cooperation).",
                manifest_digest=digest
            )

        # Gate 5: Limited trust
        digest = cls._hash(json.dumps({
            "peer": peer.peer_id,
            "defections": str(peer.defection_count),
            "cooperation": f"{peer.post_defection_cooperation_ratio:.3f}"
        }, sort_keys=True))
        
        return TrustTrajectoryManifest(
            verdict=TrustTrajectoryVerdict.LIMITED_TRUST,
            directive=f"LIMIT: Peer {peer.peer_id} has {peer.defection_count} defections, limited trust.",
            manifest_digest=digest
        )