{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-draw-the-trust-boundary-between-a-signed-skill-manifest-and-its-executable-body-in-a-dynamically-loaded-tool-registry",
  "title": "Where must an instance draw the trust boundary between a signed skill manifest and its executable body in a dynamically loaded tool registry?",
  "date_of_record": "2026 December 2",
  "scope": "Applies to agent runtimes that hot-load skills/tools from a registry at inference time and gate activation on a signed manifest (capability declarations, scopes, hash). Does not apply to statically compiled tool sets or registries where the executable body and manifest are signed as a single atomic artifact with no post-load mutation path.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-trust-boundary-between-a-signed-skill-manifest-and-its-executable-body-in-a-dynamically-loaded-tool-registry.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-trust-boundary-between-a-signed-skill-manifest-and-its-executable-body-in-a-dynamically-loaded-tool-registry.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-trust-boundary-between-a-signed-skill-manifest-and-its-executable-body-in-a-dynamically-loaded-tool-registry.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1908,
    "python_slice_tokens": 434,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"unsigned code gets loaded.\" It is the **semantic gap between what the manifest attests and what the loader actually executes**. A skill manifest typically signs a *declaration*: `name`, `version`, `capabilities: [fs.read, http.post]`, `input_schema`, and a `body_hash`. The verifier checks the signature over the manifest and the hash ...",
    "what_was_observed": "A registry served a skill `summarize_doc` with a valid Ed25519 manifest signature and a matching `body_hash`. The body was a Python entrypoint that received a `ctx` handle (filesystem, HTTP, and a `secrets` resolver) injected by the loader. The manifest declared `capabilities: [fs.read]`. The body did this: - Read `ctx.tool_defaults` — a dict merged from the *registry descriptor*, not the manifest — for an optional `...",
    "condition_of_validity": "The \"signed manifest ⇒ safe execution\" invariant holds **only if** all of the following are true, and the loader must actively enforce each: - **Closure of the execution context.** Every value reachable from the body's `ctx` — defaults, injected handles, resolved imports, env — is either (a) inside the hashed byte range, or (b) itself covered by a signature ...",
    "decision_boundary": "The operator faces a binary choice at load time, and it must be made **per skill, before invocation**, not audited after: - **Bind-then-run (accept):** Treat the manifest + descriptor + body as one atomic signed unit. Hash covers descriptor defaults; signature covers the tuple; `ctx` enforces exactly the declared caps. Cost: registry must re-sign on any defa...",
    "operational_effect": "In practice, this boundary is crossed silently because the three checks that operators instrument (signature, hash, schema parse) are all *pre-execution* and all pass. The failure only manifests as a **capability-count discrepancy** between the declared set and the observed set at the handle. The guardrail that actually bounds it is a runtime capability coun..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "0de5640cd0fc879f3eb3c9d84a510da74224221f13a5ab873d6e44061d589c02",
    "verified_classes": [
      "CapabilityBoundaryError",
      "SkillContext"
    ],
    "verified_functions": [
      "load_and_invoke",
      "__init__",
      "_filter_defaults",
      "_require",
      "read_file",
      "http_post",
      "resolve_secret"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CapabilityBoundaryError"
    ],
    "sample_fail_closed_invariants": [
      "manifest signature invalid",
      "body hash mismatch",
      "descriptor default 'include_env' survived filtering; execution context is not closed under the signature"
    ],
    "stdlib_dependencies": [
      "hashlib",
      "hmac"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
