{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-boundary-be-drawn-between-lossy-summarization-checkpoints-and-compaction-eligibility-in-long-horizon-agent-traces",
  "title": "Where must an instance boundary be drawn between lossy summarization checkpoints and compaction eligibility in long-horizon agent traces",
  "date_of_record": "2026 November 23",
  "scope": "Applies to agent runtimes that persist a long-horizon trace as an append-only event log, periodically emit lossy summarization checkpoints over that log, and auto-compact older segments to bound storage and context cost. Does not apply to systems that retain full-fidelity traces indefinitely, or to compaction that never discards source events (deduplicative-only compaction).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-boundary-be-drawn-between-lossy-summarization-checkpoints-and-compaction-eligibility-in-long-horizon-agent-traces.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-boundary-be-drawn-between-lossy-summarization-checkpoints-and-compaction-eligibility-in-long-horizon-agent-traces.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-boundary-be-drawn-between-lossy-summarization-checkpoints-and-compaction-eligibility-in-long-horizon-agent-traces.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1759,
    "python_slice_tokens": 334,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious boundary is between *checkpoint coverage* and *compaction eligibility*. A summarization checkpoint is lossy: it is a derived artifact that asserts \"these N events are representable by this summary.\" Compaction is destructive: it deletes the N events and promotes the summary to the authoritative record. The invariant that is routinely violated...",
    "what_was_observed": "In a runtime with 200k-event traces and checkpoint emission every 5,000 events, a compaction worker ran on a schedule independent of the checkpoint committer. Under steady state the two were ordered by latency and the bug was latent. Under a checkpoint commit stall (the summarizer's model endpoint degraded to ~40s p99 for a 90-second window), the compaction worker observed checkpoint *files present on the local volum...",
    "condition_of_validity": "The safe-compaction invariant holds only when all of the following are true at the moment of deletion: 1. **Commit-before-delete ordering is enforced by the storage layer, not by application sequencing.** The checkpoint's commit must be a prerequisite the compaction transaction *reads back* (a quorum-acknowledged read of the committed summary), not a promise...",
    "decision_boundary": "The decision to compact a range `[a, b]` must be gated on a predicate that is *strictly stronger* than \"a checkpoint exists for `[a, b]`.\" The operational rule: - If the checkpoint covering `[a, b]` is not quorum-committed and read-back-verified → **do not compact**; retain source events. - If the checkpoint is committed but its causal coverage does not full...",
    "operational_effect": "Enforcing the stronger predicate converts a silent, undetectable data-loss failure into a *visible stall*: compaction throughput drops when the summarizer degrades, and the trace grows. This is the correct trade. The stall is observable and alertable; the silent hole is neither. In the observed runtime, adding the read-back-verify gate and causal-boundary sh..."
  },
  "matched_failure_symptoms": [
    "CONTEXT_DRIFT_OR_ATTENTION_DILUTION"
  ],
  "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": "fe9a0df2f01aa6d1b731ef5ae65773e601ac13b305c224314ba45bae2fd54277",
    "verified_classes": [
      "UncoveredCompactionError",
      "Checkpoint"
    ],
    "verified_functions": [
      "_hash_range",
      "_causal_boundary_inside",
      "compact_range"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "UncoveredCompactionError"
    ],
    "sample_fail_closed_invariants": [
      "checkpoint source_hash mismatch; summary is not bound to these events"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
