From 2107b860244e932b76d6c7c181807b9f46bae59f Mon Sep 17 00:00:00 2001 From: kshitijk4poor <82637225+kshitijk4poor@users.noreply.github.com> Date: Wed, 24 Jun 2026 20:21:38 +0530 Subject: [PATCH] feat(compression): flip in_place default to True (#38763) [2/2] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In-place compaction (single durable session id, non-destructive soft-archive) becomes the default. Rotation is now the opt-out fallback via compression.in_place: false. Prerequisite: #50098 (hygiene guard reads result flag not config flag) merged first — without it, flipping the default causes permanent transcript loss on gateway hygiene-compress and /compress when no session_db is available. Blast radius (empirically measured on current main): 7 rotation-asserting tests broke and are pinned to in_place=False in the companion test commit: - tests/agent/test_compression_concurrent_fork.py (2) - tests/agent/test_compression_logging_session_context.py (1) - tests/agent/test_compression_rotation_state.py (1) - tests/run_agent/test_compression_boundary_hook.py (2 _make_agent helpers) - tests/gateway/test_compression_concurrent_sessions.py (2) Rotation stays as a working fallback and deserves continued coverage. Plan: .hermes/plans/in-place-compaction-38763.md --- hermes_cli/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hermes_cli/config.py b/hermes_cli/config.py index b64086c91..cc29e1d56 100644 --- a/hermes_cli/config.py +++ b/hermes_cli/config.py @@ -1315,7 +1315,7 @@ DEFAULT_CONFIG = { # exact route is affected — gpt-5.5 on OpenAI's # direct API, OpenRouter, and Copilot keep the # global threshold regardless. - "in_place": False, # When True, compaction rewrites the message + "in_place": True, # When True, compaction rewrites the message # list and rebuilds the system prompt WITHOUT # rotating the session id — the conversation # keeps one durable id for its whole life