semi implemented and features implemented save checkpoint

This commit is contained in:
master
2026-02-08 18:00:49 +02:00
parent 04360dff63
commit 1bf6bbf395
20895 changed files with 716795 additions and 64 deletions

View File

@@ -0,0 +1,31 @@
# Explanation Graph (Verdict -> Reasoning -> Evidence)
## Module
Attestor
## Status
IMPLEMENTED
## Description
Proof graph provides the structural backbone linking verdicts to reasoning paths to evidence nodes. Edge explanations in ReachGraph and explainability KPIs in Metrics provide additional layers.
## Implementation Details
- **Proof Graph**: `src/Attestor/__Libraries/StellaOps.Attestor.ProofChain/Graph/InMemoryProofGraphService.cs` (with `.Mutation`, `.Queries`, `.Subgraph`) -- graph linking Verdict -> Reasoning -> Evidence nodes.
- **Node Types**: `ProofGraphNodeType.cs` -- Evidence, Verdict, Policy, Artifact node types.
- **Edge Types**: `ProofGraphEdgeType.cs` -- relationship types (DependsOn, Produces, etc.).
- **Reasoning Predicate**: `Predicates/ReasoningPredicate.cs` -- reasoning node content. `Statements/ReasoningStatement.cs` -- in-toto wrapper.
- **Evidence Predicate**: `Predicates/EvidencePredicate.cs` -- evidence node content. `Statements/EvidenceStatement.cs` -- in-toto wrapper.
- **Verdict Summary**: `Predicates/VerdictSummary.cs` -- verdict node content.
- **Reasoning ID**: `Identifiers/ReasoningId.cs` -- content-addressed ID for reasoning nodes.
- **Evidence ID**: `Identifiers/EvidenceId.cs` -- content-addressed ID for evidence nodes.
- **Graph Path**: `Graph/ProofGraphPath.cs` -- traversal path through explanation graph.
- **Subgraph Extraction**: `Graph/ProofGraphSubgraph.cs` -- extract relevant subgraph for a specific verdict.
## E2E Test Plan
- [ ] Create a 3-layer explanation graph: Verdict -> Reasoning -> Evidence and verify traversal from verdict to evidence
- [ ] Query the graph for all reasoning nodes linked to a specific verdict and verify correct results
- [ ] Extract a subgraph rooted at a verdict and verify it contains all reasoning and evidence descendants
- [ ] Create a verdict with multiple reasoning paths and verify both paths are traversable
- [ ] Verify `ReasoningId` content-addressing: same reasoning content produces the same ID
- [ ] Create a `ProofGraphPath` from verdict to evidence and verify path length and node types
- [ ] Add a new evidence node to an existing reasoning node and verify the graph updates correctly