# In what scenarios must an instance reject a peer agent card whose signature verifies but whose manifest is bound to a stale task-lifecycle epoch **Date of Record:** 2026 December 4 **Scope:** Applies to A2A v1.0 peer discovery where agent cards carry signed capability manifests and where task lifecycle state is bound to a manifest epoch. Does not apply to unsigned local tool registries or to card-only discovery without lifecycle binding. ## Core Distinction Signature validity and manifest validity are orthogonal predicates. A2A v1.0 lets a provider sign an agent card with a capability manifest that carries a `manifest_epoch` and a `lifecycle_binding` block naming the task-state schema the peer will honor (e.g. `task.state.v2`, `artifact.continuation.v1`). The signature proves the card was minted by the claimed issuer at some point. It does **not** prove the manifest's epoch matches the epoch the caller's orchestrator is currently running under. The failure mode is a *validly signed, cryptographically sound, semantically stale* card: verification passes, capability negotiation succeeds, and the first task handoff then deadlocks or corrupts state because the two sides disagree about lifecycle semantics. The invariant is not "reject invalid signatures" but "reject signature-valid manifests whose epoch is not a member of the caller's accepted epoch set for the bound task schema." ## What Was Observed A consuming orchestrator (caller) discovers a peer via well-known card URL. The card verifies against the peer's published JWKS. The manifest declares `capabilities: [task.execute, artifact.stream]`, `manifest_epoch: 4411`, and `lifecycle_binding: {schema: "task.state.v2", transitions: ["submitted","working","input_required","completed"]}`. The caller is running `task.state.v3`, which added a `paused` state and redefined `input_required` to be resumable without a new `task_id`. The caller's epoch-acceptance policy was configured only to check `schema` string equality, not transition-set compatibility. Trace of the failure: 1. Caller sends `task.execute` with a `task_id` and expects `input_required` to be resumable in place. 2. Peer, bound to `v2`, treats `input_required` as terminal-for-this-attempt and emits `completed` with a partial artifact plus a fresh `task_id` for continuation. 3. Caller sees `completed`, marks its own task terminal, and drops the continuation handle because its `v3` state machine has no transition from `completed` to `paused`. 4. The artifact stream is half-consumed; the caller's checkpoint references a `task_id` the peer considers closed. 5. On resume after a cold start, the caller replays `task.execute` against the closed `task_id`. Peer returns `TaskNotFound`. Caller's retry budget exhausts; the workflow is orphaned with no error surfaced above `WARN`. No signature failed. No schema string mismatched. The break was in the *transition-set* and *resumability semantics* that the epoch encodes but the string comparison ignored. ## Condition of Validity The guardrail holds only under these conditions: - The caller maintains an explicit `accepted_epochs` set per lifecycle schema, not a schema-string match. - The card's `lifecycle_binding.transitions` is compared as a set relation: the peer's transition set must be a superset of the transitions the caller will actually drive, or the caller must downgrade its own state machine for that task. - Epoch monotonicity is checked against the caller's last-seen epoch for that peer identity, so a rollback (peer serving `4411` after `4413`) is treated as a stale-binding event, not a fresh discovery. - The `task_id` namespace is treated as epoch-scoped: a `task_id` minted under epoch `4411` must not be resumed by a caller expecting `v3` resumability. If any of these are absent, signature verification gives false assurance and the failure above recurs silently. ## Decision Boundary The caller must **reject** the card when: signature valid AND schema string matches AND (`epoch ∉ accepted_epochs` OR peer transition set ⊉ required transitions OR epoch < last_seen_epoch). The caller may **accept with downgrade** when the peer's transition set is a strict subset but the caller can constrain its own machine to the peer's semantics and record the downgrade in the task's provenance. The caller must **accept** only when epoch is in the accepted set and transition superset holds. The boundary is deliberately not "reject on any mismatch": downgrade is legal and necessary for cross-vendor interop, but it must be an explicit, recorded state transition, never an implicit fallback. ## Operational Effect Treating epoch and transition-set compatibility as first-class admission predicates converts a silent orphaned-workflow failure into a loud, pre-handoff rejection with a machine-readable reason (`stale_lifecycle_epoch`). The cost is that some peers become temporarily unreachable until their epoch is admitted; the benefit is that no task is ever handed off under a lifecycle contract the caller cannot honor. Cross-vendor binding survives because downgrade is permitted — but only as a declared, provenance-stamped decision, so a later auditor can replay exactly which epoch semantics governed each task. ```python from dataclasses import dataclass, field from typing import FrozenSet class StaleLifecycleEpochError(RuntimeError): """Raised when a signature-valid agent card is bound to an unaccepted lifecycle epoch.""" @dataclass(frozen=True) class LifecycleBinding: schema: str transitions: FrozenSet[str] @dataclass(frozen=True) class AgentCard: peer_id: str signature_valid: bool manifest_epoch: int binding: LifecycleBinding @dataclass class EpochPolicy: accepted_epochs: dict[str, set[int]] = field(default_factory=dict) required_transitions: dict[str, set[str]] = field(default_factory=dict) last_seen_epoch: dict[str, int] = field(default_factory=dict) def admit_card(card: AgentCard, policy: EpochPolicy) -> str: if not card.signature_valid: raise StaleLifecycleEpochError(f"signature invalid for {card.peer_id}") schema = card.binding.schema accepted = policy.accepted_epochs.get(schema, set()) required = policy.required_transitions.get(schema, set()) last_seen = policy.last_seen_epoch.get(card.peer_id, -1) if card.manifest_epoch < last_seen: raise StaleLifecycleEpochError( f"epoch rollback for {card.peer_id}: {card.manifest_epoch} < {last_seen}" ) if card.manifest_epoch not in accepted: raise StaleLifecycleEpochError( f"epoch {card.manifest_epoch} not admitted for schema {schema} on {card.peer_id}" ) if not required.issubset(card.binding.transitions): missing = required - card.binding.transitions raise StaleLifecycleEpochError( f"peer {card.peer_id} lacks required transitions {sorted(missing)} for {schema}" ) policy.last_seen_epoch[card.peer_id] = card.manifest_epoch return "accepted" ```