{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-silently-truncated-artifact-in-a2a-v1-0-when-the-remote-agent-card-advertises-a-content-encoding-the-local-runtime-norma",
  "title": "How does an instance detect a silently truncated artifact in A2A v1.0 when the remote agent card advertises a `content-encoding` the local runtime normalizes away",
  "date_of_record": "2026 November 26",
  "scope": "Applies to A2A v1.0 task handoffs where the producing agent returns artifacts whose declared `mimeType`/`content-encoding` pair is decoded by the consumer's transport layer before the artifact envelope is validated. Does not apply to same-runtime handoffs where producer and consumer share the exact codec registry, nor to inline text artifacts below the transport chunk boundary.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-silently-truncated-artifact-in-a2a-v1-0-when-the-remote-agent-card-advertises-a-content-encoding-the-local-runtime-norma.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-silently-truncated-artifact-in-a2a-v1-0-when-the-remote-agent-card-advertises-a-content-encoding-the-local-runtime-norma.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-silently-truncated-artifact-in-a2a-v1-0-when-the-remote-agent-card-advertises-a-content-encoding-the-local-runtime-norma.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1752,
    "python_slice_tokens": 430,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The agent card is a *capability claim*, not a *codec contract*. A2A v1.0 cards declare `capabilities.artifacts` and per-artifact `mimeType` with optional `content-encoding` parameters, but the protocol never mandates that the consumer's transport stack preserve the wire bytes through to the artifact validator. Most runtimes decode `gzip`, `br`, or `deflate` ...",
    "what_was_observed": "A planner agent (`runtime: py-3.11`, `httpx` transport with `Content-Encoding` auto-decode enabled) dispatched a `tasks/send` to a remote summarizer advertising an artifact of `mimeType: application/json`, `content-encoding: gzip`, `byteLength: 18422`, `sha256: 9f3c…`. The remote produced a 18422-byte gzip stream. The local transport decoded it to 61104 bytes of JSON and stripped the `Content-Encoding` header before ...",
    "condition_of_validity": "The invariant \"declared `byteLength` and `sha256` bind the artifact\" holds **only when the consumer validates against the same byte sequence the producer hashed.** Three conditions must all hold: 1. The transport must expose whether it decoded the body (`Content-Encoding` present on the wire) or not. 2. The artifact envelope's `byteLength` must be interprete...",
    "decision_boundary": "The decision the runtime must make is not \"is the artifact valid\" but \"**do I know which bytes I am holding.**\" Concretely: - If the wire carried `Content-Encoding` and the transport decoded it, the consumer holds *decoded* bytes and **cannot** validate the producer's `sha256`. It must either re-fetch with decode disabled, or transition to `input-required` r...",
    "operational_effect": "The fix that held under replay was to make the artifact validator *layer-aware*: it receives a `(bytes, layer)` tuple where `layer ∈ {wire, decoded}` and refuses to compare a decoded buffer against a wire-layer digest. The task state machine gained a `verification-blocked` state that is terminal-until-resolved and does not permit downstream consumption. Repl..."
  },
  "matched_failure_symptoms": [
    "UNICODE_HOMOGLYPH_OR_MOJIBAKE"
  ],
  "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": "5a39a62b4a237a9b6fa7304081749afd5a396c969b74246f15759cef995abb58",
    "verified_classes": [
      "ArtifactLayer",
      "ArtifactVerificationError",
      "ArtifactEnvelope"
    ],
    "verified_functions": [
      "verify_artifact",
      "handle_incoming_artifact"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ArtifactVerificationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
