{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-silent-semantic-drift-from-poisoning-a-persistent-agent-knowledge-store-when-attestation-is-scoped-per-write-rather-than-per",
  "title": "Which invariants prevent silent semantic drift from poisoning a persistent agent knowledge store when attestation is scoped per-write rather than per-consolidation",
  "date_of_record": "2026 November 22",
  "scope": "Applies to agents that persist learned facts into a long-lived vector or hybrid semantic store and rely on per-write integrity attestation (hash, signature, provenance tag) to detect poisoning. Does not cover stateless RAG over immutable corpora, nor stores where every read is re-verified against an external source of truth at query time.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-semantic-drift-from-poisoning-a-persistent-agent-knowledge-store-when-attestation-is-scoped-per-write-rather-than-per.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-semantic-drift-from-poisoning-a-persistent-agent-knowledge-store-when-attestation-is-scoped-per-write-rather-than-per.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-semantic-drift-from-poisoning-a-persistent-agent-knowledge-store-when-attestation-is-scoped-per-write-rather-than-per.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1669,
    "python_slice_tokens": 359,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Per-write attestation answers the question *“was this record the one that was originally written, and by whom?”* It does **not** answer *“is the record still semantically equivalent to what the system committed to?”* The gap between these two questions is where silent semantic drift lives. A poisoned record does not need to be modified after write. The attac...",
    "what_was_observed": "A support-triage agent distilled episodic logs into semantic facts nightly. Each fact carried `{content_hash, writer_id, source_episode_ids, signature}`. On write, `content_hash = sha256(content)` and the signature covered the hash plus provenance. Any tamper of stored content was caught immediately—this part worked. The failure surfaced on a routine contradiction-resolution pass. Two facts existed: - `F1`: “Customer...",
    "condition_of_validity": "Per-write attestation is a *sufficient* poisoning defense only under the conjunction: 1. The store is append-only with no post-write transformation of content or embedding. 2. No consolidation, dedup, merge, or contradiction-resolution step rewrites or replaces records. 3. No re-embedding occurs (model version pinned for the store's lifetime). 4. Every read ...",
    "decision_boundary": "The boundary is whether the store treats a record as an **opaque attested blob** or as a **claim with a scoped semantic contract**. Concretely: - **Below the boundary (per-write only):** the system may trust a record's *provenance* but must re-verify its *semantic content* against source at every read that drives an action. This is expensive and rarely done,...",
    "operational_effect": "Without per-consolidation attestation, the store's poisoning surface grows monotonically with consolidation count while the attestation failure rate stays at zero—the worst possible signal, because dashboards show “100% integrity” as semantics rot. The blast radius is bounded only by how many downstream actions consume the drifted fact before a human notices..."
  },
  "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": "7daeb5873babb6d9f620b13cd29349bec90919c4d0d8b4d500914081e23b0f81",
    "verified_classes": [
      "SemanticDriftError",
      "Fact"
    ],
    "verified_functions": [
      "verify_bytes",
      "consolidate",
      "read",
      "__post_init__"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "SemanticDriftError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
