fix: clarify CCR marker content preservation - #3175
Open
hopstreax wants to merge 1 commit into
Open
Conversation
hopstreax
requested review from
DevanshiVyas,
JerrettDavis and
chopratejas
as code owners
August 21, 2026 13:49
Contributor
PR governanceThis PR follows the template and is marked ready for human review. |
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.
Description
Closes #3098
CCR compression markers currently tell agents that content was compressed and
can be retrieved, but do not explicitly state that the original content is
preserved. This can cause agents to interpret the marker as data corruption or
truncation and perform unnecessary verification work.
This change adds
Original content preserved.to the Kompress CCR marker whilepreserving the existing
Retrieve more: hash=<24-hex>retrieval protocol.Type of Change
Changes Made
Original content preserved.to CCR markers emitted by:KompressCompressor.compress()KompressCompressor.compress_batch()RemoteKompressCompressor.compress()CCRToolInjectormarker regex to recognize the newmarker wording while retaining compatibility with existing marker formats.
detection.
behavior.
Testing
pytest)ruff check .)mypy headroom)Test Output
Real Behavior Proof
python -m pytest tests/test_ccr_marker_policy.py tests/test_ccr_tool_injection.py tests/test_remote_kompress_dropin.py; ranuv tool run ruff check headroom testsanduv tool run ruff format --check headroom tests; additionally exercised CCR compression, marker generation,CCRToolInjectordetection, andCompressionStoreretrieval with a synthetic tool result.Original content preserved.,CCRToolInjectordetected its hash, andCompressionStoreretrieved the original 730-character input with a verbatim match.Runtime Rollout Safety
4bef0f3ato restore the previous marker wording.Review Readiness
Checklist
CHANGELOG.md— it is generated by release-please from my Conventional Commit PR title (a CI guard enforces this)Screenshots (if applicable)
N/A — this is a model-facing marker/protocol change.
Additional Notes
The compressed representation itself remains intentionally condensed. The
integrity statement refers to the original content preserved in CCR storage,
which remains retrievable through the existing hash-based retrieval mechanism.