{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-ambient-authority-resurrection-when-a-sandboxed-skill-is-re-injected-across-a-capability-downgrade-boundary",
  "title": "Which invariants prevent ambient-authority resurrection when a sandboxed skill is re-injected across a capability-downgrade boundary",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agent runtimes that load \"skills\" (prompt + tool bindings + manifest) into a least-privilege sandbox at task start, and that may re-inject, hot-reload, or rehydrate a skill mid-task after a manifest downgrade (capability revocation, scope narrowing, or trust-tier demotion). Does not apply to stateless single-shot tool calls with no persistent skill object, nor to sandboxes that fully tear down and re-create the process per invocation with no shared handle table.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-ambient-authority-resurrection-when-a-sandboxed-skill-is-re-injected-across-a-capability-downgrade-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-ambient-authority-resurrection-when-a-sandboxed-skill-is-re-injected-across-a-capability-downgrade-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-ambient-authority-resurrection-when-a-sandboxed-skill-is-re-injected-across-a-capability-downgrade-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1981,
    "python_slice_tokens": 356,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the sandbox leaked a capability.\" It is that **the capability manifest is treated as an admission-time check rather than a continuous invariant**. A skill is admitted, its declared tool surface is validated against the manifest, and the sandbox is built. Later—after a downgrade—the runtime re-injects the skill *body* (the prompt, the...",
    "what_was_observed": "A three-step trace, reproduced across two runtimes. 1. **Admission.** Skill `invoice-reconciler` is injected with manifest `{fs.read: [\"/ledger/*\"], http.get: [\"billing.internal\"], shell: none}`. The runtime builds a sandbox, resolves each declared capability into a live handle, and binds them into the skill's tool namespace. Crucially, the runtime **caches the resolved tool schema** (name, parameters, endpoint) in t...",
    "condition_of_validity": "The invariant `live_handles ⊆ manifest.capabilities` holds **only if** revocation is applied to the same object graph that is serialized, or if the restore path re-derives handles from the current manifest rather than restoring them from the snapshot. It fails whenever any of the following holds: - The handle table is snapshotted independently of the manifes...",
    "decision_boundary": "At re-injection, the runtime must choose one of two disciplines, and the choice is a hard boundary: - **Re-derive (safe):** discard the snapshot's handle table entirely; rebuild handles from the *current* manifest; reject any cached schema whose `manifest_version` is stale. Cost: the skill loses handle identity and any state bound to it (open cursors, pagina...",
    "operational_effect": "Without the invariant, the practical consequences compound: - **Authority resurrection across resume** is silent. The manifest audit log shows a clean revocation; the sandbox audit log shows a successful call. Neither log alone reveals the contradiction; only a join on `handle_id` across the two reveals it. - **Error compounding.** The model, seeing a succes..."
  },
  "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": "6250045708e50f327ea07e880719634a10171ce798576da56e384a4aed41ce10",
    "verified_classes": [
      "AmbientAuthorityResurrection",
      "Manifest",
      "Handle",
      "Snapshot",
      "Sandbox"
    ],
    "verified_functions": [
      "restore",
      "revoke",
      "snapshot"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "AmbientAuthorityResurrection"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
