refactor(context_compressor): extract message marker helpers - #81243
Open
andrexibiza wants to merge 1 commit into
Open
refactor(context_compressor): extract message marker helpers#81243andrexibiza wants to merge 1 commit into
andrexibiza wants to merge 1 commit into
Conversation
andrexibiza
force-pushed
the
refactor/context-compressor-message-marker-helpers
branch
from
August 7, 2026 18:13
95900a9 to
cd35efa
Compare
Contributor
refactor(context_compressor): extract message marker helpers
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extract the three message-marker helpers and
_DB_PERSISTED_MARKERfromagent/context_compressor.pyinto the leaf moduleagent/context_compressor_message_helpers.py.The original module re-exports every moved name, preserving import compatibility and the established monkeypatch surface used by
ContextCompressor.compress().Exact scope
f15a38ee73631b3cd5f7d30765c37d5f0245d403agent/context_compressor.py:173-2373,2048c6860876e9a511927f9eecffce5bb878179d590218df284edd48c3cf3adc31d_fresh_compaction_message_copy_template_visible_role_strip_persistence_markers_DB_PERSISTED_MARKERThe complete owner file remained byte-identical from the Feature Package pin through rebased base
df7e17841959d08254d923869a1060005680d4a2, so the approved seam did not drift.Compatibility and behavior
agent.context_compressorstill exposes the three helpers and marker constant.agent.context_compressor._fresh_compaction_message_copycontrols the realContextCompressor.compress()path.agent.context_compressor.Verification
Post-rebase at commit
95900a9fc4752232358c578869e753cd08b5d785:git diff --check: passedThe five-lane implementation wave produced four exact-byte clean extractions. Two independent lanes converged on the accepted leaf-module name; one divergent implementation failed the Golden-SHA gate and was excluded. Stronger compatible assertions from the lane set were consolidated into the committed seam suite.
Feature Package status
This is one coherent shard toward the 2,000-line law.
agent/context_compressor.pyremains above 2,000 lines; this PR does not claim the final god-file .Part of #78645
Part of #78647
🔒 : #78645 · indexed by the All Gods tracker #78647.
Related interlock closure
Every listed node is preserved for coordination; this PR does not duplicate their extracted windows.