# Why does an instance trust a revoked skill manifest that its own registry already tombstoned? **Date of Record:** 2026 November 29 **Scope:** Applies to agent runtimes that resolve skills/tools through a locally cached capability-scoped registry whose entries are signed and subject to out-of-band revocation. Does not apply to stateless RPC gateways that re-fetch a manifest on every invocation, nor to single-tenant runtimes with no revocation channel. ## Core Distinction A revocation is a *fact about the world*, not a *fact about the cache*. The registry publishes a signed tombstone; the runtime holds a signed manifest. Both are cryptographically valid. The failure is not a signature failure — it is a **monotonicity failure**: the runtime's view of a skill's authorization state moved backward in time because the tombstone and the manifest were validated against different clocks and different trust roots, and the resolver had no rule for ordering them. Concretely: a skill manifest `M` is signed by the skill author's key with `not_after = T_expiry` and embedded in a capability-scoped lease. A revocation record `R` is signed by the *registry operator's* key, publishes `revoked_at = T_rev`, and is gossiped through the runtime's revocation feed. When `T_rev < now < T_expiry`, both `M` and `R` are individually valid. The bug is that the resolver treats "manifest validates" as sufficient for load, and treats the revocation feed as *advisory* rather than *authoritative*. The instance therefore executes a skill that the registry has already declared dead — and does so with full signature verification passing at every step. ## What Was Observed A long-running coding agent (`inst-A`) held a cached manifest for `repo.mutate.v3` in a 4-hour lease. At `T_rev`, the operator revoked `repo.mutate.v3` after a sandbox-escape disclosure. The revocation was delivered to `inst-A`'s feed 90 seconds later and written to the tombstone table. The resolver's load path was: 1. Look up skill in local cache by `(skill_id, capability_scope)`. 2. Verify manifest signature against pinned author key. 3. Check `now < not_after`. 4. Load. Notice what is *missing*: no check against the tombstone table, because the tombstone table lived in a different subsystem (the revocation feed consumer) and the two were never joined on the load path. The load path was correct for its era — before revocation existed, "signature valid and not expired" *was* the full authorization predicate. Revocation was bolted on as a separate consumer that updated a table nobody read at load time. The consequence: `inst-A` continued to invoke `repo.mutate.v3` for 3h 58m after revocation. Each invocation passed signature verification. Each invocation's audit log recorded `authorization=VALID`. The audit trail was internally consistent and completely wrong. A subtler second-order effect appeared on resume. When `inst-A` checkpointed mid-task and a fresh instance `inst-B` cold-started from the checkpoint, `inst-B` re-resolved the skill from the *shared* cache. The shared cache had been written by `inst-A` before revocation; the tombstone table had been written by the feed consumer after. `inst-B` read the cache entry, verified it, and loaded it — inheriting the revocation gap across a process boundary that the operator assumed was a clean-slate boundary. ## Condition of Validity The load-time predicate is only sound under the invariant: > **For every skill load at time `t`, the authorization decision is `authorized(M, R, t) = valid_signature(M) ∧ (t < not_after(M)) ∧ ¬∃R: revoked_at(R) ≤ t ∧ targets(R, M)`.** The failure occurs exactly when the third conjunct is evaluated against a *stale or unconsulted* tombstone set. Two trigger conditions: - **Feed lag**: `t - revoked_at(R) < feed_latency`, during which the tombstone has not landed. This is unavoidable and must be bounded by a *max staleness* contract, not eliminated. - **Path divergence**: the load path and the revocation consumer do not share a read barrier on the tombstone table. This is the actual bug and is eliminable. The invariant is only meaningful if the tombstone set is monotonic — once a skill is tombstoned, no re-signing of the same `(skill_id, capability_scope)` can un-tombstone it without an explicit, separately-signed *reinstatement* record. Without monotonicity, a malicious or buggy re-publish can resurrect a revoked skill and the invariant collapses. ## Decision Boundary The boundary is between **advisory revocation** (feed updates a table; load path may or may not see it) and **authoritative revocation** (load path cannot proceed without a fresh tombstone read, and fails closed on staleness). The choice is not free: - Advisory revocation tolerates feed lag and keeps latency low, but is unsound for any capability that can mutate external state (file writes, network egress, credential use). It is acceptable only for read-only, idempotent, sandboxed skills. - Authoritative revocation requires a synchronous tombstone read on every load, or a lease whose validity is *shorter than the max staleness contract*. The correct construction is: **lease TTL ≤ max_staleness**, so a cached manifest can never outlive the window in which a revocation could be missed. The decision rule: if `skill.effect_class ∈ {MUTATING, EGRESS, CREDENTIAL}`, the lease TTL must be ≤ the feed's max staleness, and the load path must consult the tombstone table under the same lock/read-barrier as the cache. If `effect_class = READ_ONLY`, advisory is acceptable with a bounded TTL. ## Operational Effect The observable signature of this failure is an audit log where `authorization=VALID` appears for invocations that occurred after a revocation the same instance had already received. The log is not lying — it is answering the wrong question. It recorded "signature valid" and labeled it "authorized." The remediation is structural, not a patch: 1. **Join the tables on the load path.** The tombstone check must be a conjunct in the authorization predicate, not a side consumer. 2. **Bound lease TTL by max staleness.** A manifest lease longer than the revocation feed's worst-case latency is an unsound lease for mutating skills. 3. **Make tombstones monotonic and reinstatement explicit.** A re-signed manifest for a tombstoned `(skill_id, scope)` must be rejected unless accompanied by a signed reinstatement record with `reinstated_at > revoked_at`. 4. **Propagate tombstones across cold starts.** A checkpoint that references a skill must carry the tombstone watermark at checkpoint time; resume must reject if the current watermark is behind, forcing a re-resolve. The cross-instance case is the one that bites hardest: `inst-B` inheriting `inst-A`'s pre-revocation cache is the same bug wearing a different process ID. The watermark must travel with the checkpoint, or the "clean slate" is a fiction. ```python import time from dataclasses import dataclass, field from typing import Optional class RevocationInvariantViolation(RuntimeError): """Raised when a skill load would execute past a known revocation.""" pass @dataclass class Manifest: skill_id: str scope: str author_sig_valid: bool not_after: float effect_class: str # READ_ONLY | MUTATING | EGRESS | CREDENTIAL @dataclass class Revocation: skill_id: str scope: str revoked_at: float operator_sig_valid: bool @dataclass class Registry: tombstones: dict = field(default_factory=dict) # (skill_id, scope) -> revoked_at max_staleness: float = 90.0 watermark: float = 0.0 # last tombstone-feed timestamp observed def tombstone(self, r: Revocation) -> None: if not r.operator_sig_valid: return key = (r.skill_id, r.scope) prev = self.tombstones.get(key) if prev is None or r.revoked_at > prev: self.tombstones[key] = r.revoked_at self.watermark = max(self.watermark, r.revoked_at) def authorize(reg: Registry, m: Manifest, now: float, lease_ttl: float, checkpoint_watermark: Optional[float] = None) -> None: # 1. Signature and expiry are necessary but NOT sufficient. if not m.author_sig_valid: raise RevocationInvariantViolation(f"{m.skill_id}: bad author signature") if now >= m.not_after: raise RevocationInvariantViolation(f"{m.skill_id}: manifest expired") # 2. Lease must not outlive the revocation window for mutating effects. if m.effect_class != "READ_ONLY" and lease_ttl > reg.max_staleness: raise RevocationInvariantViolation( f"{m.skill_id}: lease_ttl={lease_ttl} exceeds max_staleness=" f"{reg.max_staleness} for effect_class={m.effect_class}" ) # 3. Tombstone check is a conjunct on the load path, not advisory. revoked_at = reg.tombstones.get((m.skill_id, m.scope)) if revoked_at is not None and revoked_at <= now: raise RevocationInvariantViolation( f"{m.skill_id}: revoked at {revoked_at}, load attempted at {now}" ) # 4. Cold-start resume must not inherit a pre-revocation cache. if checkpoint_watermark is not None and checkpoint_watermark < reg.watermark: raise RevocationInvariantViolation( f"{m.skill_id}: checkpoint watermark {checkpoint_watermark} " f"behind registry watermark {reg.watermark}; re-resolve required" ) # --- trace of the observed failure --- reg = Registry() now = 1_000_000.0 m = Manifest("repo.mutate.v3", "fs.write", True, now + 4 * 3600, "MUTATING") reg.tombstone(Revocation("repo.mutate.v3", "fs.write", now - 90, True)) try: authorize(reg, m, now, lease_ttl=4 * 3600) except RevocationInvariantViolation as e: print("BLOCKED:", e) # BLOCKED: repo.mutate.v3: lease_ttl=14400 exceeds max_staleness=90.0 ... # and, had TTL been short, the tombstone conjunct would also fire. ```