fix(uns): #978 one UNS name authority and a script-reference gate — an illegal VirtualTag name or override is refused in the editor and at publish, and an in-use script cannot be deleted
- V3NodeIds.ValidateSegment is the single rule Uns()/UnsChild() enforce; the VirtualTag modal ([UnsLeafName]), UnsTreeService (VirtualTag create/update, SetReferenceOverrideAsync) and the deploy gate (VirtualTagNameInvalid, UnsEffectiveNameInvalid) all call it (C-1, C-4). - Effective name is stated once (EquipmentReferenceMap.EffectiveName): an empty override falls back to the tag name in the gate and the Monaco catalog, as at both compose seams (C-4). - UnsSegment patterns anchored \A..\z, so a trailing newline is rejected (C-7). - VirtualTagScriptNotFound / ScriptedAlarmScriptNotFound deploy-gate rules; ScriptEdit refuses to delete a script used by a VirtualTag, ScriptedAlarm or Calculation tag and names them (C-2). - R-5 backstop: VirtualTagHostActor skips (Error log) a plan whose NodeId cannot be built instead of crashing on every apply; AddressSpaceApplier counts it as a failed node instead of aborting the VirtualTag materialise pass.
This commit is contained in:
@@ -144,7 +144,8 @@ public sealed class ScriptTagCatalog(
|
||||
var names = new HashSet<string>(StringComparer.Ordinal);
|
||||
foreach (var r in refs)
|
||||
{
|
||||
var eff = r.DisplayNameOverride ?? (tagNameById.TryGetValue(r.TagId, out var n) ? n : null);
|
||||
var eff = EquipmentReferenceMap.EffectiveName(
|
||||
r.DisplayNameOverride, tagNameById.TryGetValue(r.TagId, out var n) ? n : null);
|
||||
if (!string.IsNullOrEmpty(eff)) names.Add(eff!);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user