Auto: ablegacy-12 — auto-demote on comm failure

Closes #255
This commit is contained in:
Joseph Doherty
2026-04-26 08:44:53 -04:00
parent 8ee65a75d2
commit 1e3053c0d8
18 changed files with 1160 additions and 31 deletions

View File

@@ -38,4 +38,16 @@ public sealed record HostStatusChangedEventArgs(
HostState NewState);
/// <summary>Host lifecycle state. Generalization of Galaxy's Platform/Engine ScanState.</summary>
public enum HostState { Unknown, Running, Stopped, Faulted }
/// <remarks>
/// <para>
/// <see cref="Demoted"/> (PR ablegacy-12 / #255) is a soft-stopped state used by drivers
/// that auto-throttle a host after N consecutive comm failures. Reads are short-circuited
/// with <c>BadCommunicationError</c> for a configurable cool-down window so one slow PLC
/// doesn't starve faster peers sharing the same driver. Demoted is *not* the same as
/// <see cref="Stopped"/> (which means "probe says it's down") nor <see cref="Faulted"/>
/// (which means "the driver itself is broken"); it's a deliberate driver-side back-off.
/// Consumers that don't recognize <c>Demoted</c> can safely treat it as <c>Stopped</c>
/// (see <c>HostStatusPublisher.MapState</c>).
/// </para>
/// </remarks>
public enum HostState { Unknown, Running, Stopped, Faulted, Demoted }