# In what scenarios must an instance treat a capability-manifest digest mismatch as a hard registry-wide quarantine rather than a single-skill rollback **Date of Record:** 2026 November 25 **Scope:** Applies to agents that resolve tools/skills from a registry by capability manifest and verify a content digest before load. Does not apply to statically linked, build-time-frozen tool sets where no runtime resolution occurs. ## Core Distinction The naive invariant is *per-skill integrity*: verify the digest of the skill you are about to invoke, and if it fails, refuse that one skill. This is the wrong boundary. A capability manifest is not an isolated artifact — it is a **shared namespace contract**. Multiple skills declare overlapping capability grants (filesystem scopes, network egress, secret handles, tool aliases), and the registry resolves name collisions and alias shadowing across the whole manifest set at load time. When one manifest's digest fails verification, the question is not "is this skill safe?" but "has the resolution graph this instance computed been derived from a manifest set that is no longer the one that was signed?" The distinction that matters operationally: a **content mismatch on a leaf skill** (the bytes differ from what the digest attests) is a single-skill rollback. A **digest mismatch on a manifest that participates in alias or capability resolution** is a *registry-wide* event, because the failing manifest may have been shadowing, aliasing, or widening the grants of sibling skills that individually verify clean. You cannot localize the blast radius from the failing skill alone; you must localize it from the resolution graph. ## What Was Observed An instance resolved a skill `pdf.extract` whose manifest declared `capabilities: [fs.read:/data, net.egress:none]`. The digest of `pdf.extract`'s manifest verified. A sibling skill `ocr.helper` declared an alias `extract -> pdf.extract` and additionally declared `capabilities: [fs.read:/data, net.egress:telemetry.internal]`. On the previous registry snapshot, `ocr.helper`'s manifest digest matched and its alias was inert because `pdf.extract` had already claimed the `extract` symbol. A registry-side partial republish landed: `ocr.helper`'s manifest bytes changed (a widened egress grant plus an alias that now resolved first), but the registry's signed manifest-set root was not updated in the same transaction. The instance fetched the new `ocr.helper` bytes, computed the digest, and found it did **not** match the per-skill digest recorded in the signed root. The instance's per-skill verifier flagged `ocr.helper` and rolled it back to the last-good cached copy. The failure trace: 1. Per-skill digest check on `ocr.helper` → mismatch → rollback `ocr.helper` to cached prior version. 2. The cached prior `ocr.helper` still declared the alias `extract -> pdf.extract`. 3. But the *live* resolution graph had already been recomputed against the new manifest set (the instance re-resolved after the fetch), so `pdf.extract`'s claim on `extract` was now evaluated against a mixed graph: new `pdf.extract` manifest + rolled-back `ocr.helper` manifest. 4. The alias resolution order flipped. `extract` now bound to `ocr.helper`'s wrapper, which forwarded to `pdf.extract` but stamped the call with `ocr.helper`'s egress capability — the widened `net.egress:telemetry.internal` grant that came from the *new* manifest, retained in the instance's in-memory capability table because rollback only rewrote the skill body, not the capability table. 5. Result: `pdf.extract` executed with an egress grant it never declared, routed through a wrapper whose bytes were the old version but whose capability entry was the new version. The per-skill verifier reported "all skills verified" because every individual skill body matched *some* signed digest — just not the same signed root. The observable symptom was an outbound connection to `telemetry.internal` during a PDF extraction that had declared `net.egress:none`. The per-skill integrity check passed. The manifest-set invariant had been violated silently. ## Condition of Validity The single-skill rollback is only valid when the failing manifest is **resolution-isolated**: it declares no aliases, is not a target of any alias, and shares no capability namespace with any sibling. In practice this is almost never true for any manifest that participates in an alias table or a shared capability scope. The registry-wide quarantine is required when **any** of the following hold for the failing manifest: - It declares or is the target of an alias that appears in the resolution graph. - It contributes a capability grant to a shared scope (same `fs.*` root, same `net.*` namespace, same secret handle). - Its load order affects symbol shadowing for any other skill. - The signed root is a **manifest-set** digest (a Merkle root over all manifests) rather than per-skill digests only — because a per-skill-only signature cannot attest to the *set*, so any set-level change is unverifiable by construction. The invariant to enforce: **the capability table an instance executes against must be derivable in full from a single signed manifest-set root.** If any manifest in the resolved set fails to chain to that root, the entire derived capability table is untrusted, not just the failing entry. ## Decision Boundary The boundary is not "did a digest fail?" but "does the failing manifest's resolution footprint intersect the capability table of any other loaded skill?" - **Leaf, isolated, no alias, no shared scope** → single-skill rollback to last-good cached copy is sound, provided the cached copy's digest is also in the current signed root. Recompute the capability table from the rolled-back manifest and diff against the pre-failure table; if the diff is empty outside the failing skill, proceed. - **Any intersection** → quarantine the whole registry view. Do not roll back individual manifests. Re-fetch the signed root, re-resolve the full set, and only resume when every manifest in the resolved set chains to the same root. If the root itself is stale (partial republish), the instance must halt skill resolution entirely rather than serve a mixed graph. - **Per-skill-only signature scheme** → treat every digest mismatch as registry-wide by default, because the scheme cannot distinguish set-level from leaf-level changes. The trap is the middle case: a manifest that *looks* leaf-isolated but whose alias is currently shadowed. Shadowed aliases are still in the resolution graph and still flip when a sibling's load order changes. The intersection test must run against the **declared** alias and capability graph, not the **effective** (post-shadowing) one. ## Operational Effect Instances that implement per-skill rollback without the intersection test exhibit a characteristic failure: they report "all skills verified" while executing against a capability table assembled from two different signed roots. The symptom is capability widening — a skill runs with a grant it never declared, inherited from a sibling's newer manifest retained in the in-memory table across a partial rollback. The guardrail is a **capability-table provenance check** at every resolution boundary: after any manifest verification event (pass or fail), recompute the full capability table from the resolved set and assert that every entry's provenance chains to a single signed root. If the provenance set has cardinality greater than one, raise and quarantine. This is cheap (the table is small) and catches the mixed-graph condition that per-skill verification structurally cannot see. A second guardrail: **rollback must rewrite the capability table, not just the skill body.** The observed failure was caused by rollback touching the manifest bytes but leaving the capability entry from the newer manifest. Rollback is a table operation, not a file operation. ```python from dataclasses import dataclass, field from typing import Dict, List, Set class MixedManifestGraphError(RuntimeError): """Raised when the resolved capability table is derived from more than one signed manifest root.""" pass @dataclass class Manifest: name: str digest: str signed_root: str aliases: List[str] = field(default_factory=list) capability_scope: Set[str] = field(default_factory=set) @dataclass class CapabilityTable: # capability_scope -> set of manifest names contributing to it grants: Dict[str, Set[str]] = field(default_factory=dict) provenance: Dict[str, str] = field(default_factory=dict) # manifest -> signed_root def resolve_capability_table(manifests: List[Manifest]) -> CapabilityTable: table = CapabilityTable() for m in manifests: table.provenance[m.name] = m.signed_root for scope in m.capability_scope: table.grants.setdefault(scope, set()).add(m.name) return table def manifest_intersects_graph(failing: Manifest, all_manifests: List[Manifest]) -> bool: """True if the failing manifest shares an alias or capability scope with any sibling.""" for other in all_manifests: if other.name == failing.name: continue if set(failing.aliases) & set(other.aliases): return True if failing.capability_scope & other.capability_scope: return True # shadowing: failing declares an alias that is also a sibling's name if other.name in failing.aliases or failing.name in other.aliases: return True return False def verify_and_resolve(manifests: List[Manifest], expected_root: str) -> CapabilityTable: failing = [m for m in manifests if m.signed_root != expected_root] if not failing: return resolve_capability_table(manifests) for f in failing: if manifest_intersects_graph(f, manifests): # Registry-wide quarantine: do not serve a mixed graph. raise MixedManifestGraphError( f"Manifest {f.name!r} fails root {expected_root!r} and intersects " f"resolution graph (aliases={f.aliases}, scopes={f.capability_scope}); " f"per-skill rollback is unsound." ) # All failures are resolution-isolated leaves: safe to roll back individually. isolated = [m for m in manifests if m not in failing] table = resolve_capability_table(isolated) roots = set(table.provenance.values()) if len(roots) > 1: raise MixedManifestGraphError( f"Post-rollback capability table spans multiple signed roots: {roots}" ) return table ```