feat(instance): native-alarm-source-override CSV bulk import (deferred #12) + doc fixes
Closes the operator parity gap the deferred-work register tracked as #12: native alarm source overrides could only be set one-at-a-time, while attribute overrides had a CSV bulk path. Adds an all-or-nothing CSV import for native sources. - Commons: extract the RFC-4180 line splitter into a shared CsvLineSplitter (refactor OverrideCsvParser onto it — no behavior change, pinned by its tests); new NativeAlarmSourceOverrideCsvParser (header SourceName,Connection, SourceReference,Filter; blank = inherited). - Commons: NativeAlarmSourceOverrideEntry + bulk SetInstanceNativeAlarmSource- OverridesCommand (auto-registered via the reflection command registry). - ManagementService: Deployer-gated handler — flattens once, validates every source resolves + is unlocked + no duplicates up front, then upserts the whole batch under a single SaveChanges (true all-or-nothing txn). Added to the frozen authorization matrix; dispatch-coverage guard passes. - CLI: `instance native-alarm-source import --instance-id --file` (parity with `instance import-overrides`) + README. - Tests: native parser (Commons), CLI parse/entry mapping, 3 bulk-handler tests (happy path single-commit, locked-source reject, unresolved-source reject). Also corrects a stale XML-doc line in ScriptRuntimeContext (WaitForAttribute quality-gated mode is shipped, not "planned") and updates the deferred-work register: marks #7/#13/#15/#16/#20 verified-resolved, #12 as CLI/API-shipped with only the Central UI upload affordance still pending. Claude-Session: https://claude.ai/code/session_01MtdgwpEeCUn6cUA5f1LMPj
This commit is contained in:
@@ -62,3 +62,26 @@ public record DeleteInstanceNativeAlarmSourceOverrideCommand(
|
||||
string SourceCanonicalName);
|
||||
|
||||
public record ListInstanceNativeAlarmSourceOverridesCommand(int InstanceId);
|
||||
|
||||
/// <summary>
|
||||
/// One entry in a bulk native-alarm-source-override apply: the source binding's
|
||||
/// canonical name plus the three optional retarget fields (null keeps the inherited
|
||||
/// value). Mirrors <see cref="SetInstanceNativeAlarmSourceOverrideCommand"/>'s fields
|
||||
/// for a single source.
|
||||
/// </summary>
|
||||
public record NativeAlarmSourceOverrideEntry(
|
||||
string SourceCanonicalName,
|
||||
string? ConnectionNameOverride,
|
||||
string? SourceReferenceOverride,
|
||||
string? ConditionFilterOverride);
|
||||
|
||||
/// <summary>
|
||||
/// Bulk, all-or-nothing apply of per-instance native-alarm-source overrides — the
|
||||
/// native-source parity analogue of <see cref="SetInstanceOverridesCommand"/>. Backs
|
||||
/// the CLI <c>instance native-alarm-source import --file</c> CSV path. Every entry's
|
||||
/// source must resolve for the instance and be unlocked; if any entry is invalid the
|
||||
/// whole batch is rejected before any write.
|
||||
/// </summary>
|
||||
public record SetInstanceNativeAlarmSourceOverridesCommand(
|
||||
int InstanceId,
|
||||
IReadOnlyList<NativeAlarmSourceOverrideEntry> Overrides);
|
||||
|
||||
Reference in New Issue
Block a user