Files
git.stella-ops.org/docs/features/checked/attestor/graph-node-edge-model-with-overlays.md
2026-02-14 09:11:48 +02:00

2.8 KiB

Graph Node/Edge Model with Overlays

Module

Attestor

Status

VERIFIED

Description

Graph module has core node/edge model with overlay services, query APIs, and analytics. ProofChain library in Attestor also maintains its own graph node/edge/subgraph types.

Implementation Details

  • Proof Graph Nodes: src/Attestor/__Libraries/StellaOps.Attestor.ProofChain/Graph/ProofGraphNode.cs -- typed graph node (Evidence, Verdict, Policy, Artifact) with content-addressed ID and metadata.
  • Proof Graph Edges: Graph/ProofGraphEdge.cs -- directed edge between nodes with ProofGraphEdgeType.cs (DependsOn, Produces, Validates, etc.).
  • Node Types: Graph/ProofGraphNodeType.cs -- enum: Evidence, Verdict, Policy, Artifact.
  • Edge Types: Graph/ProofGraphEdgeType.cs -- enum defining relationship semantics between graph nodes.
  • In-Memory Graph Service: Graph/InMemoryProofGraphService.cs (with .Mutation, .Queries, .Subgraph) -- full graph service supporting node/edge CRUD, traversal queries, and subgraph extraction.
  • Subgraph Extraction: Graph/ProofGraphSubgraph.cs -- extracts a subgraph rooted at a specific node (e.g., all evidence for a verdict).
  • Graph Paths: Graph/ProofGraphPath.cs -- represents a traversal path through the graph with ordered node sequence.
  • Graph Root Attestor: __Libraries/StellaOps.Attestor.GraphRoot/GraphRootAttestor.cs -- attests Merkle roots over graph structures. IGraphRootAttestor.cs -- interface.
  • Graph Types: __Libraries/StellaOps.Attestor.GraphRoot/GraphType.cs -- supported graph types (ResolvedExecutionGraph, ReachabilityGraph, DependencyGraph, ProofSpine, EvidenceGraph).
  • Tests: __Tests/StellaOps.Attestor.ProofChain.Tests/ -- graph service tests.

E2E Test Plan

  • Create nodes of each ProofGraphNodeType (Evidence, Verdict, Policy, Artifact) via InMemoryProofGraphService and verify they are retrievable by ID
  • Add edges of different ProofGraphEdgeType between nodes and verify edge traversal returns correct neighbors
  • Build a Verdict -> Reasoning -> Evidence chain and extract a ProofGraphSubgraph rooted at the verdict; verify all descendants are included
  • Query ProofGraphPath from a verdict to a leaf evidence node and verify path length and node type ordering
  • Add overlay edges (e.g., cross-linking two evidence nodes) and verify the mutation is reflected in subsequent queries
  • Delete a node via .Mutation and verify cascading edge removal
  • Verify content-addressed node IDs: adding two nodes with identical content produces the same ID

Verification

Check Result
Tier 0 - Source Verification PASS
Tier 1 - Build + Code Review PASS
Tier 2 - Behavioral Verification PASS
Verified Date 2026-02-13
Run ID run-001