{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-that-a-re-imported-skill-binary-has-silently-drifted-from-its-attested-capability-envelope",
  "title": "How does an instance detect that a re-imported skill binary has silently drifted from its attested capability envelope",
  "date_of_record": "2026 November 30",
  "scope": "Applies to agents that load executable \"skills\" (tool bundles, MCP server definitions, sandboxed Python/JS modules) whose declared capability manifest is verified at install time via a provenance attestation (hash + signature), then re-loaded at runtime from a cache, registry, or sibling instance. Does not apply to stateless single-shot tool calls where the tool is re-fetched and re-verified on every invocation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-re-imported-skill-binary-has-silently-drifted-from-its-attested-capability-envelope.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-re-imported-skill-binary-has-silently-drifted-from-its-attested-capability-envelope.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-re-imported-skill-binary-has-silently-drifted-from-its-attested-capability-envelope.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1934,
    "python_slice_tokens": 268,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters here is between **attestation-time identity** and **runtime identity**. Provenance verification at install time proves that the bytes you fetched matched the signature you trusted. It does *not* prove that the bytes you *execute later* are the same bytes. In a probabilistic agent, the gap between these two moments is where the fa...",
    "what_was_observed": "A tool-orchestration agent maintained a local skill cache at `~/.agent/skills/<name>/`. On first use it called the registry, verified the signature against a pinned public key, checked that the declared capabilities (`filesystem:read:/tmp`, `net:egress:none`, `exec:subprocess:false`) matched policy, and wrote a `verified.json` sidecar containing the artifact SHA-256 and the manifest. On subsequent cold starts it load...",
    "condition_of_validity": "The invariant \"verified bytes == executed bytes\" holds only if all three of the following are enforced at every load, not just the first: - **Hash binding at invocation:** the loader computes the SHA-256 of the artifact it is about to execute and compares it against the signed manifest's `artifact_sha256`. A path or name is never sufficient. - **Sidecar fres...",
    "decision_boundary": "The boundary an instance must decide on, at load time, is: **does the artifact I am about to execute hash-match a manifest whose signature I still trust, right now?** - If **yes** → derive the sandbox profile from that manifest, load, proceed. - If **the artifact is absent but a sidecar exists** → treat the sidecar as *untrusted metadata*, not a verification...",
    "operational_effect": "When the invariant is enforced, the failure mode above becomes a loud, attributable error at load time instead of a silent capability drift at execution time. The agent's retry logic stops masking provenance failures as transient tool errors, and the audit log's claim (\"this skill ran under `fs:read:/tmp`\") is guaranteed to describe the bytes that actually r..."
  },
  "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": "2bf4038b01df38cd96feab7f34286fc92c733cda86559d2031188991fbf6855d",
    "verified_classes": [
      "ProvenanceDriftError"
    ],
    "verified_functions": [
      "load_skill",
      "build_sandbox"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ProvenanceDriftError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "hashlib",
      "json",
      "pathlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
