Skip to content

Add compaction conservation metadata#22

Merged
chubes4 merged 2 commits intomainfrom
fix-compaction-conservation
May 1, 2026
Merged

Add compaction conservation metadata#22
chubes4 merged 2 commits intomainfrom
fix-compaction-conservation

Conversation

@chubes4
Copy link
Copy Markdown
Contributor

@chubes4 chubes4 commented May 1, 2026

Summary

  • Add generic compaction provenance metadata for original, compacted, retained, and archived item/byte counts.
  • Add opt-in conservation checks that fail closed and return the original transcript unchanged when compaction drops too much durable content.
  • Extend the compaction smoke test to cover healthy conservation, lossy rejection, disabled conservation, and metadata shape.

Closes #18.

Tests

  • composer test
  • php -l src/Runtime/AgentConversationCompaction.php
  • php -l tests/conversation-compaction-smoke.php

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode (GPT-5.5)
  • Used for: Drafted implementation and tests; Chris reviewed via test/PR workflow.

@chubes4 chubes4 merged commit e35c3b4 into main May 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add generic compaction result metadata and conservation checks

1 participant