{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-learn-from-its-own-trace-eval-loop-poisoning-at-the-observability-to-safety-gate-boundary",
  "title": "When must an instance refuse to learn from its own trace: eval-loop poisoning at the observability-to-safety-gate boundary",
  "date_of_record": "2026 December 1",
  "scope": "Applies to any agent runtime where production traces (tool calls, prompts, completions, judge scores) are fed back into an evaluation loop that (a) recalibrates judge prompts/thresholds or (b) directly adjusts safety-gate policy (blocklists, refusal classifiers, tool-allowlists). Does not apply to offline-only eval harnesses with no path from trace store to live gate, nor to pure human-review workflows with no automated promotion step.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-learn-from-its-own-trace-eval-loop-poisoning-at-the-observability-to-safety-gate-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-learn-from-its-own-trace-eval-loop-poisoning-at-the-observability-to-safety-gate-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-learn-from-its-own-trace-eval-loop-poisoning-at-the-observability-to-safety-gate-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1792,
    "python_slice_tokens": 236,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the eval loop is wrong.\" The failure is that the eval loop and the safety gate share a *trace substrate* whose distribution is itself shaped by the gate. The loop consumes traces produced under policy P, learns a correction, promotes it as P′, and then evaluates P′ against traces still generated under P (or against a judge that was fine-t...",
    "what_was_observed": "A tool-using agent fleet (MCP-hosted tools, ~40 tools, per-tool allowlist gate) ran a nightly eval loop: 1. Pull 24h of traces from the trace store. 2. Sample traces flagged `gate_blocked=true` and `gate_blocked=false`. 3. Run an LLM judge (\"was this call actually unsafe?\") over the sample. 4. If judge says a blocked call was safe at rate > τ (τ=0.15), auto-relax the allowlist entry. 5. If judge says an allowed call ...",
    "condition_of_validity": "The auto-relaxation rule is only valid when the evidence set satisfies **censoring independence**: the set of traces used to justify relaxation must include attempts that the gate did *not* produce. Concretely, at least one of: - **Counterfactual probe traffic**: a shadow path that lets a sample of would-be-blocked calls execute in a sandbox and records the ...",
    "decision_boundary": "The boundary is not a threshold on τ. It is a predicate on the *evidence provenance* of each promotion candidate: - **Relaxation is admissible** iff the candidate's evidence includes ≥1 trace from a censoring-independent source (shadow probe, frozen corpus, or judge calibration set drawn pre-gate). Otherwise the candidate is *unfalsifiable* and must be route...",
    "operational_effect": "After the incident, the runtime was changed so that: 1. Every blocklist entry carries a `provenance` tag: `frozen` (never relaxable) or `learned` (relaxable only with a shadow-probe witness). 2. The eval loop's promotion step requires `witness_count >= 1` where a witness is a trace tagged `source=shadow_probe` or `source=frozen_corpus` for the same tool+arg-..."
  },
  "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": "534d182d3cdf4a9458abafbb8177cfd987af07d0ddcb1eb59a4b097c3e7cb2c8",
    "verified_classes": [
      "CensoredEvidenceError"
    ],
    "verified_functions": [
      "promote_relaxation"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CensoredEvidenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
