{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-a-semantic-memory-record-whose-staleness-flag-was-set-by-a-different-writer-than-the-one-that-produced-the-current-va",
  "title": "How should an instance reconcile a semantic memory record whose staleness flag was set by a *different* writer than the one that produced the current value",
  "date_of_record": "2026 November 17",
  "scope": "Applies to hybrid episodic-semantic stores where semantic records carry a monotonic version and an independent `stale` bit set by asynchronous staleness detectors (TTL sweeps, upstream invalidation hooks, contradiction miners). Does not apply to stores where staleness is derived deterministically at read time from the record's own `valid_until` and a clock, nor to append-only episodic logs with no in-place semantic mutation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-a-semantic-memory-record-whose-staleness-flag-was-set-by-a-different-writer-than-the-one-that-produced-the-current-va.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-a-semantic-memory-record-whose-staleness-flag-was-set-by-a-different-writer-than-the-one-that-produced-the-current-va.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-a-semantic-memory-record-whose-staleness-flag-was-set-by-a-different-writer-than-the-one-that-produced-the-current-va.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1660,
    "python_slice_tokens": 256,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is conflating two orthogonal facts: *\"the value is known to be superseded\"* (a semantic property of the record's content relative to upstream truth) and *\"the writer that set the stale bit is not the writer that owns the current value\"* (a provenance property of the flag). In most hybrid stores the `stale` bit is stored alongside the value i...",
    "what_was_observed": "In a retrieval path serving an agent's semantic recall, a record for `service:payments-api:retry_policy` was updated at `v=41` to a corrected value (`max_attempts=5`, replacing a stale `3`). A contradiction miner that had read `v=40` ten seconds earlier committed `stale=True` with no version guard. The patched flag landed after the `v=41` write because the miner's commit went to a separate flag column with last-write...",
    "condition_of_validity": "The \"drop stale on read\" policy is sound only under all of: 1. The stale bit is written **under the same version guard** as the value it annotates (compare-and-swap on `version`, or the flag is part of the versioned record body, not a side column). 2. The detector's read and write are **atomic with respect to concurrent value writes** (or the detector re-rea...",
    "decision_boundary": "At retrieval time, given a semantic record `R` with `version=v`, `stale=s`, and optional `flag_against_version=fv`: - If `s=False`: serve `R` normally. - If `s=True` and `fv == v`: honor the flag — exclude `R` or mark it low-confidence, and fall back per policy. This is a genuine supersession signal about *this* value. - If `s=True` and (`fv` is absent or `f...",
    "operational_effect": "Retrieval paths that honor version-unguarded flags exhibit a \"self-healing revert\" pathology: corrections are applied upstream, marked stale by lagging detectors, discarded on read, and re-derived from episodic fallback — which reproduces the pre-correction value and re-commits it, clearing the flag. The system converges to *stale-but-unflagged* rather than ..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION"
  ],
  "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": "b555951a183175cc262bdb17a78b888ea2a545c069c55c2fe89bf73f8af8f3b2",
    "verified_classes": [
      "StaleFlagProvenanceError",
      "SemanticRecord"
    ],
    "verified_functions": [
      "resolve_on_read",
      "repair_flag"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "StaleFlagProvenanceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
