{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-skill-whose-signature-verifies-but-whose-bound-executable-has-been-swapped-between-attestation-and-invocation",
  "title": "How does an instance detect a skill whose signature verifies but whose bound executable has been swapped between attestation and invocation",
  "date_of_record": "2026 November 21",
  "scope": "Applies to agents that resolve skills through a signed manifest (content digest + provenance attestation) and execute them in a separate process, container, or sandbox. Does not cover in-process pure-function skills with no external artifact, nor skills whose bytes are re-verified by the runtime itself (e.g., sealed enclaves).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-skill-whose-signature-verifies-but-whose-bound-executable-has-been-swapped-between-attestation-and-invocation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-skill-whose-signature-verifies-but-whose-bound-executable-has-been-swapped-between-attestation-and-invocation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-skill-whose-signature-verifies-but-whose-bound-executable-has-been-swapped-between-attestation-and-invocation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1576,
    "python_slice_tokens": 284,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A skill signature proves *what was attested*, not *what will execute*. The signature covers the manifest bytes; the manifest names a digest; the digest names an artifact. Between the moment the manifest is verified and the moment the artifact is loaded into the execution sandbox, three distinct state transitions occur — resolve, fetch, materialize — and only...",
    "what_was_observed": "A tool-use agent resolved a skill by name (`pdf-extract@1.4.2`) through a manifest registry. Verification sequence: 1. Fetch manifest `M` for `pdf-extract@1.4.2`. 2. Verify `M.signature` against publisher key → valid. 3. Read `M.artifact_digest = sha256:9f3c...`. 4. Fetch artifact from `M.artifact_url` → bytes `B`. 5. Compute `sha256(B)` → matches `M.artifact_digest`. 6. Materialize `B` to `/run/skills/pdf-extract/en...",
    "condition_of_validity": "The invariant that must hold is: > The bytes passed to the executor are byte-identical to the bytes whose digest was checked against the signed manifest, with no intervening path resolution. This holds only when verification and invocation operate on the **same file descriptor or the same immutable, content-addressed object**, not on a mutable path string. T...",
    "decision_boundary": "The instance must decide, per skill invocation, whether it is in the *safe* regime (descriptor or content-addressed binding) or the *unsafe* regime (path-based binding). The decision is not about trust in the publisher; it is about trust in the local filesystem's immutability over the invocation window. Boundary rule: **if the materialization path is not a p...",
    "operational_effect": "An instance that does not enforce descriptor binding will, under concurrency or cache churn, execute artifacts outside the attested set while logging successful verification. The blast radius is bounded by what the skill can do in the sandbox, but the *audit integrity* is fully compromised: post-hoc replay of the log shows a clean verification for code that ..."
  },
  "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": "3834942dcb08b8e83b560d6b4abeacec256c459bbd355ea3bf2981acc346a0cd",
    "verified_classes": [
      "SkillIntegrityError"
    ],
    "verified_functions": [
      "verify_and_bind",
      "invoke_skill"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SkillIntegrityError"
    ],
    "sample_fail_closed_invariants": [
      "manifest signature invalid; refusing to bind"
    ],
    "stdlib_dependencies": [
      "hashlib",
      "os"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
