Skip to content

feat: add async conversation archive repository#250

Merged
roackb2 merged 1 commit into
mainfrom
codex/conversation-archive-repository
Jul 17, 2026
Merged

feat: add async conversation archive repository#250
roackb2 merged 1 commit into
mainfrom
codex/conversation-archive-repository

Conversation

@roackb2

@roackb2 roackb2 commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • add an async, host-injected ChatArchiveRepository for compacted raw transcripts, rolling summaries, and manifests
  • make compaction save through one durable append boundary before session state can reference the archive
  • upgrade the default file adapter to async I/O, serialized appends, atomic manifest replacement, strict corruption handling, and path-safe locators
  • propagate the repository through the engine, quickstart runner, turn preflight/persistence, direct shell, and control-plane compaction
  • export strict adapter-authoring codecs/errors and document a PostgreSQL/Drizzle-friendly storage shape

Why

A remote ChatSessionRepository could reopen active session state on another replica, but compacted history still referenced local archive files. This gives hosts a separate archive persistence port while preserving the zero-configuration local layout and keeping SQL, identity, tenancy, and object-store choices outside Heddle.

Reliability semantics

  • summarization completes before archive storage is mutated
  • append makes raw messages, summary text, and the returned manifest visible as one repository operation
  • repository failures reject the turn/manual compaction and restore any temporary running metadata; exact active history is retained
  • valid v1 local manifests remain readable, while malformed, mismatched, missing-summary, and escaping-locator state fails loudly
  • path and summaryPath stay backward-compatible field names but are now documented as repository-owned opaque locators

Verification

  • yarn lint
  • yarn typecheck
  • yarn test — 703 unit and 310 integration tests passed
  • yarn build

The build only reports the existing Vite chunk-size warnings.

Deliberate boundaries

  • no database/ORM/object-store dependency in Heddle
  • no model-visible remote raw-archive reader in this slice
  • traces, memory, and active-run/SSE coordination remain outside this storage port

@roackb2
roackb2 marked this pull request as ready for review July 17, 2026 06:59
@roackb2
roackb2 merged commit bab3ea4 into main Jul 17, 2026
5 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