Tags are sorted and deduplicated by title_key in the migration and in
write_page_row (remote ops included). The migration runs in one transaction,
rebuilds page_tags once and repairs malformed tags/types values.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tags no longer have pages. A page has at most one type, which implies a
tag of the same name. Tags are stored sorted. Adds rename_tag and
remove_tag. Schema v6 turns tag pages into notes and trims types to the
first one. History exports synapse-type:: and reads the old forms.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Hubs and templates are page kinds; tags are pages of kind tag linked by a TAGGED
edge; types are plain names on the page. Schema v5. Snapshots carry
synapse-kind/tags/types. Also adapts search, import and server tests.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- page_tree shows orphans and parent cycles (from concurrent moves) as roots;
descendants CTE and move_block ancestor walk are cycle-safe
- title conflicts compare titles only (not aliases), journals keep their title,
and loser suffixes use the random id tail so they cannot collide
- aliases get an HLC and tombstones (last-writer-wins)
- remote page deletes cascade to blocks; LastChildOf validates the parent
- reject empty and date-shaped titles on create/rename; ensure_page redirects
dates to journals; rename rewrites refs inside block properties
- single-row writes run inside savepoints; invalid remote asset hashes are
ignored and never reach blob paths; HLC counter cannot overflow its width
- busy_timeout for multi-connection use; schema v2 migration
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Importer runs its write phase in one transaction (replaces the
synchronous=OFF workaround); the FFI journals feed uses journals_before
instead of walking back one day per query.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Domain model, SQLite graph store, link parser, journals chained in time,
page origin/activity anchors, weighted synapses with spreading activation,
content-addressed blob store and HLC op log with LWW remote apply.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>