You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Follow-up: expose Trace seam for config-loader diagnostics (dime T2) #245
Dime Ultrareview cycle-1 on PR #241 (fix/device-validation-level-hardening), tracked finding T2 — surfaced by the code-review agent.
Finding
PR #241 replaces the four silent `catch { }` blocks in `AgentConfiguration.ReadJson` / `ReadJson(Type,…)` / `ReadYaml` / `ReadYaml(Type,…)` with:
A rethrow of `ArgumentOutOfRangeException` wrapped as `ArgumentException` with the configuration path attached (bad-enum config surfaces the actionable setter message).
A `System.Diagnostics.Trace.TraceError($"Config load failed: {configurationPath}: {ex.Message}")` call before the null-return preservation path.
The Trace call surfaces the diagnostic to any `TraceListener` a host has registered — but that's a global-registry side effect the tests can only observe by installing a listener during `[SetUp]`. A test-friendly `ILogger` / `Action<string, Exception>` seam would let unit tests assert the diagnostic surface without touching the global `Trace` machinery.
Rationale for defer
Adding a logging seam is API-surface-shaped work — it changes the `AgentConfiguration` public shape (or introduces a new `static Action<string, Exception>? OnConfigLoadFailure` static delegate seam). That's a decision the maintainer should weigh independently of the H2 swallow fix; it does not gate landing the swallow removal.
Activity