2.5 KiB
2.5 KiB
Content-Addressed Node and Edge Identifiers
Module
Attestor
Status
VERIFIED
Description
Content-addressed NodeId and EdgeId records with graph-aware ID generation, addressing the advisory's EdgeId gap.
Implementation Details
- Graph-Aware ID Generation:
src/Attestor/__Libraries/StellaOps.Attestor.ProofChain/Identifiers/ContentAddressedIdGenerator.Graph.cs-- extendsContentAddressedIdGeneratorwith graph-specific ID generation for nodes and edges. - Proof Graph Node:
__Libraries/StellaOps.Attestor.ProofChain/Graph/ProofGraphNode.cs-- node record with content-addressed ID, type (ProofGraphNodeType), and payload. - Proof Graph Edge:
Graph/ProofGraphEdge.cs-- edge record with content-addressed ID, source/target node references, and type (ProofGraphEdgeType). - Node Types:
ProofGraphNodeType.cs-- enum: Evidence, Verdict, Policy, Artifact, etc. - Edge Types:
ProofGraphEdgeType.cs-- enum: DependsOn, Supersedes, Aggregates, Produces, etc. - Graph Path:
ProofGraphPath.cs-- path through the graph for traversal. - Subgraph:
ProofGraphSubgraph.cs-- extracted subgraph with nodes and edges. - Graph Revision:
Identifiers/GraphRevisionId.cs-- content-addressed ID for the entire graph state. - Graph Service:
Graph/InMemoryProofGraphService.cs(with.Mutation,.Queries,.Subgraph) -- implementsIProofGraphServicewith content-addressed node/edge management. - Tests:
__Tests/StellaOps.Attestor.ProofChain.Tests/ContentAddressedIdGeneratorTests.cs
E2E Test Plan
- Create a
ProofGraphNodeand verify its content-addressed ID is generated from node content viaContentAddressedIdGenerator.Graph - Create a
ProofGraphEdgebetween two nodes and verify its edge ID is computed from source, target, and edge type - Add identical node content twice via
InMemoryProofGraphServiceand verify deduplication (same node ID) - Add an edge between two nodes and verify the edge ID is deterministic
- Modify node payload and verify the node ID changes
- Compute
GraphRevisionIdfor a graph state, add a node, recompute, and verify the revision ID changes - Extract a subgraph via
InMemoryProofGraphService.Subgraphand verify all node/edge IDs in the subgraph are content-addressed
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 |