Files
git.stella-ops.org/src/Graph/README.md
master 6592cdcc9b refactor(graph): absorb Cartographer into graph-api + wire Graph Indexer
- Wire Graph Indexer library + Persistence into graph-api (csproj refs + DI)
- Add build/overlay endpoints matching Scheduler HTTP contracts
  (POST/GET /api/graphs/builds, POST/GET /api/graphs/overlays)
- Add PostgresGraphRepository for reading from graph.graph_nodes/edges
- Register SBOM ingest, analytics, change-stream, and inspector pipelines
- Comment out Cartographer container in compose (empty shell, Slot 21)
- Add cartographer.stella-ops.local as backwards-compat alias on graph-api
- Update Scheduler config to target graph.stella-ops.local
- Update services-matrix.env, hosts file, port-registry, module-matrix
- Update component-map, architecture docs, Scanner/Graph READMEs
- Eliminates 1 container (stellaops-cartographer)

All 133 existing tests pass (77 Api + 37 Indexer + 19 Core).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 15:48:18 +03:00

30 lines
1.8 KiB
Markdown

# Graph
**Container(s):** stellaops-graph-api
**Slot:** 20 | **Port:** 8080 | **Consumer Group:** graph
**Resource Tier:** medium
> **Note:** Cartographer (Slot 21) has been merged into graph-api. The `cartographer.stella-ops.local`
> hostname is now a network alias on the graph-api container for backwards compatibility.
> The Scheduler's `Cartographer.BaseAddress` config now points to `http://graph.stella-ops.local`.
## Purpose
The Graph API service provides a dependency and service graph for the Stella Ops platform. It supports graph search, path queries, diff computation, lineage tracking, overlay projections, saved views, and export functionality. It serves as the central topology store for understanding relationships between components, images, and services.
It also hosts the Graph Indexer pipeline (SBOM ingestion, analytics, incremental change-stream processing) and the Cartographer-compatible build/overlay endpoints consumed by the Scheduler Worker.
## API Surface
- `graph` (via Router) — graph search, path queries, diff, lineage, overlay, saved views, export (GEXF/DOT/JSON), edge metadata, audit log, rate-limited access
- `/api/graphs/builds` (POST, GET) — Cartographer-compatible build endpoints (Scheduler contract)
- `/api/graphs/overlays` (POST, GET) — Cartographer-compatible overlay endpoints (Scheduler contract)
## Storage
PostgreSQL (via `Postgres:Graph` for saved views and graph data); falls back to in-memory repository when no Postgres connection is configured.
Graph Indexer Persistence writes to `graph.graph_nodes` and `graph.graph_edges` tables.
## Background Workers
- `GraphSavedViewsMigrationHostedService` — migrates saved views on startup
- `GraphAnalyticsHostedService` — runs graph analytics pipeline (centrality, clustering)
- `GraphChangeStreamProcessor` — processes incremental graph change events