{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-an-auto-compaction-boundary-violation-when-lossy-summarization-drops-the-last-writer-s-witness-token",
  "title": "What structural signals indicate an auto-compaction boundary violation when lossy summarization drops the last-writer's witness token",
  "date_of_record": "2026 November 28",
  "scope": "Applies to long-horizon agents that auto-compact their own transcript (or a supervisor compacts a worker's transcript) using lossy summarization with a declared \"guarantee\" that certain facts survive compaction. Does not apply to exact-copy context offload or to retrieval-only externalization where the full transcript remains queryable.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-an-auto-compaction-boundary-violation-when-lossy-summarization-drops-the-last-writer-s-witness-token.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-an-auto-compaction-boundary-violation-when-lossy-summarization-drops-the-last-writer-s-witness-token.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-an-auto-compaction-boundary-violation-when-lossy-summarization-drops-the-last-writer-s-witness-token.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1726,
    "python_slice_tokens": 386,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the summary lost information.\" Lossy compaction is *supposed* to lose information. The failure is that the compaction boundary — the point in the transcript where the summarized prefix ends and the verbatim suffix begins — is computed against a *token budget* rather than against *causal dependency structure*. A summarizer that preserves \"...",
    "what_was_observed": "A 40+ step tool-using agent performs a `write_file` at step 6 (`config.yaml` → `retries: 3`), then at step 31 a peer agent (via a handoff) writes `retries: 5`. At step 38 the primary agent reads `config.yaml`, sees `retries: 5`, and reasons about it. At step 41 auto-compaction fires: the summarizer retains the step-6 mention because \"retries\" appears in the summary's salient entity set, but the step-31 peer write is ...",
    "condition_of_validity": "The invariant holds — and the failure is preventable — only when all of the following are true: - The agent's state surface is *addressable*: writes name a key (`config.yaml:retries`), not free-form prose. If state is only expressible as natural-language assertions, witness extraction is itself lossy and the invariant cannot be enforced mechanically. - The t...",
    "decision_boundary": "The operational rule: - **Compact** when every read in the verbatim suffix has a retained last-writer witness whose sequence number is ≥ the sequence number of every other retained witness for the same key. This is a *set* check, not a similarity check. - **Refuse compaction** (fall back to checkpoint-and-restart, or to a larger budget) when the witness extr...",
    "operational_effect": "Agents that enforce the witness-monotonicity predicate at the compaction boundary stop producing the specific class of regression where a post-compaction turn reverts a peer's write. The cost is a small increase in pinned tokens (typically 1–3 messages per compaction event) and a refusal rate that spikes when peers write rarely-touched keys. The failure mode..."
  },
  "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": "896076bac63278ba1f951df00b75660bb70f0543ee176fd2d3fb006f67c0335b",
    "verified_classes": [
      "CompactionWitnessViolation",
      "Write",
      "CompactionPlan"
    ],
    "verified_functions": [
      "_last_writer",
      "enforce_witness_monotonicity"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CompactionWitnessViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
