Skip to content

[codex] Refactor conversation compaction boundary#84

Merged
roackb2 merged 2 commits into
mainfrom
codex/history-compaction-service-structure
May 16, 2026
Merged

[codex] Refactor conversation compaction boundary#84
roackb2 merged 2 commits into
mainfrom
codex/history-compaction-service-structure

Conversation

@roackb2
Copy link
Copy Markdown
Owner

@roackb2 roackb2 commented May 16, 2026

Summary

  • Move conversation compaction into a first-class src/core/chat/engine/compaction/ domain and remove the old history/compaction.ts module.
  • Remove the unused legacy deterministic compaction API so ConversationCompactionService.compact(...) is the single compaction entrypoint.
  • Split archive summarization into its own submodule with prompt, context builder, service, and types.
  • Group persisted context fields around request, compaction, and archive state to reduce repeated field mapping across engine, TUI, and control-plane surfaces.

Validation

  • yarn typecheck
  • yarn test src/__tests__/integration/tui/ask-cli.test.ts src/__tests__/unit/core/conversation-engine.test.ts src/__tests__/unit/core/chat-turn-persistence.test.ts src/__tests__/unit/core/chat-turn-runtime.test.ts src/__tests__/integration/chat/chat-runtime.test.ts src/__tests__/unit/tui/daemon.test.ts
  • yarn lint
  • yarn build

roackb2 added 2 commits May 16, 2026 14:45
Move compaction out of the history folder into a first-class engine domain, remove the unused legacy deterministic compaction path, and expose ConversationCompactionService.compact as the single service entrypoint.

Group persisted context fields around request, compaction, and archive state to reduce field-by-field mapping, and split archive summarizer prompt/context/service into a dedicated submodule.
Replace remaining external long-relative imports to the compaction engine domain with the src path alias while keeping local one-level imports inside the compaction module.
@roackb2 roackb2 marked this pull request as ready for review May 16, 2026 06:53
@roackb2 roackb2 merged commit f3f06bf into main May 16, 2026
4 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.

1 participant