qa(advisoryai): verify deterministic replay feature

This commit is contained in:
master
2026-02-11 14:28:58 +02:00
parent 4424848283
commit 33360e8d9d
14 changed files with 574 additions and 8 deletions

View File

@@ -1,31 +0,0 @@
# Deterministic AI Artifact Replay
## Module
AdvisoryAI
## Status
IMPLEMENTED
## Description
Deterministic replay infrastructure for AI artifacts including replay manifests, prompt template versioning, and input artifact hashing for reproducible AI outputs.
## Implementation Details
- **Modules**: `src/AdvisoryAi/StellaOps.AdvisoryAI/Replay/`, `src/Attestor/__Libraries/StellaOps.Attestor.ProofChain/Replay/`
- **Key Classes**:
- `AIArtifactReplayer` (`src/AdvisoryAi/StellaOps.AdvisoryAI/Replay/AIArtifactReplayer.cs`) - replays AI artifacts with deterministic inputs for verification
- `ReplayInputArtifact` (`src/Attestor/__Libraries/StellaOps.Attestor.ProofChain/Replay/ReplayInputArtifact.cs`) - input artifact model with content-addressed hashing
- `ReplayPromptTemplate` (`src/Attestor/__Libraries/StellaOps.Attestor.ProofChain/Replay/ReplayPromptTemplate.cs`) - versioned prompt templates for replay
- `ReplayResult` (`src/Attestor/__Libraries/StellaOps.Attestor.ProofChain/Replay/ReplayResult.cs`) - replay execution result with comparison data
- `ReplayVerificationResult` (`src/Attestor/__Libraries/StellaOps.Attestor.ProofChain/Replay/ReplayVerificationResult.cs`) - verification of replay output against original
- `ReplayStatus` (`src/Attestor/__Libraries/StellaOps.Attestor.ProofChain/Replay/ReplayStatus.cs`) - replay status tracking
- `DeterministicHashVectorEncoder` (`src/AdvisoryAi/StellaOps.AdvisoryAI/Vectorization/DeterministicHashVectorEncoder.cs`) - deterministic hash-based vector encoding for reproducibility
- **Interfaces**: None (uses concrete replay pipeline)
- **Source**: Feature matrix scan
## E2E Test Plan
- [ ] Record an AI inference run and verify `AIArtifactReplayer` can replay it with identical inputs
- [ ] Verify `ReplayInputArtifact` computes content-addressed hashes that match across replay invocations
- [ ] Verify `ReplayPromptTemplate` versioning: replay with a v1 template produces the same output as the original v1 run
- [ ] Verify `ReplayVerificationResult` detects differences when the replay output diverges from the original
- [ ] Verify `DeterministicHashVectorEncoder` produces identical vectors for identical inputs across runs
- [ ] Verify replay with temperature=0 and fixed seed produces bit-identical outputs for supported providers