feat: add conversation persistence capability#253
Conversation
There was a problem hiding this comment.
💡 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; |
There was a problem hiding this comment.
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 👍 / 👎.
Summary
persistence.conversationscapability that groups the revisioned session repository with the compaction archive repositoryWhy
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
sessionRepositoryandarchiveRepositoryinputs continue to work.Verification
yarn test:unit— 119 files, 709 testsyarn test:integration— 34 files, 310 testsyarn typecheckyarn lintyarn buildConversationPersistenceService