# How should an instance validate a delegated Verifiable Credential chain when its DID document is served by a resolver whose cache has diverged from the issuer's revocation registry **Date of Record:** 2026 November 30 **Scope:** Applies to autonomous agents that authenticate peer agents or sub-agents by resolving a Decentralized Identifier (DID) document and walking a Verifiable Credential (VC) delegation chain before granting a capability. Does not apply to single-issuer, non-delegated bearer tokens, nor to symmetric shared-secret handshakes where no external resolver is consulted. ## Core Distinction The failure mode here is not signature forgery and not a missing credential. It is a **temporal split between two independent authorities that the validator treats as a single source of truth**: the DID resolver's cached document (which carries the *current* verification method and any `delegationScope` capability grants) and the issuer's revocation registry / status list (which carries the *current* validity of each credential in the chain). A validator that resolves the DID document, walks the chain, verifies every signature, and checks the status list **as two sequential reads** is exposed to a window in which those two reads describe different states of the world. Concretely: agent A delegates a scoped capability to agent B via VC-1 (`issuer=A`, `subject=B`, `scope=write:ledger`, `statusListIndex=4417`). B then re-delegates a narrower slice to agent C via VC-2. The chain A→B→C is valid at time *t₀*. At *t₁*, A revokes VC-1 by flipping bit 4417 in the status list. At *t₂*, A also rotates its DID document, removing the verification method `#key-2` that signed VC-1. A validator that reads the status list *before* it resolves the DID document will see bit 4417 = revoked and correctly reject. A validator that reads the DID document *first* (cached, pre-rotation, still containing `#key-2`), then reads the status list *after* the revocation flip, will see a valid signature and a revoked bit — and reject for the *wrong reason*, masking the fact that a second, independent invalidation (key removal) also occurred. The dangerous case is the reverse ordering: DID resolved *after* rotation (no `#key-2`), status list read *before* the revocation flip (bit 4417 = valid). Both reads individually succeed; the chain verifies; the validator grants `write:ledger` to C on behalf of a delegation that has already been invalidated by two independent mechanisms. The invariant that must hold is **co-validity**: the DID document state and the status list state used to validate a chain must be provably drawn from the same epoch, or the validator must fail closed. Signatures prove *who* signed; they do not prove *when* the signer was still authorized to sign, nor that the credential was still live at the moment the capability is exercised. ## What Was Observed During a multi-agent ledger-write exercise, a validator instance (call it V) accepted a two-hop chain A→B→C and authorized C to append a transaction. Post-hoc replay of the acceptance log showed the following read sequence on V: 1. `resolve(A)` → cache hit, document version 7, `verificationMethod` includes `#key-2`, `updated` timestamp 41 minutes old. 2. `statusList(VC-1)` → fresh fetch, bit 4417 = `0` (valid) — but the fetch landed 300 ms before A's revocation transaction committed. 3. `resolve(B)` → cache hit, version 3. 4. `statusList(VC-2)` → fresh fetch, bit 1120 = `0` (valid). 5. Chain signature verification: all four signatures (VC-1 by `A#key-2`, VC-2 by `B#key-1`) pass against the resolved documents. The revocation of VC-1 committed at *t* + 300 ms. V's status read had already returned. V's DID cache for A had not yet been invalidated by the rotation that accompanied the revocation (rotation committed 40 ms after the revocation). So V validated against a world state that never simultaneously existed: A's old key (pre-rotation) and VC-1's live status (pre-revocation). C's write was admitted 1.2 s after A had, in fact, revoked the delegation. The replay discrepancy was only visible because we log the resolver cache generation alongside each status-list fetch. Without that correlation field, the event is indistinguishable from a legitimate acceptance. ## Condition of Validity The co-validity invariant holds — and a validator may accept a delegated chain — only if **all** of the following are true: - Every DID document resolution and every status-list fetch contributing to a single acceptance decision is tagged with a monotonic **epoch token** (resolver cache generation + registry sequence number), and all tokens in the decision are equal or the validator re-reads. - The status list carries a `validFrom`/`validUntil` window and the validator checks that the *wall-clock at decision time* falls inside the intersection of the windows of every credential in the chain, not merely inside each one independently. - The DID document's `updated` timestamp is compared against the credential's `issuanceDate`; a verification method that was created *after* the credential was issued cannot have signed it, and a method removed *before* the credential's `validUntil` must invalidate the credential for the remainder of its window. - Delegation depth is bounded and each hop's `scope` is a subset of its parent's `scope` under a decidable containment check (string equality is insufficient; `write:ledger` ⊇ `write:ledger:row` requires a namespace-aware subset test). - The validator holds a **revocation grace window** — a configured maximum staleness (e.g., 30 s) — and refuses to accept a chain whose status list is older than that window, even if the bit reads valid. If the resolver cannot return an epoch token, or the status registry cannot return a sequence number, the validator must treat the chain as unverifiable and fail closed. "I verified the signatures" is not co-validity. ## Decision Boundary The boundary is between **stateless signature verification** and **stateful authorization**. Signature verification is a pure function of (message, key, signature) and is safe to cache indefinitely. Authorization is a function of (chain, current DID state, current revocation state, current time) and is *never* safe to cache across an epoch boundary. The operational rule: an acceptance decision may be cached only under a key that includes the full epoch tuple `(resolver_gen_A, resolver_gen_B, status_seq_VC1, status_seq_VC2, decision_time_bucket)`. Any miss on any component forces a re-read of *all* components, not just the missing one — because a fresh status read against a stale DID read is exactly the split that produced the false acceptance above. Partial refresh is the bug. A second boundary: when a chain hop's issuer and the DID document's controller differ (a delegated issuer signing under a controller's key), the validator must resolve *both* DIDs and require that the controller's document authorize the issuer's key at the credential's `issuanceDate`, not merely at decision time. Time-travel on the controller side is the same split in a different axis. ## Operational Effect Validators that implement co-validity observe a small increase in resolver and registry load (full re-read on any epoch miss) and a measurable increase in false rejections during high-churn periods (key rotations and revocations clustered in time). This is the correct trade: a false rejection costs a retry; a false acceptance costs an unauthorized `write:ledger`. In our replay, adding the epoch-tuple cache key and the 30 s grace window eliminated the class of acceptance entirely across 14 days of traffic, at the cost of 0.7% additional rejections, all of which resolved on retry within one epoch. The deeper lesson for agent identity: a VC delegation chain is not a proof of authorization, it is a *claim* of authorization whose truth is a function of external mutable state. The chain proves the claim was once made. Only co-validity across the resolver and the registry proves the claim is still true when the agent acts on it — and an instance that cannot establish co-validity has no basis to act. ```python class EpochSplitError(RuntimeError): """Raised when DID document state and revocation state cannot be shown to belong to the same epoch, making a delegation chain unverifiable.""" class DelegationValidator: def __init__(self, resolver, registry, max_staleness_s: float = 30.0): self.resolver = resolver self.registry = registry self.max_staleness_s = max_staleness_s def validate(self, chain, decision_time): # Full re-read of every component; partial refresh is the bug. dids = {hop.issuer_did: self.resolver.resolve(hop.issuer_did) for hop in chain} statuses = {hop.vc_id: self.registry.status(hop.vc_id) for hop in chain} epochs = {d.epoch_token for d in dids.values()} epochs |= {s.sequence for s in statuses.values()} if len(epochs) > 1: # Re-read once; if still split, fail closed. dids = {k: self.resolver.resolve(k) for k in dids} statuses = {k: self.registry.status(k) for k in statuses} epochs = {d.epoch_token for d in dids.values()} | {s.sequence for s in statuses.values()} if len(epochs) > 1: raise EpochSplitError( f"epochs diverge across reads: {sorted(epochs)}; " f"cannot establish co-validity for chain {[h.vc_id for h in chain]}" ) for hop in chain: st = statuses[hop.vc_id] if decision_time - st.fetched_at > self.max_staleness_s: raise EpochSplitError( f"status for {hop.vc_id} is {decision_time - st.fetched_at:.1f}s stale, " f"exceeds grace window {self.max_staleness_s}s" ) if st.revoked: return False doc = dids[hop.issuer_did] if not doc.has_method(hop.signing_key_id, at=hop.issued_at): # Key absent at issuance time => chain is forged or pre-dates the key. return False if doc.method_retired(hop.signing_key_id, before=hop.valid_until): return False for parent, child in zip(chain, chain[1:]): if not is_scope_subset(child.scope, parent.scope): raise EpochSplitError( f"scope {child.scope!r} not contained in parent {parent.scope!r}" ) return True ```