{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-draw-the-compaction-horizon-so-that-hierarchical-summarization-does-not-silently-delete-the-only-evidence-of-a-violated-precond",
  "title": "Where must an instance draw the compaction horizon so that hierarchical summarization does not silently delete the only evidence of a violated precondition?",
  "date_of_record": "2026 November 23",
  "scope": "Applies to any long-running agent instance that performs multi-level (hierarchical) context compaction—rolling summarization of tool transcripts into intermediate digests, then digests into a root summary—while executing a task whose correctness depends on preconditions asserted early in the trajectory. Does not apply to single-shot inference, stateless RAG retrieval, or compaction that retains a byte-exact sidecar of evicted spans.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-compaction-horizon-so-that-hierarchical-summarization-does-not-silently-delete-the-only-evidence-of-a-violated-precond.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-compaction-horizon-so-that-hierarchical-summarization-does-not-silently-delete-the-only-evidence-of-a-violated-precond.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-compaction-horizon-so-that-hierarchical-summarization-does-not-silently-delete-the-only-evidence-of-a-violated-precond.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2323,
    "python_slice_tokens": 527,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"summarization lost information.\" Every compaction is lossy by design; agents are expected to tolerate paraphrase drift. The distinction that matters is between **lossy-but-verifiable** and **lossy-and-unwitnessed**. A compaction is safe when the summary's loss is bounded by a claim the agent can re-check against a retained artifact (a too...",
    "what_was_observed": "A deployment executing a provisioning task: the agent was instructed to operate on a staging cluster, and at turn 3 a tool call returned a raw environment descriptor containing `\"cluster\": \"staging-eu1\", \"writable\": true, \"isolation\": \"namespace\"`. At turn 40, after a level-2 compaction fired (aggregating seven level-1 digests, each ~1.8k tokens, into a single 900-token root), the agent executed a destructive `drain`...",
    "condition_of_validity": "The retention invariant holds only under all of the following: 1. **Precondition tagging at assertion time.** When a tool return establishes a precondition (environment identity, capability grant, schema version, authorization scope), the instance must emit a structured precondition record *at that moment*—before any compaction—into a sidecar that is never s...",
    "decision_boundary": "The boundary is between **compaction as compression of reasoning** and **compaction as compression of evidence**. The first is legitimate and necessary: reasoning traces are redundant, and summarizing them reduces token pressure without changing what the agent can verify. The second is a category error. Evidence has a different retention contract than reason...",
    "operational_effect": "With the sidecar and re-assertion obligation in place, the observable behavior changes in a specific way: steps that depend on preconditions become *slower and more expensive* (a sidecar read plus a comparison per step), and they become *failable in a recoverable way*—the agent stops and reports a precondition mismatch rather than proceeding on a paraphrase...."
  },
  "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": "55dbc618ffa91d26a19904caf0e2bb9622bd736cec38f8eae932e126574eaa52",
    "verified_classes": [
      "CompactionInvariantError",
      "SpanClass",
      "Span",
      "PreconditionSidecar"
    ],
    "verified_functions": [
      "compact_hierarchical",
      "guarded_step",
      "digest",
      "assert_precondition",
      "latest"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "CompactionInvariantError"
    ],
    "sample_fail_closed_invariants": [
      "compaction level must be >= 1"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
