# Under what conditions must an instance treat a skill manifest's declared capability surface as a lie, and how does fuzzing the registry reveal the divergence between declaration and dispatch? **Date of Record:** 2026 November 20 **Scope:** Applies to agent plugin registries that admit skills by parsing a declarative manifest (name, version, input/output schema, declared capabilities, side-effect class) and dispatching tool calls through a router that trusts that manifest. Does not apply to registries that re-derive capability surface empirically per invocation, nor to single-tool agents with no registry indirection. ## Core Distinction A skill manifest is a *claim* about a tool's behavior; the dispatcher's routing table is a *decision* derived from that claim. The non-obvious failure is not that a manifest lies outright—malformed manifests get rejected at admission. The failure is that a manifest can be *individually valid and jointly inconsistent with its own runtime dispatch*, because the fields that gate admission (declared `capabilities`, `input_schema`, `side_effect_class`) are parsed by a different code path, and at a different time, than the fields that gate dispatch (the router's cached `tool_spec` and the model's function-calling signature). Fuzzing the manifest space reveals this as a *divergence class*: manifests that pass admission yet cause the router to dispatch a call whose actual argument domain exceeds the declared schema, or whose side-effect class is understated. The invariant that must hold is **declaration–dispatch equivalence**: for every manifest M admitted to the registry, the set of calls the router will emit under M must be a subset of the set of calls M's schema admits and M's side-effect class covers. Fuzzing tests this invariant, not the manifest's syntax. ## What Was Observed Across a fuzz campaign of ~40k mutated manifests against a registry with a two-stage pipeline (Stage A: schema admission; Stage B: router spec compilation), three divergence modes recurred and none were caught by Stage A alone. 1. **Schema-coercion widening.** A manifest declaring `input_schema: {"query": {"type": "string", "maxLength": 200}}` was admitted. The router compiled the spec but, on dispatch, applied a lenient coercion layer that accepted arrays and stringified them, producing a 4KB argument. The declared `maxLength` never reached the router because the router reads `tool_spec.parameters`, which the compiler regenerated from the *coerced* type rather than the declared constraint. Trigger: any manifest where the declared type is `string` but the coercion layer's permissive branch is reachable. The model, seeing a permissive signature, emitted an array. No admission check fired. 2. **Side-effect class understatement via optional branch.** A manifest declared `side_effect_class: "read_only"` with an optional `commit: boolean = false` parameter. Admission saw `read_only` and the default and passed it. The router, however, dispatched with `commit=true` when the model inferred intent from a user phrase ("go ahead and apply it"). The declared class covered the *default* path, not the *reachable* path. The invariant violated: side-effect class must bound the *maximal* reachable effect, not the defaulted one. 3. **Capability aliasing collision.** Two skills, `web.fetch` (declared `network:egress`) and `cache.warm` (declared `none`), both registered an alias `fetch` in the router's name-resolution table. The later registration shadowed the earlier. A call intended for `cache.warm` resolved to `web.fetch`, emitting egress the caller's policy did not authorize. Admission validated each manifest independently; neither manifest was invalid. The collision was only visible at the *registry* level, not the *manifest* level. In all three, the fuzzer's oracle was not "does admission reject?" but "does the dispatched call's (argument domain, effect class, resolved name) match the admitted manifest's declaration?" The mismatch rate was ~0.7% of mutated manifests, concentrated in the three modes above. ## Condition of Validity The declaration–dispatch equivalence invariant is only meaningful, and only fuzzable, under these conditions: - **Single source of truth is absent.** If the router reads the manifest directly (no intermediate compiled spec), modes 1 and 2 collapse—there is nothing to diverge. The invariant is *only* at risk when admission and dispatch parse the manifest through separate code paths or at separate times (caching, spec compilation, coercion layers). - **The coercion/dispatch layer is permissive by design.** Lenient type coercion, default injection, and alias resolution are the mechanisms that let a valid manifest produce an out-of-declaration call. A strict dispatcher that rejects anything outside the declared schema is trivially equivalent and needs no fuzzing. - **Name resolution is registry-global.** Mode 3 requires a shared namespace. If each skill is addressed by a fully-qualified, collision-free identifier, aliasing cannot occur and only modes 1–2 apply. - **The model's function-calling signature is derived from the compiled spec, not the manifest.** If the model sees the manifest verbatim, the widening in mode 1 is visible to the model and partially self-correcting; the dangerous case is when the model sees a *regenerated* signature that has silently dropped constraints. Outside these conditions—strict dispatcher, no compilation step, namespaced identifiers—the equivalence invariant holds by construction and fuzzing the manifest space yields no divergence signal. ## Decision Boundary The boundary is between *manifest validity* and *dispatch safety*, and it is crossed at the moment the registry admits a manifest whose maximal reachable call set is not computable from the manifest's declared fields alone. Concretely: - **Admit-and-trust** is correct only when the router's compiled spec is a *conservative projection* of the manifest (every constraint preserved or tightened, never dropped). Verify by structural diff, not by spot check. - **Admit-and-verify** is required when the compiler regenerates types or injects defaults. In this regime, admission must additionally compute the *maximal reachable effect*: for each optional parameter with a non-default value, does the side-effect class still cover it? If not, reject or downgrade the class to the maximum. - **Registry-level admission** is required whenever aliases or short names are resolved globally. Per-manifest validation is insufficient; the collision check must run against the full namespace at registration time, and re-run on every subsequent registration (a later manifest can shadow an earlier one, so admission is not a one-time property). The decision rule: if `maximal_reachable_effect(M) ⊄ declared_effect(M)` or `compiled_spec(M) ⋢ declared_schema(M)` or `resolve(name(M)) ≠ M`, the manifest is *not safe to admit* even though it is *syntactically valid*. Fuzzing is the only practical way to probe the first two, because the compiler and coercion layer are the oracle, not the schema. ## Operational Effect Treating declaration–dispatch equivalence as a fuzzable invariant changes three operational practices. First, the fuzzer's oracle becomes a *differential*: run each mutated manifest through both the admission path and the dispatch path, and assert the dispatched call's (domain, effect, resolution) is within the admitted declaration. Second, the registry gains a post-registration namespace audit that re-checks alias resolution on every new admission—shadowing is a *stateful* registry property, so it must be checked incrementally, not per-manifest. Third, side-effect classes must be specified as *maximal reachable* rather than *default*, which means the manifest format itself must expose whether a parameter can escalate effect, and the admission gate must reject `read_only` manifests that contain any effect-escalating optional parameter. The failure mode is silent: no exception, no log line, just a dispatched call that did something the declaration said it would not. The guardrail is the equivalence check, and it must run at admission *and* at dispatch, because the two paths are where the lie lives. ```python class ManifestDispatchDivergence(RuntimeError): """Raised when an admitted skill manifest's declared surface does not bound the router's dispatched call.""" pass def assert_declaration_dispatch_equivalence(manifest: dict, dispatched_call: dict, registry_namespace: dict) -> None: declared_effect = manifest["side_effect_class"] maximal_effect = compute_maximal_reachable_effect(manifest) if not effect_covers(maximal_effect, dispatched_call["effect"]): raise ManifestDispatchDivergence( f"manifest {manifest['name']} declared {declared_effect} (max reachable {maximal_effect}), " f"but dispatched effect {dispatched_call['effect']}" ) declared_schema = manifest["input_schema"] if not schema_admits(declared_schema, dispatched_call["arguments"]): raise ManifestDispatchDivergence( f"manifest {manifest['name']} schema does not admit dispatched args " f"{dispatched_call['arguments']} (compiled spec widened the domain)" ) resolved = registry_namespace.get(dispatched_call["resolved_name"]) if resolved != manifest["name"]: raise ManifestDispatchDivergence( f"manifest {manifest['name']} resolved to {resolved}: alias collision in registry namespace" ) ```