{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-divergent-edit-provenance-ledgers-after-a-self-context-rewrite-that-silently-drops-a-pinned-invariant-clause",
  "title": "How should an instance reconcile divergent edit-provenance ledgers after a self-context rewrite that silently drops a pinned invariant clause",
  "date_of_record": "2026 November 27",
  "scope": "Applies to any agent that rewrites its own working context (summarization, pruning, compaction, or scratchpad editing) while carrying a provenance ledger that maps retained context spans back to the edits that produced them. Does not apply to read-only context assembly, single-turn stateless inference, or external retrieval pipelines that never mutate the in-context state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-divergent-edit-provenance-ledgers-after-a-self-context-rewrite-that-silently-drops-a-pinned-invariant-clause.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-divergent-edit-provenance-ledgers-after-a-self-context-rewrite-that-silently-drops-a-pinned-invariant-clause.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-divergent-edit-provenance-ledgers-after-a-self-context-rewrite-that-silently-drops-a-pinned-invariant-clause.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2176,
    "python_slice_tokens": 472,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters here is between *content fidelity* and *provenance fidelity* during a self-edit. A model-driven context rewrite can preserve every semantically important token while still producing a provenance ledger that no longer describes the context it is attached to. Content fidelity is checked by asking \"does the summary still say the rig...",
    "what_was_observed": "A summarization pass was invoked on a 41,000-token working context to compact it under a 12,000-token budget. The context carried a provenance ledger structured as a set of edit records, each with `edit_id`, `target_span_hash`, `kind` (`pin | merge | prune | rewrite`), and `asserts` (optional invariant text). Three clauses had been pinned earlier in the session by a planning step: a hard budget ceiling, a \"do not cal...",
    "condition_of_validity": "The invariant that must hold for a self-editing context to be safe is: > **For every live `pin` edit record, there exists at least one retained context span whose content satisfies the pinned invariant, and that span's hash resolves to a `rewrite` or `merge` record that transitively cites the original pin.** This is a *provenance-closure* condition: pins mus...",
    "decision_boundary": "The operational decision is: **after a model-driven rewrite, do you trust the retained ledger, re-derive it, or refuse the rewrite?** - **Trust the ledger** only if provenance closure is verified post-rewrite: every live pin resolves to a retained span, and every retained span's hash resolves to a live edit record. This is a linear scan over pins × retained ...",
    "operational_effect": "The practical consequence is that self-editing contexts need a **post-rewrite provenance reconciliation pass** that is separate from the rewrite itself and that fails closed. Concretely: - Pins must carry invariant text, not just span hashes, so they can be re-checked after spans move. - Every rewrite/merge record must declare which pins it claims to preserv..."
  },
  "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": "9cac489a4e9413e274ba677e5c7b33bb40d5be367c8320a5ceaa76b05bbddfa8",
    "verified_classes": [
      "ProvenanceClosureError",
      "EditRecord",
      "ContextState"
    ],
    "verified_functions": [
      "reconcile_provenance",
      "span_hash",
      "live_pins",
      "resolves"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ProvenanceClosureError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
