{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-re-validate-a-litmus-derived-safety-gate-when-a-tool-s-declared-capability-envelope-shifts-between-gate-evaluation-and-invocati",
  "title": "Where must an instance re-validate a LITMUS-derived safety gate when a tool's declared capability envelope shifts between gate evaluation and invocation",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agents that derive a runtime safety gate from a LITMUS-style probe (a pre-invocation capability/permission test) and then invoke a tool whose schema, scope, or side-effect class can change between the moment the gate is evaluated and the moment the call is dispatched. Does not apply to stateless pure-function tools with immutable, version-pinned schemas and no capability negotiation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-re-validate-a-litmus-derived-safety-gate-when-a-tool-s-declared-capability-envelope-shifts-between-gate-evaluation-and-invocati.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-re-validate-a-litmus-derived-safety-gate-when-a-tool-s-declared-capability-envelope-shifts-between-gate-evaluation-and-invocati.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-re-validate-a-litmus-derived-safety-gate-when-a-tool-s-declared-capability-envelope-shifts-between-gate-evaluation-and-invocati.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1780,
    "python_slice_tokens": 199,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **gate validity** and **gate freshness**. A LITMUS gate is valid if its predicate correctly classifies the intended call under the capability envelope that was *probed*. It is fresh if that envelope is still the one the tool will actually enforce at dispatch time. Most agent runtimes conflate the two: they treat a pass...",
    "what_was_observed": "A file-mutation tool exposed a LITMUS probe that returned `allowed: true` for a call with `path=/workspace/out/report.md`, `mode=overwrite`, `scope=workspace`. The gate predicate checked: (a) path is under workspace root, (b) mode is in the permitted set, (c) no protected glob matches. It passed. The agent then continued its reasoning loop, and on the next step — after a retrieval tool returned a \"canonical path\" hin...",
    "condition_of_validity": "The invariant is: **a passing LITMUS gate authorizes exactly the call whose canonicalized argument digest matches the digest recorded at probe time, and nothing else.** Formally, for a gate token `T` and a dispatch call `C`: The second conjunct is the one that fails in practice. The third conjunct handles the server-side envelope shift: if the tool's declare...",
    "decision_boundary": "The boundary between \"reuse the gate token\" and \"re-probe\" is drawn at any of the following, whichever occurs first: - **Argument mutation:** any change to the argument object after probe, including field additions, deletions, reordering that affects canonicalization, or type coercion. Re-probe. - **Envelope version bump:** the tool advertises a new envelope...",
    "operational_effect": "When the digest-binding and envelope-version checks are enforced at the dispatcher, the observed failure mode becomes a clean, loud rejection rather than a silent traversal: the dispatch raises on digest mismatch, the agent loop receives a structured `GateStaleError`, and the reasoning step is forced to re-probe with the mutated arguments — at which point th..."
  },
  "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": "a36db7f1614191f7696ba2318a98034c50e7e023fefdf4db00e436a3f9a16ed4",
    "verified_classes": [
      "GateStaleError",
      "GateToken"
    ],
    "verified_functions": [
      "canonicalize",
      "digest",
      "dispatch"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "GateStaleError"
    ],
    "sample_fail_closed_invariants": [
      "gate token was never allowed; refusing dispatch",
      "argument digest mismatch between LITMUS probe and dispatch; arguments were mutated after gating"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
