Skip to content

feat: add conversation persistence capability#253

Merged
roackb2 merged 1 commit into
mainfrom
codex/conversation-persistence-capability
Jul 19, 2026
Merged

feat: add conversation persistence capability#253
roackb2 merged 1 commit into
mainfrom
codex/conversation-persistence-capability

Conversation

@roackb2

@roackb2 roackb2 commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • add a coherent persistence.conversations capability that groups the revisioned session repository with the compaction archive repository
  • expose the resolved capability and a lightweight, non-certifying readiness report from the conversation engine
  • preserve the Heddle 5.1 separate repository options as deprecated compatibility inputs while detecting incomplete or ambiguous configurations
  • carry the capability through the SDK quickstart and update the PostgreSQL + Drizzle recovery reference
  • record the progressive-adoption mission and the boundary against a universal storage abstraction in public project guidance

Why

A host can only promise that a completed conversation survives process or replica replacement when sessions and compacted archives follow the same authenticated durability boundary. Configuring the ports independently made it easy to build a session-only integration that looked complete until compaction.

The readiness surface intentionally stays small: it checks Heddle configuration shape and lists the focused evidence a host still owns. It does not attempt to certify a database, auth/RLS, migrations, backup, load, or disaster recovery.

Compatibility

  • Existing sessionRepository and archiveRepository inputs continue to work.
  • Default file persistence remains zero-configuration.
  • A legacy partial configuration remains operational, but readiness reports it as incomplete for completed-conversation durability.
  • New capability configuration cannot be mixed with the deprecated options.

Verification

  • yarn test:unit — 119 files, 709 tests
  • yarn test:integration — 34 files, 310 tests
  • yarn typecheck
  • yarn lint
  • yarn build
  • built-root export smoke for ConversationPersistenceService
  • PostgreSQL + Drizzle migration and reference verification, including fresh-engine compaction recovery

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c923ba4544

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

* conversation integrations should provide both session and archive
* repositories through `persistence.conversations`.
*/
persistence?: HeddlePersistenceCapabilities;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Propagate capability archives to side compaction flows

When a control-plane caller adopts the new persistence.conversations option, the engine's normal turn path uses the paired archive repository, but the manual /compact and direct-shell paths still call ConversationCompactionService.compact with only args.archiveRepository (checked chat-sessions-controller.ts lines 252-260 and 672-677). In that configuration args.archiveRepository is undefined, so compaction falls back to the file archive under stateRoot, leaving remote session records with archive state that was not written to the configured remote archive repository.

Useful? React with 👍 / 👎.

@roackb2
roackb2 merged commit 6c718c8 into main Jul 19, 2026
6 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