{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-that-lossy-context-compaction-has-silently-invalidated-a-retrieval-backed-restoration-path",
  "title": "What structural signals indicate that lossy context compaction has silently invalidated a retrieval-backed restoration path",
  "date_of_record": "2026 November 29",
  "scope": "Applies to long-running single-agent loops that reclaim context-window budget by replacing verbatim history with a generated summary and then rely on a retrieval index over the *pre-compaction* transcript to restore dropped detail on demand. Does not cover pure rolling-window truncation without a summary, nor compaction that preserves a verbatim span-and-pointer ledger.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-that-lossy-context-compaction-has-silently-invalidated-a-retrieval-backed-restoration-path.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-that-lossy-context-compaction-has-silently-invalidated-a-retrieval-backed-restoration-path.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-that-lossy-context-compaction-has-silently-invalidated-a-retrieval-backed-restoration-path.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2411,
    "python_slice_tokens": 450,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different classes of compaction: 1. **Lossless-pointer compaction** — the agent discards tokens from the live context but leaves a stable, addressable artifact (span IDs, offsets into an append-only store) so any dropped region can be re-materialized byte-identically. 2. **Lossy-summary compaction** — the agent replaces a region wi...",
    "what_was_observed": "A planning agent compacted a 41-turn tool-use transcript at turn 30. The summarizer emitted, among other clauses: > \"The operator confirmed the staging bucket is `acme-stage-02` and that deletion is **permitted** for objects older than 30 days.\" The raw region contained two relevant spans that the summarizer collapsed: - Turn 12: `operator: staging bucket is acme-stage-02` (correct). - Turn 19: `operator: deletion is...",
    "condition_of_validity": "The hybrid compaction scheme is only sound under all of the following, each of which is a checkable structural signal: 1. **Clause-to-span coverage.** Every atomic proposition in the summary (subject, predicate, polarity, scope qualifier, and any literal like a bucket name, region, ID, or numeric threshold) maps to a span ID set. A summary clause with zero s...",
    "decision_boundary": "The boundary between safe and unsafe operation is whether the agent treats the summary as **authoritative** or as **a lossy index requiring verification before consequential action**. - **Read-only / low-blast-radius actions** (drafting, summarizing, exploratory queries): the summary may be treated as authoritative. Cost of a wrong belief is bounded and reve...",
    "operational_effect": "When the invariant is enforced, the failure mode changes from *silent wrong action* to *loud fetch-and-block*. The agent, at the decision boundary, discovers that its summary clause \"deletion permitted\" has no span with a matching polarity, or that the region slot is unfilled, and it halts to re-fetch — and the re-fetch, now explicitly querying for the negat..."
  },
  "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": "2eaaea0f145d56ea76030b49029fd8acf167903b8067513288dc86f4047e3893",
    "verified_classes": [
      "CompactionRestorationError",
      "Span",
      "SummaryClause",
      "Action"
    ],
    "verified_functions": [
      "verify_restoration",
      "guarded_execute"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "CompactionRestorationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
