Integrate LadybugDB behind typed schema and repository adapters #5

Closed
opened 2026-09-03 14:22:17 +00:00 by JayKobe6k · 0 comments
Owner

Goal

Add LadybugDB as the indexing backend while keeping all database and Cypher details behind ClariTree-owned typed repository interfaces.

Scope

  • Select and pin the LadybugDB Rust/native dependency in Cargo and Nix; preserve Linux runtime support and Windows as a first-class target.
  • Add connection/database lifecycle handling and actionable typed adapter errors.
  • Define explicit, versioned schema migration infrastructure.
  • Initially model index, project, revision, translation-unit, source-file, and compilation-command metadata needed by the catalog and indexing lifecycle.
  • Add explicit graph node/relationship mappings as source facts and lineage facts land; do not introduce a universal entity node or generic string-kind relationship.
  • Keep raw Cypher, Ladybug values, and row decoding entirely within the adapter and convert rows immediately to typed records.
  • Support staging and atomic activation of a completed index revision.

Required documentation

For every node and relationship, document its type, direction, endpoint types, required properties, identity, source-anchor behavior, ownership/provenance, and traversal role. Keep domain types, schema, migrations, documentation, and mapping tests synchronized.

Acceptance criteria

  • A repository conformance suite runs against isolated temporary databases.
  • Migration tests cover a new database, current schema reopening, and unsupported schema versions.
  • Every persisted node and relationship has typed parameter/result records and mapping tests.
  • No public frontend or application API accepts Cypher or untyped property dictionaries.
  • Compiler, Clippy, rustdoc, test, and Windows cross-compilation checks remain warning-free.

Dependencies

Depends on #2 and #4 for repository contracts and durable identities.

## Goal Add LadybugDB as the indexing backend while keeping all database and Cypher details behind ClariTree-owned typed repository interfaces. ## Scope - Select and pin the LadybugDB Rust/native dependency in Cargo and Nix; preserve Linux runtime support and Windows as a first-class target. - Add connection/database lifecycle handling and actionable typed adapter errors. - Define explicit, versioned schema migration infrastructure. - Initially model index, project, revision, translation-unit, source-file, and compilation-command metadata needed by the catalog and indexing lifecycle. - Add explicit graph node/relationship mappings as source facts and lineage facts land; do not introduce a universal entity node or generic string-kind relationship. - Keep raw Cypher, Ladybug values, and row decoding entirely within the adapter and convert rows immediately to typed records. - Support staging and atomic activation of a completed index revision. ## Required documentation For every node and relationship, document its type, direction, endpoint types, required properties, identity, source-anchor behavior, ownership/provenance, and traversal role. Keep domain types, schema, migrations, documentation, and mapping tests synchronized. ## Acceptance criteria - A repository conformance suite runs against isolated temporary databases. - Migration tests cover a new database, current schema reopening, and unsupported schema versions. - Every persisted node and relationship has typed parameter/result records and mapping tests. - No public frontend or application API accepts Cypher or untyped property dictionaries. - Compiler, Clippy, rustdoc, test, and Windows cross-compilation checks remain warning-free. ## Dependencies Depends on #2 and #4 for repository contracts and durable identities.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
JayKobe6k/ClariTree#5
No description provided.