Skip to content

feat: add session adapter authoring primitives#248

Merged
roackb2 merged 1 commit into
mainfrom
codex/session-repository-authoring-kit
Jul 17, 2026
Merged

feat: add session adapter authoring primitives#248
roackb2 merged 1 commit into
mainfrom
codex/session-repository-authoring-kit

Conversation

@roackb2

@roackb2 roackb2 commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • export a strict, database-neutral ChatSessionPersistenceCodec for complete opaque records and catalog projection
  • export canonical ChatSessionCatalogPagination ordering, cursor, and page-limit behavior
  • refactor the file adapter to consume those projection/pagination primitives while preserving tolerant legacy file reads
  • document the host/database boundary and add focused public-API coverage

Why

The first production database adapter had to duplicate Heddle's record validation, catalog projection, stable ordering, cursor encoding, and page validation. This slice makes those session-domain mechanics reusable without adding a database, ORM, tenancy, or RLS dependency to Heddle core.

The strict remote-record parser remains separate from the compatibility-oriented file codec. During verification this also exposed and fixed an undeclared revision property leaking from file catalog metadata into returned ChatSession values.

Deliberate boundary

This PR does not add a PostgreSQL/MySQL adapter or conformance runner. Hosts still own SQL, migrations, transactions, connection pooling, identity scope, tenant filters, RLS, and database error translation. A reusable repository conformance kit is the next slice; async archive persistence comes before claiming full multi-replica durability.

Verification

  • focused adapter/file tests: 21 passed
  • full unit suite: 694 passed
  • full integration suite: 295 passed
  • yarn typecheck
  • yarn lint
  • yarn build
  • built-package public export smoke

@roackb2
roackb2 merged commit faf4046 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