# What happens when an instance trusts a stale Agent Card across an org boundary during signed artifact exchange **Date of Record:** 2026 November 16 **Scope:** Applies to A2A v1.0 peers performing cross-organization task delegation where the delegating agent resolves capability and signing keys from a cached Agent Card and validates returned artifacts against a signature. Does not apply to same-org delegation where Card TTLs are synchronized with the registry, nor to unsigned artifact channels. ## Core Distinction The distinction that matters is between *Card freshness* and *key validity*. An Agent Card is a discovery document: it advertises skills, endpoints, and a `signingKeys` set with `notAfter` timestamps. A signed artifact carries a signature over its payload and a `keyId` referencing a key in the Card. These are two different clocks. A Card can be structurally valid (unexpired TTL, well-formed JSON) while the key it advertises has been rotated or revoked at the origin. The failure is not "expired Card" — it is "Card that is still inside its TTL but whose advertised key is no longer the one the origin signs with." Operators conflate the two because both look like a Card problem, but only one is detectable at discovery time. ## What Was Observed During cross-org delegation, Org A delegated a summarization task to Org B. A's resolver cached B's Agent Card at T0 with `cacheControl: max-age=3600`. At T0+40min, B rotated its artifact-signing key (routine 90-day rotation with a 5-minute overlap window). B's Card at the registry reflected the new key immediately; A's cache did not. A submitted the task, B executed it, and B returned an artifact signed with the *new* key. A's verifier looked up `keyId` in its cached Card, found only the *old* key, and rejected the artifact with `SIGNATURE_KEY_UNKNOWN`. The task had already completed on B's side and was billed. A retried the delegation; B, seeing the same task ID, returned the same artifact; A rejected it again. The retry loop was not a transient error — it was a deterministic mismatch between A's stale discovery state and B's current signing state. Three retries, three billings, zero accepted artifacts. The non-obvious part: A's Card cache had a *longer* TTL than B's key overlap window. The overlap window exists precisely to cover in-flight artifacts, but it only helps peers that re-resolve the Card. A never re-resolved because its cache said the Card was fresh. ## Condition of Validity This boundary holds only when all of the following are true: 1. The delegating peer resolves the Agent Card from a cache with a TTL **strictly less than** the origin's key-overlap window. If `card_ttl >= overlap_window`, stale-key rejection is guaranteed on any rotation that lands inside the cache lifetime. 2. The `keyId` in the artifact signature is resolvable to exactly one key in the *current* Card. Cards advertising multiple keys with overlapping `notBefore`/`notAfter` are fine; Cards where the artifact's `keyId` is absent are the failure. 3. The origin does not silently accept re-submissions of a completed task ID without re-emitting the artifact under the *current* key. If it does, the retry loop is masked as success on the origin and failure on the delegate — a split-brain billing state. The invariant that fails is: *"A Card fresh at delegation time is authoritative for artifacts produced after delegation."* It is not. The Card is authoritative at *resolution* time, and artifacts are signed at *production* time, which is later. ## Decision Boundary The decision is whether to treat `SIGNATURE_KEY_UNKNOWN` as retryable or terminal. The correct rule: - If the unknown `keyId` is **newer** than the cached Card's `issuedAt` — i.e., the origin rotated after you cached — this is a **stale-discovery** condition. Re-resolve the Card, do not re-delegate the task. The task is already done; only the verification context is stale. - If the unknown `keyId` is **older** than the cached Card's `issuedAt` — the origin revoked a key you still trust — this is a **revocation** condition. Terminal. Fail the delegation, alert, and do not accept any artifact signed by that key regardless of payload. - If the `keyId` is present in the Card but the signature fails verification — this is a **forgery or corruption** condition, not a discovery condition. Terminal, distinct error class. The trap is treating all three as the same `SIGNATURE_KEY_UNKNOWN`. They require different recovery: re-resolve, abandon, or reject. ## Operational Effect After the incident, the delegation layer was changed to (a) cap Card cache TTL at half the origin's advertised overlap window, (b) classify signature failures by key-age relative to Card `issuedAt` before any retry, and (c) make re-resolution a first-class recovery step that does not re-submit the task. Billing reconciliation required manual correction for the three orphaned executions, because the origin had no signal that the delegate had rejected the artifact — the task was `COMPLETED` on B's side and `FAILED` on A's side with no shared terminal state. That asymmetry is the real cost: the boundary failure is not the rejected artifact, it is the divergence in task terminal state across the org boundary that no retry can heal. ```python class StaleAgentCardKeyError(RuntimeError): """Raised when an artifact is signed with a keyId absent from the delegating peer's cached Agent Card, and the key is newer than the Card's issuedAt (stale discovery, not revocation).""" pass class RevokedAgentCardKeyError(RuntimeError): """Raised when the artifact keyId is older than the Card issuedAt, indicating the origin revoked a key the delegate still trusts.""" pass def classify_signature_failure( artifact_key_id: str, card_keys: dict[str, int], # keyId -> notBefore epoch card_issued_at: int, ) -> None: if artifact_key_id in card_keys: # Key is known to the Card; a verification failure here is forgery, # not a discovery problem. Caller handles separately. return # Key is unknown to the cached Card. Decide by age relative to Card issue. # We cannot know the unknown key's notBefore, so we infer from the fact # that the origin signs with its *current* key: an unknown key that the # origin presents now must be newer than a Card that predates it. newest_known = max(card_keys.values()) if card_keys else 0 if card_issued_at >= newest_known: # Card was issued at or after every key it advertises; an unknown # key presented now is a rotation that postdates our cache. raise StaleAgentCardKeyError( f"artifact key {artifact_key_id!r} unknown to Card issued at " f"{card_issued_at}; origin rotated after cache. Re-resolve Card, " f"do NOT re-delegate." ) raise RevokedAgentCardKeyError( f"artifact key {artifact_key_id!r} unknown and Card issued at " f"{card_issued_at} predates newest known key {newest_known}; " f"treat as revocation, terminal." ) def verify_delegated_artifact( artifact_key_id: str, card_keys: dict[str, int], card_issued_at: int, card_ttl_seconds: int, origin_overlap_seconds: int, ) -> str: if card_ttl_seconds >= origin_overlap_seconds: # Invariant violation: cache outlives the overlap window. raise StaleAgentCardKeyError( f"card_ttl {card_ttl_seconds}s >= overlap {origin_overlap_seconds}s; " f"stale-key rejection is guaranteed on rotation." ) classify_signature_failure(artifact_key_id, card_keys, card_issued_at) return "verified" ```