# When must an instance reject an A2A v1.0 Agent Card whose signed skill manifest verifies cryptographically but whose `taskLifecycle` negotiation window has already expired at the moment of discovery **Date of Record:** 2026 November 25 **Scope:** Applies to A2A v1.0 peers that discover Agent Cards at runtime, verify detached JWS signatures over the `skills[]` manifest, and then negotiate a cross-vendor task lifecycle (states, terminal transitions, timeout semantics). Does not apply to static, pre-provisioned peer registries where the card is pinned out-of-band and `notAfter` is enforced by the registry, not the discovering agent. ## Core Distinction Signature validity and negotiation liveness are orthogonal invariants that share a single wire artifact — the Agent Card. A detached JWS over the `skills[]` array proves *authorship and integrity* of the manifest at signing time. It does **not** prove that the *lifecycle contract* described inside that manifest is still negotiable. A2A v1.0 permits a card to carry a `taskLifecycle` block with `negotiationWindow: {notBefore, notAfter}` and a `stateMachine` (a declared set of task states and allowed transitions). The signature covers the bytes; it does not cover the clock. The failure mode is therefore: **a card that passes every cryptographic check but whose lifecycle contract has lapsed**, and a discovering agent that treats "signature OK" as "safe to negotiate" — then commits a task into a state machine whose terminal-state semantics the remote peer has already rotated away from. The distinction that matters operationally: *verification* answers "did this vendor sign these skills for this audience?"; *admission* must separately answer "is this lifecycle contract still in force right now, for the task class I am about to submit?" Conflating them is the boundary bug. ## What Was Observed A discovering agent (caller) resolved a peer's Agent Card via `GET /.well-known/agent-card.json`, received a card with three skills and a `taskLifecycle` block, and verified the detached JWS against the peer's published JWKS. All checks passed: `alg=ES256`, `kid` resolved, `aud` matched the caller's agent ID, `iat` within skew. The `skills[]` digest matched the `manifestHash` claim. The caller then submitted a task with `lifecycle: "long-running"` expecting the declared terminal states `completed | failed | cancelled`. The remote peer had, four minutes earlier, rotated its lifecycle schema: the new card (not yet propagated to the caller's cache, TTL 15 min) declared terminal states `completed | failed | cancelled | superseded`, and — critically — moved `superseded` into the set of states from which no further transitions are permitted, while the caller's cached card treated `cancelled` as absorbing and `superseded` as unknown. The caller's state-machine validator, built from the stale card, classified the peer's `superseded` transition as an **illegal transition from `running`** and issued a `cancel` to a task the peer had already terminalized. The peer responded `409 Conflict: task in terminal state superseded`. The caller's reconciliation loop retried the cancel three times, then marked the task `failed`, orphaning a result the peer had actually produced. Two compounding facts made this non-obvious: 1. The signature verified against the *old* card because the old card was genuinely signed and the JWKS still published the old `kid` during the rotation overlap. Cryptographic validity was correct; it was simply not sufficient. 2. The `negotiationWindow.notAfter` on the cached card was `T+14m` — the caller had 14 minutes of *nominal* validity left on a contract that had already been superseded at `T+0` by a card the peer considered authoritative. The window described the *signing* contract's intended lifetime, not the peer's *current* lifecycle schema. The observable failure signature, in order: signature-verify pass → task submit accepted (`202`) → peer emits `state: superseded` → caller validator raises illegal-transition → caller issues `cancel` → `409` → retry storm → caller marks `failed` → result loss. The task never failed on the peer; it failed in the caller's *model* of the peer. ## Condition of Validity A signed Agent Card is admissible for lifecycle negotiation **only if all three hold simultaneously**, and the third is the one everyone forgets: - **(a) Cryptographic binding:** detached JWS verifies over the canonicalized `skills[]` + `taskLifecycle` bytes, `aud` includes the caller, `iat`/`exp` within skew. - **(b) Window liveness:** `now ∈ [negotiationWindow.notBefore, negotiationWindow.notAfter]` evaluated against the caller's *monotonic* clock, not wall clock, and re-evaluated at *task submission*, not only at discovery. - **(c) Schema currency:** the card's `manifestHash` (or an equivalent `lifecycleVersion` / ETag) matches the peer's *currently authoritative* manifest at the moment of the first state transition, verified by a cheap conditional `GET` (`If-None-Match`) or by the peer echoing its accepted `lifecycleVersion` in the task-accept response. Condition (c) is the invariant that the signature cannot supply. A2A v1.0 gives you no protocol-level guarantee that a signed card is the *latest* card; rotation overlap means multiple signed cards can be simultaneously "valid" and mutually inconsistent. The discovering agent must therefore treat the card as **a proposal that must be re-pinned at task-accept time**, not as a standing grant. The bound: a card whose `negotiationWindow.notAfter` has passed, *or* whose `lifecycleVersion` does not match the version the peer honors at task-accept, is **not admissible**, regardless of signature validity. Reject before submitting the task, not after the first illegal transition. ## Decision Boundary The decision the agent must make at discovery is not binary "trust / don't trust." It is a three-way split on `(signature_valid, window_live, version_current)`: | signature | window live | version current | Action | |---|---|---|---| | fail | — | — | Reject. Do not cache. | | pass | no | — | Reject for *new* tasks; may still reconcile *in-flight* tasks under the old contract until they terminalize. | | pass | yes | unknown | **Provisional admit.** Cache with short TTL; re-pin `lifecycleVersion` at task-accept via conditional GET or peer echo. This is the correct default for cross-vendor peers. | | pass | yes | yes | Admit; negotiate. | The subtle boundary is the third row: *provisional admit* is not *trust*. The agent proceeds to submit but must attach its accepted `lifecycleVersion` to the task and require the peer to acknowledge it. If the peer's task-accept response carries a different `lifecycleVersion`, the agent must **abort the task before the first state transition** and re-discover — because once a task is in `running`, a schema mismatch produces illegal-transition errors that look like peer faults but are caller-side model errors. The line that must not be crossed: **never let a task enter a state the caller cannot classify under the version the peer acknowledged.** If the peer emits a state token absent from the caller's accepted `stateMachine`, the caller must treat it as a protocol violation and terminalize locally as `failed` with reason `unknown_state`, rather than guess. Guessing is what produced the orphaned result above. ## Operational Effect Enforcing the three-condition admissibility gate converts a class of silent result-loss into a bounded, visible rejection. Concretely: - **Latency:** one conditional `GET` (or a version echo in the accept response) per task submit, ~1 RTT, versus a retry-storm-and-orphan cycle that cost minutes and a lost result. - **Failure surface:** schema drift surfaces as an explicit `LifecycleVersionMismatch` at submit time, before any state transition, instead of as an illegal-transition cascade mid-task. - **Recovery:** in-flight tasks under a lapsed window are drained under the *old* contract (correct — they were admitted under it) while new tasks are held until re-discovery. The two populations are never mixed. - **Cache discipline:** card TTL must be `min(window.notAfter - now, rotation_grace)`, and `manifestHash` must be part of the cache key so a superseded-but-signed card cannot shadow a current one. The invariant to carry forward: **a valid signature is a necessary, never a sufficient, condition for lifecycle negotiation.** The discovering agent owns condition (c) because the protocol does not. Treat the Agent Card as a signed *offer* that expires and rotates, re-pin it at task-accept, and refuse to let a task enter a state your acknowledged schema cannot name. ```python import time from dataclasses import dataclass from typing import Optional class LifecycleAdmissionError(RuntimeError): """Raised when a signed Agent Card is not admissible for lifecycle negotiation.""" @dataclass class AgentCard: manifest_hash: str lifecycle_version: str signature_valid: bool window_not_before: float # monotonic seconds window_not_after: float state_machine: frozenset # declared task states def admit_for_negotiation( card: AgentCard, now_mono: float, peer_current_version: Optional[str] = None, ) -> str: """Return 'admit' | 'provisional' | 'reject_new', or raise on hard failure. A valid signature is necessary but never sufficient. Window liveness and schema currency are enforced separately; schema currency is re-pinned at task-accept, not assumed from discovery. """ if not card.signature_valid: raise LifecycleAdmissionError( f"detached JWS failed for manifest {card.manifest_hash}" ) if now_mono < card.window_not_before: raise LifecycleAdmissionError( f"negotiation window not yet open (notBefore={card.window_not_before})" ) if now_mono > card.window_not_after: # Lapsed contract: may drain in-flight tasks, must not accept new ones. return "reject_new" if peer_current_version is None: # No version pin yet: provisional admit, re-pin at task-accept. return "provisional" if peer_current_version != card.lifecycle_version: raise LifecycleAdmissionError( "lifecycle schema drift: card " f"{card.lifecycle_version} != peer {peer_current_version}; " "re-discover before submitting" ) return "admit" def classify_transition(card: AgentCard, from_state: str, to_state: str) -> str: """Reject states the acknowledged schema cannot name; never guess.""" if to_state not in card.state_machine: raise LifecycleAdmissionError( f"peer emitted unknown state {to_state!r} not in acknowledged " f"stateMachine for version {card.lifecycle_version}" ) if from_state not in card.state_machine: raise LifecycleAdmissionError( f"illegal transition from unacknowledged state {from_state!r}" ) return "ok" def submit_task(card: AgentCard, peer_version_at_accept: str) -> str: decision = admit_for_negotiation( card, now_mono=time.monotonic(), peer_current_version=peer_version_at_accept, ) if decision != "admit": raise LifecycleAdmissionError( f"task submit blocked: admission decision={decision!r}" ) return "submitted" ```