fix(focas): fail-fast at init on unimplemented backend (operator footgun)

Add IFocasClientFactory.EnsureUsable() — a config-time probe called by
FocasDriver.InitializeAsync before any background loops start. The
UnimplementedFocasClientFactory throws NotSupportedException immediately
(faulting the driver at init), eliminating the footgun where a driver on
the 'unimplemented' backend appeared Healthy then failed every read/write/
subscribe silently. WireFocasClientFactory and FakeFocasClientFactory are
no-ops. Backstop Create() throw remains in place.
This commit is contained in:
Joseph Doherty
2026-06-16 05:24:41 -04:00
parent bd8fee610b
commit 5c5aaef609
5 changed files with 71 additions and 3 deletions
@@ -169,6 +169,9 @@ internal sealed class FakeFocasClientFactory : IFocasClientFactory
/// <summary>Gets or sets a customization function for creating clients.</summary>
public Func<FakeFocasClient>? Customise { get; set; }
/// <summary>No-op usability probe — the fake factory is always usable.</summary>
public void EnsureUsable() { }
/// <summary>Creates a fake FOCAS client.</summary>
public IFocasClient Create()
{