fix(shared): suppress CS8603 false positive in RuleProvenance.Normalize

netstandard2.0's string.IsNullOrEmpty lacks [NotNullWhen(false)], so the
compiler cannot prove the else branch is non-null. Null-forgiving assert.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Oliver Kieselbach
2026-07-09 15:55:15 +02:00
parent 50295e8304
commit f2fcb7606c
@@ -31,7 +31,9 @@ namespace AutopilotMonitor.Shared.Models
/// <summary>Null/empty is treated as <see cref="Embedded"/> so pre-existing rows (written
/// before this field) keep the historical "binary owns it" semantics.</summary>
public static string Normalize(string? provenance)
=> string.IsNullOrEmpty(provenance) ? Embedded : provenance;
// netstandard2.0's IsNullOrEmpty lacks [NotNullWhen(false)], so the compiler can't
// see that the else branch is non-null (CS8603) — assert it.
=> string.IsNullOrEmpty(provenance) ? Embedded : provenance!;
/// <summary>True when the row is a GitHub-reseeded rule not in the deployed binary's catalog
/// — i.e. exempt from the embedded catalog-based sunset and runtime filter.</summary>