fix(server): propagate watch-list cancellation; doc + test gaps (Server-051..053)

This commit is contained in:
Joseph Doherty
2026-06-15 02:39:11 -04:00
parent 410acc92eb
commit 258e09e0de
6 changed files with 283 additions and 6 deletions
@@ -66,11 +66,13 @@ public sealed class AlarmWatchListResolver : IAlarmWatchListResolver
{
rows = await _repository.GetAlarmAttributesAsync(cancellationToken).ConfigureAwait(false);
}
catch (Exception ex)
catch (Exception ex) when (ex is not OperationCanceledException)
{
// Discovery being unavailable must not crash the resolver: log and
// continue with an empty discovery set. The caller decides what to
// do with the (possibly config-only) result.
// do with the (possibly config-only) result. Cancellation is the one
// exception — an OperationCanceledException propagates per the
// IAlarmWatchListResolver contract so the caller unwinds promptly.
_logger.LogWarning(
ex,
"Galaxy Repository alarm-attribute discovery failed; continuing with configuration-only watch-list.");
@@ -86,7 +86,10 @@ public sealed class AlarmDiscoveryOptions
public string[] IncludeAttributes { get; init; } = Array.Empty<string>();
/// <summary>
/// Attribute paths to exclude from the Repository-derived poll list.
/// Attribute paths to remove from the merged poll list (case-insensitive).
/// The exclude runs after the Repository-derived rows and the explicit
/// <see cref="IncludeAttributes"/> entries are combined, so an exclude that
/// matches an explicit include suppresses it too — excludes win.
/// Ignored when <see cref="UseGalaxyRepository"/> is <c>false</c>.
/// Default empty.
/// </summary>