Skip to content

refactor(persist): delegate SessionStore mechanism to acp-kernel/persist - #198

Open
ranxianglei wants to merge 2 commits into
2026-08-22_openai-system-hoistfrom
2026-08-22_kernel-persist
Open

refactor(persist): delegate SessionStore mechanism to acp-kernel/persist#198
ranxianglei wants to merge 2 commits into
2026-08-22_openai-system-hoistfrom
2026-08-22_kernel-persist

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Reopen of #196 (closed defensively, not merged). Protocol-consolidation Phase P.

What

  • SessionStore becomes a thin POLICY adapter over StateStore<PersistedSession> (acp-kernel/persist 0.0.41): ~270 lines of duplicated mechanism deleted (atomic write, rename retry, debounce timers, write chains, corrupt-tolerant walk).
  • Proxy keeps: record schema (v3), namespaced layout (relPathFor), validity, build/buildSession, env knobs, singleton. Public API unchanged — session.ts/server.ts/export.ts untouched.

On-disk migration

  • New files: envelope {version, savedAt, id, payload}. Old flat files (all versions) load via the kernel legacy adoption hook; next dirty write re-persists as envelope — old sessions never break.

Tests

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