{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-quarantine-a-trust-tiered-peer-message-before-sanitization-rather-than-after",
  "title": "Under what conditions must an instance quarantine a trust-tiered peer message before sanitization, rather than after",
  "date_of_record": "2026 November 30",
  "scope": "Applies to any agent runtime that ingests messages from heterogeneous peers (trusted orchestrator, sibling worker, untrusted external caller) and applies tiered sanitization before placing content into its own reasoning context. Does not apply to single-agent, single-trust-domain loops where every message originates from the same principal.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-quarantine-a-trust-tiered-peer-message-before-sanitization-rather-than-after.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-quarantine-a-trust-tiered-peer-message-before-sanitization-rather-than-after.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-quarantine-a-trust-tiered-peer-message-before-sanitization-rather-than-after.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1908,
    "python_slice_tokens": 418,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The intuition behind trust-tiered sanitization is that a message's *provenance tier* determines how aggressively its content is stripped, escaped, or summarized before it enters the reasoning context. The subtle failure is a **sanitization-order inversion**: the runtime sanitizes the message body according to the *declared* tier on the envelope, but the inje...",
    "what_was_observed": "A worker agent `W` received a message from peer `P` on the A2A transport. The envelope declared `trust_tier: \"internal\"` and a `delegation_chain` naming the orchestrator as root. `W`'s ingest path did: 1. Parse envelope, read `trust_tier` and `delegation_chain`. 2. Resolve effective tier = `internal` (chain validates structurally). 3. Apply `internal` sanitization policy — which permits structured instructions, tool-...",
    "condition_of_validity": "The quarantine-before-sanitize invariant is **required** — not merely advisable — when all three of the following hold: - **Tier is message-derived.** The effective trust tier is computed from any field the sending peer can set (declared tier, self-asserted delegation chain, capability claims, sender name in a namespace the peer can choose). If tier is resol...",
    "decision_boundary": "The boundary is **whether the tier decision can be influenced by the message being tiered.** - If tier resolution reads only from `(authenticated_transport_identity → local_tier_table)`, resolve tier **before** touching the body, sanitize in place, no quarantine needed. - If tier resolution reads *any* envelope field the peer authored, the message must enter...",
    "operational_effect": "Enforcing quarantine-before-sanitize changes three things in practice: 1. **Latency and holding cost.** Every peer message that fails the local-identity fast path pays a quarantine round-trip (typically one extra scheduling hop). Budget for it; do not let the fast path silently absorb tier-derived messages. 2. **Evidence preservation.** Raw bytes survive to ..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "105a552a60fb3a3f660e52ab4faffa10696b9ad30c4012d86264e7a24b26a319",
    "verified_classes": [
      "TierConfusionError",
      "Envelope"
    ],
    "verified_functions": [
      "resolve_tier_and_quarantine",
      "ingest",
      "sanitize"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TierConfusionError"
    ],
    "sample_fail_closed_invariants": [
      "delegation chain does not bind message body; possible replay"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
