fix(options): bind + validate OperationTrackingOptions; register the site IOperationTrackingStore that two comments claimed AddSiteRuntime provides (plan R2-08 T8, arch-review 08r2 NF4)
VERIFY-THEN-FIX: the plan-authoring discovery is CONFIRMED. No code anywhere in src/ registered IOperationTrackingStore in DI, yet AkkaHostedService and AuditLog SCE both comment that AddSiteRuntime provides it. Every consumer resolved it via GetService (null-tolerant) and silently ran degraded: cached-drain scheduler never armed, PullSiteCalls reconciliation seam never wired, Tracking.Status degraded to audit-only. This is a FUNCTIONAL FIX riding the hygiene plan: AddSiteRuntime now registers the store (site-only), so site-local cached-call tracking runs in its intended mode. OperationTrackingOptions is now bound + eagerly validated in the Host site-options block.
This commit is contained in:
@@ -60,6 +60,19 @@ public static class ServiceCollectionExtensions
|
||||
});
|
||||
services.AddSingleton<ISiteStreamSubscriber>(sp => sp.GetRequiredService<SiteStreamManager>());
|
||||
|
||||
// Site-local cached-operation tracking store — the SQLite source of truth
|
||||
// that Tracking.Status(TrackedOperationId) reads and the cached-call telemetry
|
||||
// forwarder writes. Registered HERE (site-only) so the two comments that claim
|
||||
// "the operational tracking store is registered by AddSiteRuntime" are true
|
||||
// again (AuditLog SCE + AkkaHostedService). Before this (arch-review 08 round 2
|
||||
// NF4/T8) it had no DI registration anywhere in src/, so every consumer resolved
|
||||
// it as null and silently ran degraded (no cached-drain, no PullSiteCalls
|
||||
// reconciliation, Tracking.Status audit-only). Central roots never call
|
||||
// AddSiteRuntime, so this stays absent on central — matching the SITE-ONLY
|
||||
// contract. OperationTrackingOptions is bound + validated by the Host's
|
||||
// SiteServiceRegistration site-options block.
|
||||
services.AddSingleton<Commons.Interfaces.IOperationTrackingStore, Tracking.OperationTrackingStore>();
|
||||
|
||||
// Site-local repository implementations backed by SQLite
|
||||
services.AddScoped<IExternalSystemRepository, SiteExternalSystemRepository>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user