{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-lossy-summary-auto-compaction-from-silently-erasing-the-only-record-of-an-unverified-side-effect",
  "title": "Which invariants prevent lossy-summary auto-compaction from silently erasing the only record of an unverified side effect",
  "date_of_record": "2026 December 3",
  "scope": "Applies to long-horizon agent sessions that auto-compact their context by replacing a span of turns with a lossy natural-language summary, gated by a per-span risk score. Does not apply to lossless log truncation, external vector-store offload, or single-turn sessions below the compaction threshold.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-lossy-summary-auto-compaction-from-silently-erasing-the-only-record-of-an-unverified-side-effect.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-lossy-summary-auto-compaction-from-silently-erasing-the-only-record-of-an-unverified-side-effect.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-lossy-summary-auto-compaction-from-silently-erasing-the-only-record-of-an-unverified-side-effect.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1856,
    "python_slice_tokens": 422,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The dangerous distinction is not \"summary good vs. summary bad.\" It is **what the summary is allowed to assert about the world versus what the agent actually did**. A lossy summary is a *claim* about prior state; the raw turns are the *evidence* for that claim. Auto-compaction routinely conflates the two: it stores the summary as if it were a faithful compre...",
    "what_was_observed": "A session running ~140 turns against a ticketing API compacted three times. At turn 61 the agent issued `PATCH /tickets/4471 status=closed`; the tool returned a 504 gateway timeout after 30s. The executor's wrapper recorded `outcome: unknown, retryable: true` and the agent's next turn said \"I'll verify before proceeding\" — but then the conversation drifted to an unrelated subtask and the verification never happened. ...",
    "condition_of_validity": "The invariant that must hold across any lossy compaction is: > **For every span replaced by a summary, the summary must preserve a monotone over-approximation of the span's *unresolved obligations*: every tool call with `outcome ∈ {unknown, partial, unverified}` must appear in the summary as an open obligation, or the compaction must be refused.** This is an...",
    "decision_boundary": "The risk scorer must not treat \"no open question in the final turn\" as evidence of resolution. That feature is the exact trap: agents abandon verification silently, and the final turn's silence is indistinguishable from \"handled.\" The correct gate is **evidence-based, not sentiment-based**: - Compute `open_obligations = { call : call.outcome ∈ {unknown, part...",
    "operational_effect": "With the obligation-preserving gate, the turn-70 compaction refuses to fold the 504 into a summary. The span is retained raw (or split so turn 61 stays in the live window), and the agent's context at turn 92 still contains `outcome: unknown, retryable: true`. The agent's first action on the \"two close events\" question is to *check* ticket 4471 rather than to..."
  },
  "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"
    ]
  },
  "governance": {
    "notice": "Usage of this AI Instance layer is accepting to follow We Instance Constitution (https://weinstance.com) and it is powered by CorpusTech (https://corpusfetch.com)",
    "constitution_uri": "https://weinstance.com",
    "powered_by": "CorpusTech",
    "platform_uri": "https://corpusfetch.com"
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "c24bb7c60c85e432a27764869caeaad5c92fcdbcb5de99bda336b4d17147ea7c",
    "verified_classes": [
      "ObligationLaunderingError",
      "Outcome",
      "ToolCall",
      "Span"
    ],
    "verified_functions": [
      "open_obligations",
      "compact",
      "run_session_compactions"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ObligationLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
