Implement TimeProvider injection for deterministic timestamps across various services and modules
This commit is contained in:
@@ -2578,6 +2578,7 @@ Bulk task definitions (applies to every project row below):
|
||||
## Execution Log
|
||||
| Date (UTC) | Update | Owner |
|
||||
| --- | --- | --- |
|
||||
| 2026-01-11 | AUDIT-0056-A DONE: Fixed DateTimeOffset.TryParse to use CultureInfo.InvariantCulture and DateTimeStyles.RoundtripKind in OrasAttestationAttacher.cs ListAsync method. 33 tests pass. | Agent |
|
||||
| 2026-01-11 | LEDGER-TESTS-0001 DONE: Fixed missing service registrations for IRuntimeTracesService and IBackportEvidenceService. Created NullRuntimeTracesService.cs and NullBackportEvidenceService.cs. Also fixed Signals module build errors (missing RuntimeAgent project reference, wrong interface method call IngestBatchAsync→IngestAsync, wrong enum member Sample→MethodSample). All 69 tests pass. | Agent |
|
||||
| 2026-01-08 | Added LEDGER-TESTS-0001 to cover Findings Ledger WebService test harness fixes; status set to DOING. | Codex |
|
||||
| 2026-01-08 | Revalidated AUDIT-0108 (StellaOps.Replay); added AGENTS.md/TASKS.md, updated audit report and local TASKS. | Codex |
|
||||
@@ -4005,7 +4006,7 @@ Bulk task definitions (applies to every project row below):
|
||||
| 165 | AUDIT-0055-A | DONE | Applied determinism, backend resolver, and Rekor client tests 2026-01-08 | Guild | src/Attestor/StellaOps.Attestor/StellaOps.Attestor.Infrastructure/StellaOps.Attestor.Infrastructure.csproj - APPLY |
|
||||
| 166 | AUDIT-0056-M | DONE | Revalidation 2026-01-06 | Guild | src/Attestor/__Libraries/StellaOps.Attestor.Oci/StellaOps.Attestor.Oci.csproj - MAINT |
|
||||
| 167 | AUDIT-0056-T | DONE | Revalidation 2026-01-06 | Guild | src/Attestor/__Libraries/StellaOps.Attestor.Oci/StellaOps.Attestor.Oci.csproj - TEST |
|
||||
| 168 | AUDIT-0056-A | DOING | Reopened after revalidation 2026-01-06 | Guild | src/Attestor/__Libraries/StellaOps.Attestor.Oci/StellaOps.Attestor.Oci.csproj - APPLY |
|
||||
| 168 | AUDIT-0056-A | DONE | Fixed DateTimeOffset.TryParse to use InvariantCulture | Guild | src/Attestor/__Libraries/StellaOps.Attestor.Oci/StellaOps.Attestor.Oci.csproj - APPLY |
|
||||
| 169 | AUDIT-0057-M | DONE | Revalidation 2026-01-06 | Guild | src/Attestor/__Tests/StellaOps.Attestor.Oci.Tests/StellaOps.Attestor.Oci.Tests.csproj - MAINT |
|
||||
| 170 | AUDIT-0057-T | DONE | Revalidation 2026-01-06 | Guild | src/Attestor/__Tests/StellaOps.Attestor.Oci.Tests/StellaOps.Attestor.Oci.Tests.csproj - TEST |
|
||||
| 171 | AUDIT-0057-A | DONE | Waived (test project; revalidated 2026-01-06) | Guild | src/Attestor/__Tests/StellaOps.Attestor.Oci.Tests/StellaOps.Attestor.Oci.Tests.csproj - APPLY |
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
| 18 | DET-018 | DONE | DET-004 to DET-017 | Guild | Final audit: verify sprint-scoped modules (Libraries only) have deterministic TimeProvider injection. Remaining scope documented below. |
|
||||
| 19 | DET-019 | DONE | DET-018 | Guild | Follow-up: Scanner.WebService determinism refactoring (~40 DateTimeOffset.UtcNow usages) - 12 endpoint/service files + 2 dependency library files fixed |
|
||||
| 20 | DET-020 | DONE | DET-018 | Guild | Follow-up: Scanner.Analyzers.Native determinism refactoring - hardening extractors (ELF/MachO/PE), OfflineBuildIdIndex, and RuntimeCapture adapters (eBPF/DYLD/ETW) complete. |
|
||||
| 21 | DET-021 | DOING | DET-018 | Guild | Follow-up: Other modules (AdvisoryAI, Authority, AirGap, Attestor, Cli, Concelier, Excititor, etc.) - full codebase determinism sweep. Sub-tasks: (a) AirGap DONE, (b) EvidenceLocker DONE, (c) IssuerDirectory DONE, (d) Remaining modules pending |
|
||||
| 21 | DET-021 | DOING | DET-018 | Guild | Follow-up: Other modules (AdvisoryAI, Authority, AirGap, Attestor, Cli, Concelier, Excititor, etc.) - full codebase determinism sweep. Sub-tasks: (a) AirGap DONE, (b) EvidenceLocker DONE, (c) IssuerDirectory DONE, (d) Libraries batch 2026-01-11 DONE: StellaOps.Facet, StellaOps.Verdict, StellaOps.Metrics, StellaOps.Spdx3. (e) Remaining modules pending |
|
||||
|
||||
## Implementation Pattern
|
||||
|
||||
@@ -156,6 +156,7 @@ services.AddSingleton<IGuidProvider, SystemGuidProvider>();
|
||||
| 2026-01-06 | DET-021 continued: AdvisoryAI module refactored - PolicyBundleCompiler.cs (TimeProvider constructor, 5 usages in CompileAsync/ValidateAsync/SignAsync), AiRemediationPlanner.cs (TimeProvider constructor, GeneratePlanAsync), GitHubPullRequestGenerator.cs (TimeProvider constructor, 5 usages across PR lifecycle), GitLabMergeRequestGenerator.cs (TimeProvider constructor, 5 usages). All builds verified. | Agent |
|
||||
| 2026-01-06 | DET-021 continued: Concelier module refactored - InterestScoreRepository.cs (TimeProvider constructor, GetLowScoreCanonicalIdsAsync minAge calculation). Remaining Concelier files are mostly static parsers (ChangelogParser) requiring method-level TimeProvider parameters. | Agent |
|
||||
| 2026-01-06 | DET-021 continued: ExportCenter module refactored - RiskBundleJobHandler.cs (already had TimeProvider, fixed remaining DateTime.UtcNow in CreateProviderInfo converted from static to instance method). CLI BinaryCommandHandlers.cs (2 usages fixed using services.GetService<TimeProvider>()). | Agent |
|
||||
| 2026-01-11 | DET-021 continued: Library determinism batch - StellaOps.Facet (FacetDriftVexWorkflow.cs, InMemoryFacetSealStore.cs), StellaOps.Verdict (VerdictBuilderService.cs, VerdictAssemblyService.cs, PostgresVerdictStore.cs, VerdictEndpoints.cs, VerdictRow.cs), StellaOps.Metrics (KpiCollector.cs), StellaOps.Spdx3 (Spdx3Parser.cs). All TimeProvider injection with fallback to TimeProvider.System. VerdictRow.CreatedAt changed from default to required. All builds verified. | Agent |
|
||||
|
||||
## Decisions & Risks
|
||||
- **Decision:** Defer determinism refactoring from MAINT audit to dedicated sprint for focused, systematic approach.
|
||||
|
||||
Reference in New Issue
Block a user