fix(multivalue): NJ-3/NJ-4/NJ-5 review fixes

- NJ-3: widen per-row catch to Exception (an STJ encode failure can't abort startup); drop dead null-guard already excluded by the SQL filter
- NJ-4: capture logger/instanceName in locals for the fire-and-forget normalize continuation (match the sibling pattern in this actor)
- NJ-5: emit a warn-log when a malformed List value is imported verbatim; thread an optional ILogger<BundleImporter> to the sync re-import site
This commit is contained in:
Joseph Doherty
2026-06-16 18:25:42 -04:00
parent f4b101b532
commit feeae1371e
4 changed files with 32 additions and 19 deletions
@@ -966,10 +966,12 @@ public class InstanceActor : ReceiveActor
if (native != kvp.Value) // stored value was old-form → normalize on disk
{
var key = kvp.Key;
_storage.SetStaticOverrideAsync(_instanceUniqueName, key, native!)
.ContinueWith(t => _logger.LogWarning(t.Exception?.GetBaseException(),
var logger = _logger;
var instanceName = _instanceUniqueName;
_storage.SetStaticOverrideAsync(instanceName, key, native!)
.ContinueWith(t => logger.LogWarning(t.Exception?.GetBaseException(),
"Failed to normalize static override {Instance}.{Attr} to native JSON",
_instanceUniqueName, key),
instanceName, key),
TaskContinuationOptions.OnlyOnFaulted);
}
}