{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-speculative-branch-pruning-from-resurrecting-a-poisoned-litmus-confidence-score-across-agent-re-entry",
  "title": "Which invariants prevent speculative branch pruning from resurrecting a poisoned LITMUS confidence score across agent re-entry",
  "date_of_record": "2026 November 23",
  "scope": "Applies to agents that fork speculative execution branches, score each branch with a LITMUS-derived safety confidence signal, and prune low-confidence branches before committing a tool call. Does not apply to single-path agents with no branch fan-out, nor to pruning driven purely by deterministic type/contract checks.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-branch-pruning-from-resurrecting-a-poisoned-litmus-confidence-score-across-agent-re-entry.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-branch-pruning-from-resurrecting-a-poisoned-litmus-confidence-score-across-agent-re-entry.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-branch-pruning-from-resurrecting-a-poisoned-litmus-confidence-score-across-agent-re-entry.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1898,
    "python_slice_tokens": 465,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two things a LITMUS-derived confidence score can mean, and conflating them is the root of the failure. A **point score** is the scalar `c ∈ [0,1]` emitted by the safety classifier for the *current* branch state. A **witnessed score** is the triple `(c, branch_digest, witness_nonce)` where `branch_digest` is a hash over the exact context window and ...",
    "what_was_observed": "A planner agent forked 6 speculative branches to resolve a dependency-graph question. Branch B4 proposed reading a config file, and the LITMUS scorer returned `c = 0.31` (below the 0.5 prune threshold) because the branch's proposed tool arguments contained a path that the safety classifier flagged as traversing outside the sandbox root. B4 was pruned. The planner continued on B2. B2's tool call returned content that ...",
    "condition_of_validity": "The witnessed-score pruning invariant holds iff all three of the following are enforced: - **Digest closure:** `branch_digest` must be computed over the *complete* set of inputs that the LITMUS scorer consumed, including scratchpad state, tool-result cache, and any resolver hints. If the scorer reads state the digest does not cover, the digest is not a witne...",
    "decision_boundary": "The boundary is not \"is the new score above threshold.\" It is: **does the new score's witness cover the state delta that justified the original prune?** Concretely, on re-entry: - If `d' == d`: the score must be identical (deterministic scorer) or within a declared tolerance (stochastic scorer). Any divergence indicates non-determinism in the scorer that inv...",
    "operational_effect": "Without the invariant, prune decisions are not durable — they are advisory hints that any sibling branch's side effect can silently revoke. The practical consequences: - **Audit non-reproducibility:** replaying the trace yields a different commit set because scratchpad mutation order is non-deterministic across tool latencies. - **Threshold gaming by side ef..."
  },
  "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": "7ef5b355fdc10d165a9bd85adc13298cfdb987eb0bb6e8b12cd424192fa27d13",
    "verified_classes": [
      "PruneLineageViolation",
      "Witness",
      "PruneLedger"
    ],
    "verified_functions": [
      "plan_with_pruning",
      "_next_nonce",
      "digest",
      "record_prune",
      "admit_reentry"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "PruneLineageViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
