fix(config): #998 deploy gate rejects duplicate ZTag/SAPID, duplicate owned historian tagnames and dangling parent links; NULL-keyed unique indexes enforced; node/cluster edits carry a RowVersion
C-3 ZTag/SAPID uniqueness enforced from the draft (reservation ledger has no writer); UI/doc claim corrected. C-5 HistorianTagnameDuplicate (owned tags, per cluster, case-insensitive; readOnly exempt). C-8 UX_NodeAcl_PrincipalScope / UX_LdapGroupRoleMapping_Group_Cluster unfiltered (migration with duplicate pre-check) + friendly service/page checks. C-9 RowVersion on ClusterNode/ServerCluster, edit pages use it; node delete removes its NodeDeploymentState rows. C-10 DanglingReference rule; dead PathTooLong/EquipmentUuidImmutable rules + PriorEquipment/Enterprise/Site inputs deleted. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
+10
@@ -144,6 +144,16 @@ removed (terminal Bad, then `RemoveVariableNode`, which severs the backing raw n
|
||||
inverse `Organizes` edge) **before** the equipment subtree, and the subtree removal severs
|
||||
the same edge for anything it reaches itself (archreview 03/P5 + 03/S20).
|
||||
|
||||
## Deploy-gate integrity rules (lmxopcua#998)
|
||||
|
||||
The parent links of the config tables (Tag→Device/TagGroup, Device→DriverInstance, Equipment→UnsLine, reference→Tag/Equipment, ...) are
|
||||
**logical** foreign keys only, and the service-layer "is it empty?" delete checks are not serialised against a concurrent add. The deploy gate
|
||||
(`DraftValidator.ValidateDanglingReferences`) therefore names every orphan as `DanglingReference` instead of letting each composer silently skip a
|
||||
row with no path. Also enforced at the gate: fleet-wide `Equipment.ZTag` / `SAPID` uniqueness (`BadDuplicateExternalIdentifier`; see
|
||||
`docs/Reservations.md`) and duplicate owned historian tagnames (`HistorianTagnameDuplicate`, `.claude/rules/historian.md`). The never-firing
|
||||
`PathTooLong` and `EquipmentUuidImmutable` rules were deleted (the UnsSegment charset already bounds the path at 164 chars; no prior-generation
|
||||
table exists to diff).
|
||||
|
||||
## The `Calculation` driver
|
||||
|
||||
Signal-level calculated tags are ordinary raw tags bound to a `Calculation` driver
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
# External-ID Reservations
|
||||
|
||||
> **Status (lmxopcua#998, 2026-12): the reservation ledger has no writer.** `sp_PublishGeneration`, the only code
|
||||
> that inserted `ExternalIdReservation` rows, was retired with the generation model (it now only `RAISERROR`s), so the
|
||||
> table stays empty and the pre-flight below can only fire against rows an operator inserted by hand. **Fleet-wide
|
||||
> ZTag / SAPID uniqueness is now enforced by the deploy gate itself**: `DraftValidator.ValidateEquipmentExternalIdUniqueness`
|
||||
> groups every equipment row in the (whole-DB) draft snapshot by trimmed, case-insensitive ZTag and by SAPID and
|
||||
> reports each duplicate as `BadDuplicateExternalIdentifier` naming the other equipment (same cluster or not).
|
||||
> Blank values mean "no identifier". The permanent-claim semantics described below (a retired asset's id staying
|
||||
> reserved) are **not** provided; the table, `/reservations` page and release procedure remain for any rows that
|
||||
> already exist. The equipment page's field hint says "rejected when you deploy", matching this. A filtered unique
|
||||
> index on `Equipment.ZTag` / `SAPID` was not added (needs a duplicate pre-clean migration); the gate is the authority.
|
||||
|
||||
The reservation subsystem guarantees that an asset's **external identifiers**
|
||||
— its `ZTag` and `SAPID` — belong to exactly one piece of equipment across the
|
||||
entire fleet, for all time. It is the mechanism that stops two pieces of
|
||||
|
||||
Reference in New Issue
Block a user