Files
git.stella-ops.org/docs/features/checked/evidencelocker/evidence-re-index-tooling.md
2026-02-14 09:11:48 +02:00

30 lines
2.2 KiB
Markdown

# Evidence Re-Index Tooling (CLI)
## Module
EvidenceLocker
## Status
IMPLEMENTED
## Description
CLI commands for evidence store maintenance including reindexing (`stella evidence reindex`), chain-of-custody verification (`stella evidence verify-continuity`), and evidence migration between storage backends.
## Implementation Details
- **Modules**: `src/EvidenceLocker/StellaOps.EvidenceLocker/StellaOps.EvidenceLocker.Infrastructure/Reindexing/`, `src/EvidenceLocker/StellaOps.EvidenceLocker/StellaOps.EvidenceLocker.Core/Reindexing/`
- **Key Classes**:
- `EvidenceReindexService` (`src/EvidenceLocker/StellaOps.EvidenceLocker/StellaOps.EvidenceLocker.Infrastructure/Reindexing/EvidenceReindexService.cs`) - rebuilds evidence indexes from object store contents
- `EvidenceBundleRepository` (`src/EvidenceLocker/StellaOps.EvidenceLocker/StellaOps.EvidenceLocker.Infrastructure/Repositories/EvidenceBundleRepository.cs`) - repository layer for re-indexed bundles
- `StorageKeyGenerator` (`src/EvidenceLocker/StellaOps.EvidenceLocker/StellaOps.EvidenceLocker.Infrastructure/Storage/StorageKeyGenerator.cs`) - generates consistent storage keys for evidence items
- `FileSystemEvidenceObjectStore` (`src/EvidenceLocker/StellaOps.EvidenceLocker/StellaOps.EvidenceLocker.Infrastructure/Storage/FileSystemEvidenceObjectStore.cs`) - filesystem storage backend
- `S3EvidenceObjectStore` (`src/EvidenceLocker/StellaOps.EvidenceLocker/StellaOps.EvidenceLocker.Infrastructure/Storage/S3EvidenceObjectStore.cs`) - S3 storage backend for migration
- **Interfaces**: `IEvidenceReindexService`
- **Source**: SPRINT_20260112_018_EVIDENCE_reindex_tooling.md
## E2E Test Plan
- [ ] Run `EvidenceReindexService` and verify it rebuilds the evidence index from object store contents
- [ ] Verify reindexing preserves all evidence bundle metadata and content-addressed IDs
- [ ] Verify chain-of-custody verification detects a gap in the evidence timeline
- [ ] Migrate evidence from `FileSystemEvidenceObjectStore` to `S3EvidenceObjectStore` and verify all bundles are accessible
- [ ] Verify `StorageKeyGenerator` produces consistent keys before and after reindexing
- [ ] Verify reindexing handles corrupt or missing files gracefully with error reporting