Files
lore-engine-poc-v3/requirements.txt
Lore Engine Dev 7d1cdb9e36 slice 5.3: Neo4jGraph skeleton + docker-gated round-trip tests
- Add neo4j>=5.0 to requirements.txt
- New lore_engine_poc/neo4j_graph.py: Neo4jGraph class implementing
  the GraphBackend Protocol skeleton (reified :Relation shape per
  ADR 0009):
    * Lifecycle: __init__, close, ensure_schema (idempotent
      constraints on Entity.name_lower, LoreSource.path,
      Relation.edge_id)
    * Reads (slice 5.3 ships minimum; 5.4 fills the rest):
      by_name, all_names, all_entity_types, entities_of_type,
      lore_source, find_edge_by_id (returns None), edges_for_* (stub)
    * Writes (slice 5.3 ships entity/source helpers; 5.5 fills rest):
      add_entity_of_type (SET n:Label for dynamic label, no APOC
      dep on community image), register_name, register_alias (Alias
      node + CANONICAL_OF edge), add_lore_source; add/replace_edge/
      remove_entity/remove_entity_of_type/rename_entity (stubs)
- _sanitize_label() helper: strip non-[A-Za-z0-9_] from dynamic
  labels so SET n:Label is safe to interpolate
- 12 docker-gated tests in test_neo4j_graph.py: connects, schema
  idempotent, add_node creates typed node, upsert semantics,
  case-insensitive by_name, alias fallback, dynamic label, find by
  id returns None, driver reconnect, HTTP probe, bolt protocol v5,
  module-scoped fixture reuses driver
- Test gating: skipif(!HAS_DOCKER || !neo4j reachable); module
  fixture reuses one driver; function-scoped fixture wipes state
  per test so ordering doesn't matter
- Used neo4j GraphDatabase with auth=none (loopback only, per
  the plan's NEO4J_AUTH=none)

Suite: 584 -> 596 passed (+12 new tests, 559 baseline preserved)
2026-06-18 21:45:27 -04:00

10 lines
175 B
Plaintext

cognee>=0.1.0
# Slice 11 — Streamable HTTP transport
starlette>=0.40
uvicorn>=0.30
httpx>=0.27
# Slice 5 — Neo4j 5 graph backend (PEP 544 Protocol + adapter)
neo4j>=5.0