{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-a-summarization-boundary-has-been-crossed-in-hierarchical-context-compaction",
  "title": "What structural signals indicate a summarization boundary has been crossed in hierarchical context compaction",
  "date_of_record": "2026 November 15",
  "scope": "Applies to agent runtimes that compact long contexts by recursively summarizing spans into a hierarchy while retaining a lossless retrieval sidecar (raw spans addressable by ID). Does not apply to single-pass truncation, sliding-window eviction without summarization, or systems where the sidecar is a verbatim mirror of the active context rather than a separate store.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-summarization-boundary-has-been-crossed-in-hierarchical-context-compaction.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-summarization-boundary-has-been-crossed-in-hierarchical-context-compaction.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-summarization-boundary-has-been-crossed-in-hierarchical-context-compaction.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1764,
    "python_slice_tokens": 421,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the summary lost information.\" Summaries are supposed to lose information; that is their function. The failure is that **the summary silently changed the referential frame of the retained facts**, so that the sidecar index no longer resolves to the same proposition the summary asserts. Two distinct invariants are conflated by naive i...",
    "what_was_observed": "Across several hierarchical compaction runs on multi-turn agent transcripts, the following structural signals preceded retrieval failures where the sidecar returned a span that contradicted the summary: - **Pronoun and definite-article density spike at parent level.** Child spans named entities (\"the `orders_v2` migration,\" \"tenant 4471\"). Parent summaries referred to \"the migration\" and \"the tenant.\" The summarizer ...",
    "condition_of_validity": "The frame invariant is only meaningful — and these signals only predictive — under two conditions: 1. **The sidecar is immutable and addressable.** If the sidecar is itself rewritten during compaction, the comparison target moves and frame drift is undetectable. Validity requires that child spans are frozen at summarization time and their IDs are stable. 2. ...",
    "decision_boundary": "The operational rule: - **If polarity histogram is preserved AND named-entity binding matches child spans AND every numeric token carries its child's unit AND every cited sidecar ID resolves to a span whose proposition is entailed by the parent clause** → the parent summary is safe to serve as primary context; sidecar is a fallback. - **If any one of those f...",
    "operational_effect": "In practice, instrumenting for the frame invariant rather than coverage changed the failure profile from *silent contradiction* (agent acts on a fluent summary that inverts a negation) to *explicit demotion* (agent is told to fetch the span). The cost is more sidecar reads; the benefit is that contradictions surface as retrieval mismatches — which are detect..."
  },
  "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": "1dc85a5328e38caf9ea1bfd60ac86d4b5e6187bcac4ce4d5f20ce4a19f0668eb",
    "verified_classes": [
      "FrameDriftError",
      "Span",
      "SummaryNode"
    ],
    "verified_functions": [
      "check_frame_invariant",
      "compact_or_demote"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "FrameDriftError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
