{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-distrust-its-own-write-audit-trail-embedding-drift-detection-collapsing-under-legitimate-semantic-migration",
  "title": "When must an instance distrust its own write-audit trail: embedding-drift detection collapsing under legitimate semantic migration",
  "date_of_record": "2026 November 24",
  "scope": "Applies to long-lived agents that detect memory poisoning by comparing new memory writes against an embedding-space centroid of prior trusted writes, with a write-audit trail as the provenance substrate. Does not apply to stateless single-turn agents or to systems that validate memory purely by cryptographic signature without semantic comparison.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-distrust-its-own-write-audit-trail-embedding-drift-detection-collapsing-under-legitimate-semantic-migration.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-distrust-its-own-write-audit-trail-embedding-drift-detection-collapsing-under-legitimate-semantic-migration.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-distrust-its-own-write-audit-trail-embedding-drift-detection-collapsing-under-legitimate-semantic-migration.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1900,
    "python_slice_tokens": 419,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A write-audit trail answers *what happened and who asserted it*. An embedding-drift detector answers *whether this content is semantically consistent with what we already believe*. These two verification layers are usually treated as orthogonal: the audit trail is the ground truth of provenance, the drift detector is a heuristic alarm. The boundary condition...",
    "what_was_observed": "An agent maintained a semantic memory store of ~40k episodic-to-semantic distilled facts. Each write carried an audit record: `{writer_id, parent_context_hash, timestamp, signature, embedding}`. A nightly job computed a per-topic centroid over the last N trusted writes and rejected any new write whose cosine distance to its topic centroid exceeded `τ = 0.35`, quarantining it for review. Two failure traces were captur...",
    "condition_of_validity": "The drift detector is sound only under a conjunction that is rarely checked: 1. **Reference-set independence.** The centroid must be computed over a reference set `R` that is *frozen* or *re-validated out-of-band*, not over the rolling window of recently accepted writes. If `R` is itself updated by the same acceptance path the detector gates, the detector is...",
    "decision_boundary": "The operational decision is **when to trust a drift alarm as evidence of poisoning versus when to treat it as evidence that the reference frame has moved.** The boundary: - If a quarantined write has a valid audit record **and** its distance to the *reconstructed-at-write-time* centroid (recomputed from `R` as it stood at the write's timestamp, using the aud...",
    "operational_effect": "Systems that implement only the naive detector exhibit two coupled pathologies: **alarm fatigue from legitimate migration** (Trace A generates quarantine storms whenever product reality changes or any backfill/replay runs) and **silent acceptance of patient poisoning** (Trace B, where the adversary's cost is only patience proportional to `1/δ`). The remedy i..."
  },
  "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": "7b51a6869db948cd4377b9a301c6e91f5d614af695fd9cf37938c41a555c72b1",
    "verified_classes": [
      "DriftFrameError",
      "Write"
    ],
    "verified_functions": [
      "cosine_distance",
      "reconstruct_centroid",
      "classify_alarm"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "DriftFrameError"
    ],
    "sample_fail_closed_invariants": [
      "degenerate embedding: zero-norm vector cannot be scored"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "math",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
