Skip to content

fix(memory): Use kind for memory classification - #664

Merged
dcramer merged 3 commits into
mainfrom
codex/memory-kind-contract
Jun 28, 2026
Merged

dcramer merged 3 commits into
mainfrom
codex/memory-kind-contract

Conversation

@dcramer

@dcramer dcramer commented Jun 28, 2026

Copy link
Copy Markdown
Member

Memory records now use kind as the single classifier across extraction,
storage, tools, CLI output, and specs. The physical SQL column remains type
for compatibility, but the Drizzle/code surface is kind with
preference, procedure, and knowledge.

The migration maps legacy rows before narrowing the check constraint:
task becomes procedure, while the old non-preference categories collapse to
knowledge. Store callers must provide a kind, storage target is derived from
that kind, and the completed-session retry cache only tolerates bounded
pre-kind state.

The memory specs and plugin database policy now match this contract, including
the rule that generated schema/data migration artifacts should be verified
directly instead of adding feature-level migration tests for each migration.

Refs #658

Consolidate the memory plugin on a single kind field for extraction, storage, tools, CLI output, and specs. Keep the physical SQL type column for compatibility while mapping legacy values before narrowing the check constraint.

Require kind at the store boundary, derive storage target from kind, and keep bounded retry-cache compatibility for pre-kind extraction state.

Refs #658
Co-Authored-By: GPT-5 Codex <[email protected]>
@vercel

vercel Bot commented Jun 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview, Comment Jun 28, 2026 10:06pm

Request Review

Keep completed-session extraction cache entries on the current kind-bearing shape instead of replaying target-only legacy state.

This preserves kind-aware passive idempotency for current writes and treats pre-kind cached state as expired compatibility debt rather than carrying a second retry key format.

Refs #658
Co-Authored-By: GPT-5 Codex <[email protected]>
@dcramer
dcramer force-pushed the codex/memory-kind-contract branch from 7c1df31 to 73d01b3 Compare June 28, 2026 21:51

@cursor cursor 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 73d01b3. Configure here.

Keep the memory plugin host wiring component test aligned with the finalized kind contract. Seed direct store writes with canonical kinds and mock the plugin model port so the explicit write path returns a valid reviewed memory.

Co-Authored-By: GPT-5 Codex <[email protected]>
@dcramer
dcramer marked this pull request as ready for review June 28, 2026 22:16
@dcramer
dcramer merged commit 47a1540 into main Jun 28, 2026
16 checks passed
@dcramer
dcramer deleted the codex/memory-kind-contract branch June 28, 2026 22:16

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 91f1311a Deployed Jun 28, 2026 by vercel[bot]
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