fix(deploy): #977 deploy/apply bookkeeping — planner sees every composition field, degraded/restarted applies repair, failed deploys restore the last applied revision, superseded deployments close

- U-2: planner diffs the rich scripted-alarm plans; an Enabled flip is a surgical add/remove of the one
  condition, a Name/AlarmType/Severity edit on an enabled alarm rebuilds.
- U-3: planner diffs UNS Areas/Lines in full; a Line moved to another Area rebuilds, added/removed
  Areas/Lines are surgical.
- U-9: removing the last VirtualTag in a FolderPath removes the sub-folder in place.
- AddressSpacePlannerFieldCoverageTests reflects over every composition list + record field.
- R-4: while the last applied composition is degraded, a non-rebuild apply re-ensures the full composition.
- R-20: a supervision restart of OpcUaPublishActor forces its first apply to rebuild.
- R-1: Direct boot with a Failed/orphan newest row restores the newest Applied deployment, then the cache.
- R-15: the revision advances after the last throwing apply step; a throw marks it unconfirmed.
- H-4: ConfigPublishCoordinator closes a superseded in-flight deployment (TimedOut + reason).

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Joseph Doherty
2026-12-03 10:46:47 -05:00
parent be5641fc06
commit a0f41a30d8
14 changed files with 1215 additions and 33 deletions
+5
View File
@@ -175,6 +175,11 @@ after a full rebuild, carrying the unchanged `LastTransitionUtc`. Decisions:
- **Identity is the alarm id.** An edited predicate, severity, message template or equipment placement on the same id is the
same alarm. Its condition carries over, the new predicate decides the next transition (a predicate that is now false is a real
`Cleared`), and the next projection carries the new severity and message.
- **The condition NODE follows the deploy too (#977 U-2).** Enabling a disabled alarm materialises its condition in place
(no rebuild), disabling one removes it in place (a terminal removed-state event first), and a `Name` / `AlarmType` /
`Severity` edit on an enabled alarm rebuilds the address space so the node gets its new type and name. Before #977 the
address-space planner never looked at those four fields: an enable produced an empty plan and the condition never appeared
(every engine write to it was a silent no-op), a disable left it browsable, and a type/name edit kept the old node.
- **Removed and re-added in one deploy** is the same id in both generations, so it carries over. An alarm **removed or disabled**
(the host does not load a disabled plan) by one deploy and re-added by a later one is absent from the previous generation, so it
is seeded from the store like a restart: the engine stopped evaluating it, so it is a new occurrence.