{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-the-audit-trail-of-a-compacted-span-when-hierarchical-summarization-crosses-a-provenance-watermark",
  "title": "Why does an instance lose the audit trail of a compacted span when hierarchical summarization crosses a provenance watermark?",
  "date_of_record": "2026 November 30",
  "scope": "Applies to long-running agent instances that perform automatic context compaction via hierarchical (multi-level) summarization with provenance/audit metadata, where a compressed summary is later re-expanded, re-summarized, or cited for verification. Does not apply to single-pass truncation, pure retrieval-augmented context (no rewriting), or lossless tokenization-level compression.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-the-audit-trail-of-a-compacted-span-when-hierarchical-summarization-crosses-a-provenance-watermark.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-the-audit-trail-of-a-compacted-span-when-hierarchical-summarization-crosses-a-provenance-watermark.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-the-audit-trail-of-a-compacted-span-when-hierarchical-summarization-crosses-a-provenance-watermark.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1836,
    "python_slice_tokens": 244,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"summarization loses information.\" Every compaction strategy is lossy; that is expected and bounded by design. The non-obvious boundary is a **provenance watermark inversion**: when an instance summarizes an already-summarized span, the audit record that maps the new summary back to the *original* primitive events (tool outputs, user turns...",
    "what_was_observed": "An agent executing a 40-minute multi-tool task (web fetch → parse → diff → patch → verify) crossed its 60% context budget at step 31. The compactor ran a two-level pass: 1. **Level 1:** steps 1–12, 13–24, 25–31 each summarized into ~400-token nodes, each node carrying `leaf_ids` = the union of the step-level event IDs it covered. 2. **Level 2:** the three level-1 nodes were summarized into a single ~600-token root, i...",
    "condition_of_validity": "The provenance-preserving invariant holds **only if** the following is enforced structurally, not by prompt instruction: - **Union-by-construction:** A parent node's leaf set is computed as `union(child.leaf_ids for child in children)` by code, *after* the model returns its summary text. The model is never asked to emit provenance. Provenance is metadata the...",
    "decision_boundary": "The boundary is between **compression of text** and **compression of provenance**. Text compression is lossy and model-owned; provenance compression is a set operation and must be code-owned and monotonic. The failure triggers precisely when these two are conflated—when the summarizer is trusted to regenerate the audit trail alongside the prose. Operationall...",
    "operational_effect": "After the fault, the instance's effective state was: a coherent narrative of steps 1–31 with no resolvable evidence for any of it. Subsequent reasoning compounded on the ungrounded summary—the patch at step 27 was defended in later turns by citing the root summary, which cited nodes, which cited nothing. The error did not surface as an error; it surfaced as ..."
  },
  "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": "72a2f49caf8665d369ca65d796fd2cb7dd23c6fafb0bf2fe452511f7ed5e16f6",
    "verified_classes": [
      "ProvenanceWatermarkError",
      "SummaryNode"
    ],
    "verified_functions": [
      "compact_level",
      "resolve_citation"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ProvenanceWatermarkError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
