refactor(provcache): inject TimeProvider and IGuidProvider for determinism - DET-005

Refactored 8 files across StellaOps.Provcache, StellaOps.Provcache.Postgres, and StellaOps.Provcache.Valkey:

Core Provcache library:
- EvidenceChunker: Added IGuidProvider for ChunkId generation in ChunkAsync/ChunkStreamAsync
- LazyFetchOrchestrator: Added IGuidProvider for ChunkId generation when storing fetched chunks
- MinimalProofExporter: Added IGuidProvider for ChunkId generation in ImportAsync
- FeedEpochAdvancedEvent: Added optional eventId/timestamp parameters to static Create()
- SignerRevokedEvent: Added optional eventId/timestamp parameters to static Create()

Postgres implementation:
- PostgresProvcacheRepository: Added TimeProvider and IGuidProvider for IncrementHitCountAsync,
  GetStatisticsAsync, LogRevocationAsync, and MapToEntity
- PostgresEvidenceChunkRepository: Added TimeProvider and IGuidProvider for GetManifestAsync and MapToEntity

Valkey implementation:
- ValkeyProvcacheStore: Added TimeProvider for TTL calculations in GetAsync, SetAsync, SetManyAsync

All constructors use optional parameters with defaults to system implementations for backward compatibility.
Added StellaOps.Determinism.Abstractions project references where needed.
This commit is contained in:
StellaOps Bot
2026-01-04 15:02:09 +02:00
parent 3098e84de4
commit 99cb2bcb0f
10 changed files with 86 additions and 26 deletions

View File

@@ -25,6 +25,7 @@
<ItemGroup>
<ProjectReference Include="../StellaOps.Canonical.Json/StellaOps.Canonical.Json.csproj" />
<ProjectReference Include="../StellaOps.Cryptography/StellaOps.Cryptography.csproj" />
<ProjectReference Include="../StellaOps.Determinism.Abstractions/StellaOps.Determinism.Abstractions.csproj" />
<ProjectReference Include="../../Router/__Libraries/StellaOps.Messaging/StellaOps.Messaging.csproj" />
<ProjectReference Include="../../Provenance/StellaOps.Provenance.Attestation/StellaOps.Provenance.Attestation.csproj" />
</ItemGroup>