Skip to content

graph-lite: node and edge model with opaque type tags #2

Description

@sebyx07

From plan slice 01 — data model.

Add nodes and edges to an in-memory store: a node is a stable id, an opaque type tag, and a property map; an edge is directed, typed, and carries properties of its own.

Done when

  • Add/remove nodes and edges; ids are stable and never reused after a delete.
  • Type tags are compared, never interpreted — no registry, no reserved names, no validation.
  • Removing a node cannot leave a readable edge pointing at it. A dangling edge is a corrupt answer, not a missing one — test that explicitly.
  • Properties live separately from adjacency data, so a traversal does not pull property bytes into cache lines it never reads.
  • Suite graph_lite_model_test, registered with ulsp_add_test.

Constraints

  • Nothing in graph-lite/ may name a consumer concept, including inside CamelCase identifiers. scripts/lint/graph-lite-vocabulary.ts enforces it.
  • Id stability across a save/load cycle is a one-way door — callers will persist ids the moment the feature exists. Decide it here, deliberately.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions