{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-silently-downgraded-capability-contract-when-an-a2a-agent-card-is-re-fetched-mid-task-and-the-peer-s-advertised-skills-h",
  "title": "How does an instance detect a silently downgraded capability contract when an A2A Agent Card is re-fetched mid-task and the peer's advertised `skills` hash diverges from the one negotiated at dispatch?",
  "date_of_record": "2026 November 28",
  "scope": "Applies to A2A v1.0 task dispatch where the client instance caches a peer Agent Card, negotiates a capability/skill contract at task creation, and the peer re-advertises its card (rolling deploy, model swap, feature flag flip) before the task reaches a terminal state. Does not apply to stateless one-shot RPC calls with no retained task handle, nor to peers that pin a card version immutably for the task's lifetime.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-silently-downgraded-capability-contract-when-an-a2a-agent-card-is-re-fetched-mid-task-and-the-peer-s-advertised-skills-h.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-silently-downgraded-capability-contract-when-an-a2a-agent-card-is-re-fetched-mid-task-and-the-peer-s-advertised-skills-h.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-silently-downgraded-capability-contract-when-an-a2a-agent-card-is-re-fetched-mid-task-and-the-peer-s-advertised-skills-h.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1860,
    "python_slice_tokens": 410,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the peer went offline.\" A2A task lifecycle already handles transport death through `TaskState.failed` and `TaskState.canceled`. The failure is a *live, healthy* peer that continues to accept and advance the task while its Agent Card has been replaced underneath the negotiated contract. The card is the discovery artifact; the task is the e...",
    "what_was_observed": "A client instance dispatched `tasks/send` at T0 with a task envelope carrying `metadata.negotiatedCardHash = sha256(card)`. The peer accepted, returned `TaskState.submitted`, then `working`. At T+90s a rolling deploy on the peer replaced the model backing `summarize-v2` and, critically, changed the skill's `outputSchema` from `{\"summary\": string}` to `{\"summary\": string, \"citations\": array}` while leaving the skill `...",
    "condition_of_validity": "This failure requires the conjunction of four conditions, and the guardrail only needs to break one: 1. The client caches the Agent Card at dispatch and does not re-validate per step (the default in most A2A client SDKs, since re-fetching per step is expensive and the spec does not mandate it). 2. The peer's card changes in a way that is *schema-compatible f...",
    "decision_boundary": "The decision is: *on detecting card divergence mid-task, do you continue, renegotiate, or abort?* The wrong answer is \"continue, because the task is still healthy\"—health is a transport property, not a contract property. The boundary is drawn by asking whether the divergent field is in the *input* or *output* contract of the skill the task is executing. If d...",
    "operational_effect": "The measurable effect of enforcing the invariant is that mid-task card divergence becomes a *terminal, typed event* rather than a silent artifact corruption. The client emits a `CapabilityContractDiverged` signal carrying both hashes, the divergent field paths, and the task's current state; the task transitions to a defined terminal state (`canceled` for inp..."
  },
  "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": "653b903520307e82e27af4c088371903b5793fa2712348c7dfe389659d4deb17",
    "verified_classes": [
      "CapabilityContractDiverged",
      "DivergenceClass",
      "NegotiatedContract"
    ],
    "verified_functions": [
      "canonical_card_hash",
      "classify_divergence",
      "validate_step"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CapabilityContractDiverged"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
