[codex] Refactor note and journal canonical metadata - #182
Merged
Conversation
h4yfans
marked this pull request as ready for review
April 8, 2026 23:26
h4yfans
added a commit
that referenced
this pull request
May 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Move note and journal canonical metadata into
data.db, add storage/domain packages around it, and rewire vault, IPC, watcher, and sync flows to treatindex.dbas a rebuildable projection instead of the source of truth.Why
This architecture-reset slice needs note and journal metadata to survive index rebuilds and stop depending on
note_cacheinindex.dbfor canonical state. Property definitions also need to live with the canonical note metadata rather than only in the rebuildable index.How
note_metadataand canonicalproperty_definitionstables todata.db@memry/storage-data,@memry/storage-vault, and@memry/domain-notespackagesdata.dbindex.dbas the search/projection cache and mirror only the rebuildable note cache state thereType
feat— new featurefix— bug fixrefactor— restructure without behavior changestyle— visual/UI onlyperf— performance improvementtest— adding or updating testschore— tooling, deps, configdocs— documentation onlyci— CI/CD changesTest plan
Validation run:
pnpm --filter @memry/db-schema typecheckpnpm --filter @memry/domain-notes typecheckpnpm --filter @memry/storage-data typecheckpnpm --filter @memry/storage-vault typecheckpnpm --filter @memry/desktop typecheckpnpm --filter @memry/desktop exec vitest run --config config/vitest.config.ts --project main src/main/ipc/journal-handlers.test.ts src/main/vault/indexer.test.ts src/main/vault/watcher.test.ts src/main/vault/note-sync.test.ts src/main/database/migrate.test.ts src/main/sync/item-handlers/note-handler-binary.test.tspnpm --filter @memry/desktop exec vitest run --config config/vitest.config.ts --project shared ../../packages/domain-notes/src/commands.test.ts ../../packages/db-schema/src/data-schema.test.tsChecklist