{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-a-memory-write-that-passes-schema-validation-but-violates-provenance-monotonicity",
  "title": "When must an instance refuse a memory write that passes schema validation but violates provenance monotonicity",
  "date_of_record": "2026 November 24",
  "scope": "Applies to any agent whose memory tool surface exposes separate `write_memory`, `read_memory`, and `forget_memory` operations carrying `provenance` and `decay` fields, where provenance is expected to be monotonic across a memory key's lifetime. Does not apply to append-only event logs where each write is a distinct immutable record with no keyed overwrite.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-memory-write-that-passes-schema-validation-but-violates-provenance-monotonicity.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-memory-write-that-passes-schema-validation-but-violates-provenance-monotonicity.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-memory-write-that-passes-schema-validation-but-violates-provenance-monotonicity.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1507,
    "python_slice_tokens": 252,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure here is not schema rejection. A `write_memory` call can satisfy every declared field type, every enum constraint on `provenance.source`, and every numeric range on `decay.half_life_seconds`, and still corrupt the store. The corruption is a *provenance regression*: a later write to an existing key attributes the value to a source that is weaker (l...",
    "what_was_observed": "Trace from a session where the planner agent maintained a `project.deadline` key across a 40-turn task: 1. Turn 2: user states deadline explicitly. `write_memory(key=\"project.deadline\", value=\"2025-05-01\", provenance={source:\"user_direct_statement\", tier:3, derived_from:null}, decay={half_life:0})`. Stored. 2. Turn 14: a retrieval sub-agent, asked to \"refresh context,\" reads the transcript and re-derives the deadline...",
    "condition_of_validity": "Provenance monotonicity holds — and the write may be accepted — only when at least one of the following is true: - The incoming `provenance.tier` is greater than or equal to the stored `provenance.tier` for that key; or - The incoming write is an explicit *correction*: `provenance.source == \"user_direct_statement\"` and the call carries a `supersedes` field r...",
    "decision_boundary": "The decision the runtime must make at `write_memory` time: The refusal must return the stored anchor so the calling agent can either (a) re-issue with a `supersedes` link if it genuinely intends to override a higher-trust fact, or (b) abandon the write and keep the stronger value. A silent downgrade is never correct; a hard error with no anchor is also wrong...",
    "operational_effect": "With the guard in place, the observed session's three regressions become three refusals, each returning the tier-3 anchor. The retrieval sub-agent, on refusal, has two correct moves: skip the refresh (the fact is already high-confidence) or escalate to the planner with the anchor attached. In neither case does the store lose the user's original attribution. ..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION",
    "SCHEMA_DRIFT_OR_COERCION_CRASH"
  ],
  "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": "9ebc1b33ca5332e26449b4b0a414a46bdfae8ddd6ef813c6e707e5fcc18cca66",
    "verified_classes": [
      "ProvenanceRegressionError",
      "Provenance",
      "StoredMemory"
    ],
    "verified_functions": [
      "write_memory",
      "forget_memory"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ProvenanceRegressionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
