| | | 1 | | namespace InferenceEngine.Core.Diagnostics; |
| | | 2 | | |
| | | 3 | | /// <summary>One step in the provider-selection diagnostic trail.</summary> |
| | | 4 | | public sealed record ProviderDiagnosticCheck |
| | | 5 | | { |
| | | 6 | | /// <summary>Stable dotted identifier (e.g. "rocm.append", "kfd.present"). Tests assert on these.</summary> |
| | 1411 | 7 | | public string Name { get; init; } = string.Empty; |
| | | 8 | | |
| | | 9 | | /// <summary>Human-readable description.</summary> |
| | 952 | 10 | | public string Description { get; init; } = string.Empty; |
| | | 11 | | |
| | | 12 | | /// <summary>Grouping for UI (e.g. "Platform", "Provider", "Fallback", "Session").</summary> |
| | 1112 | 13 | | public string Category { get; init; } = string.Empty; |
| | | 14 | | |
| | 1168 | 15 | | public CheckResult Result { get; init; } |
| | | 16 | | |
| | | 17 | | /// <summary>Detail (exception message, file path tried, etc.). Null when not informative.</summary> |
| | 743 | 18 | | public string? Detail { get; init; } |
| | | 19 | | |
| | | 20 | | /// <summary>0-based ordinal of evaluation; must equal the check's index in the parent list.</summary> |
| | 751 | 21 | | public int Order { get; init; } |
| | | 22 | | |
| | 209 | 23 | | public static ProviderDiagnosticCheck Pass(string name, string description, string category, int order, string? deta |
| | 209 | 24 | | { |
| | 209 | 25 | | Name = name, Description = description, Category = category, Order = order, Result = CheckResult.Passed, Detail |
| | 209 | 26 | | }; |
| | | 27 | | |
| | 48 | 28 | | public static ProviderDiagnosticCheck Fail(string name, string description, string category, int order, string detai |
| | 48 | 29 | | { |
| | 48 | 30 | | Name = name, Description = description, Category = category, Order = order, Result = CheckResult.Failed, Detail |
| | 48 | 31 | | }; |
| | | 32 | | |
| | 113 | 33 | | public static ProviderDiagnosticCheck Skip(string name, string description, string category, int order, string reaso |
| | 113 | 34 | | { |
| | 113 | 35 | | Name = name, Description = description, Category = category, Order = order, Result = CheckResult.Skipped, Detail |
| | 113 | 36 | | }; |
| | | 37 | | } |