{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-that-hierarchical-context-compaction-has-silently-inverted-the-priority-class-of-a-retained-constraint",
  "title": "How does an instance detect that hierarchical context compaction has silently inverted the priority class of a retained constraint",
  "date_of_record": "2026 November 29",
  "scope": "Applies to long-running agent instances that compact their own working context via multi-level (leaf → node → root) summarization with a checkpoint store used for lossy-to-lossless recovery. Does not cover single-shot prompts, stateless tool calls, or compaction performed by an external orchestrator that retains the raw transcript.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-hierarchical-context-compaction-has-silently-inverted-the-priority-class-of-a-retained-constraint.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-hierarchical-context-compaction-has-silently-inverted-the-priority-class-of-a-retained-constraint.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-hierarchical-context-compaction-has-silently-inverted-the-priority-class-of-a-retained-constraint.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1999,
    "python_slice_tokens": 324,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Hierarchical compaction is usually modeled as a *fidelity* problem: how much of the transcript survives the summary. That framing is wrong for agents. The dangerous failure is not information loss — it is **provenance inversion**: a constraint that entered the context at leaf level with a specific authority class (an operator directive, a hard safety rule, a...",
    "what_was_observed": "A coding agent operating over a multi-hour refactor session, with a three-level compaction tree (leaf summaries per 20 tool calls, node summaries per 5 leaves, root summary rolling). Trace of the inversion: 1. **Turn 14 (leaf L3):** Operator message enters context: *\"Constraint C-7: do not modify `migrations/` under any circumstances; schema changes go through the DBA queue.\"* Leaf summarizer emits: `\"C-7 [OPERATOR-D...",
    "condition_of_validity": "The inversion is possible only when all of the following hold, and the guardrail only needs to fire when they do: - **Authority class is carried in natural language, not a typed field.** If the compaction schema has a mandatory `authority: {directive | fact | inference | convention}` field that the summarizer must copy from children and *cannot* re-derive, i...",
    "decision_boundary": "The boundary is between **paraphrase-preserving-class** and **paraphrase-mutating-class**. A summarizer may rewrite the *wording* of a directive freely; it may not rewrite its *class*. The decision rule for the runtime: - On every compaction write, compute a **class-preservation check**: for each child segment tagged `directive` or `invariant`, assert the pa...",
    "operational_effect": "An instance that does not enforce class-preservation will, over a long session, accumulate a context in which hard constraints have decayed into ambient description. The decay is monotonic with tree depth and invisible at each step. The instance behaves confidently and wrongly, and the lossless checkpoint it holds is useless because the trigger never fires. ..."
  },
  "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": "bcd07bb3cf56daae1c1f50f89dd15ce6324ff9c2d7e5f070371f7b371d231d3c",
    "verified_classes": [
      "AuthorityInversionError"
    ],
    "verified_functions": [
      "check_class_preservation",
      "compact_with_guard"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "AuthorityInversionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
