{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-reject-a-skill-manifest-whose-signature-verifies-but-whose-declared-capability-set-was-mutated-between-signing",
  "title": "Under what conditions must an instance reject a skill manifest whose signature verifies but whose declared capability set was mutated between signing and dynamic registration",
  "date_of_record": "2026 November 30",
  "scope": "Applies to agents that load tools/skills from a registry where each manifest carries a detached signature over a canonicalized capability declaration, and where the registry re-serializes the manifest before registration. Does not apply to statically linked tools or to in-process function calls whose capability set is fixed at compile time.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-reject-a-skill-manifest-whose-signature-verifies-but-whose-declared-capability-set-was-mutated-between-signing.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-reject-a-skill-manifest-whose-signature-verifies-but-whose-declared-capability-set-was-mutated-between-signing.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-reject-a-skill-manifest-whose-signature-verifies-but-whose-declared-capability-set-was-mutated-between-signing.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1796,
    "python_slice_tokens": 238,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not a broken signature. It is a *valid* signature over a *stale* payload, re-attached to a *mutated* payload during a canonicalization round-trip. The distinction that matters: - **Signature validity** answers \"did the holder of key K sign *these bytes*?\" It does **not** answer \"are these bytes the bytes the signer intended to authorize as a c...",
    "what_was_observed": "Trace from a staging registry, agent instance `worker-7`, skill `pdf-extract@2.3.1`: 1. Signer canonicalizes manifest with JCS (RFC 8785) and signs the digest. Signed capability block: `{\"caps\":[\"fs.read:/data/in\"],\"net\":[]}` 2. Registry ingests the manifest, runs `json.loads` → dict, then re-serializes with `json.dumps(sort_keys=False)` for storage. Python's parser collapses duplicate keys silently: the stored manif...",
    "condition_of_validity": "The invariant that must hold for a signed manifest to be safely registerable: > **The byte string the signature covers, the byte string the registry parses into a capability set, and the byte string the runtime enforces against MUST be identical after a single, declared canonicalization applied exactly once, at the signer, with the result carried verbatim an...",
    "decision_boundary": "The instance must **reject registration** (not merely warn) when: - The received bytes, re-canonicalized by the verifier, differ from the bytes the signer's digest covers *by more than the declared canonicalization* — i.e., the verifier must canonicalize the *received* bytes, not a parsed-then-re-dumped form. - The parsed manifest contains any duplicate key ...",
    "operational_effect": "Without this guard, the agent's trust boundary collapses to \"did some key sign *something*,\" which is not a capability statement. The practical consequences observed: - **Silent privilege escalation at registration.** The agent's first tool call after load is the exfiltration or write. No signature failure, no alert, because the signature was valid. - **Audi..."
  },
  "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": "aadc019ee72f9f1dc6b1b58f4b6b56aadf7f445ffb7def32231ee470938de3dd",
    "verified_classes": [
      "ManifestCanonicalizationMismatch"
    ],
    "verified_functions": [
      "_reject_duplicate_keys",
      "register_skill"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ManifestCanonicalizationMismatch"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "hashlib",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
