chore(plans): native alarms execution progress (24/28) + batch-7 notes

This commit is contained in:
Joseph Doherty
2026-05-31 02:41:45 -04:00
parent 60f8e2c9a7
commit b03ab11d8a
2 changed files with 12 additions and 7 deletions
@@ -8,10 +8,15 @@
- Do all work here; `main` checkout stays untouched. Build: `dotnet build ZB.MOM.WW.ScadaBridge.slnx`.
- The shared MS SQL container `scadabridge-mssql` is up (the ConfigDB MsSql migration-fixture tests use it).
## Progress: Tasks 121 done & committed; 2228 pending
Commits (oldest→newest): `696da92` T1 … `20b41b8` T18, `0c6f9a9` T19, `b1df6d5` T20, `3bf1d26` T21. (Full list in git log.)
## Progress: Tasks 124 done & committed; 2528 pending
Commits (oldest→newest): `696da92` T1 … `3bf1d26` T21, `a6dcbf6` T22, `1f6c420` T23, (T24 next). (Full list in git log.)
**Cadence is batches of 3 (user choice on resume).** Batch 4 = T1315 ✅, Batch 5 = T1618 ✅, Batch 6 = T1921 ✅. Greens: SiteRuntime.Tests 313/313, Communication.Tests 200/200, ManagementService.Tests 111/111, Commons.Tests registry 8/8. Next: **Batch 7 = T22 (CLI) → T23 (DebugView UI) → T24 (Template editor UI)**. Then 25 (instance UI), 26 (seed), 27 (docs), 28 (live integration).
**Cadence is batches of 3 (user choice on resume).** Batch 4 = T1315 ✅, Batch 5 = T1618 ✅, Batch 6 = T1921 ✅, Batch 7 = T2224 ✅. Greens: SiteRuntime 313/313, Communication 200/200, ManagementService 111/111, CentralUI 581/581, CLI CommandTree 21/21. Next: **Batch 8 = T25 (instance override panel) → T26 (docker-env2 seed) → T27 (docs)**, then T28 (live integration).
## Decisions / deviations — Batch 7 (T2224)
- **T22:** CLI `template native-alarm-source add/list/remove` + `instance native-alarm-source set/clear` + README. **Known-flaky:** `CliConfigTests.Load_MalformedConfigFile…` fails ~deterministically in the FULL CLI suite (passes in isolation) due to process-global `HOME`/`Console.SetError` racing under xUnit parallelism — **confirmed pre-existing** (baseline fails 3/3 full runs; my added tests merely perturbed scheduling). Not my regression; treat as known-flaky like the StaleTagMonitor set.
- **T23:** DebugView alarm table enriched — added Kind + Sev columns, folded SourceReference into the Alarm cell (monospace subtitle), condition badges (Unacked/Shelved/Suppressed) into the State cell, Type/Category/operator/raise-time/value into the row tooltip; `FilteredAlarmStates` also matches SourceReference. bUnit test sets `_connected`/`_snapshot`/`_alarmStates` via reflection then asserts markup.
- **T24:** Template editor got a new **"Native Alarms" tab** (not a sub-panel) — fits the existing tabbed editor. **Repo-direct, NOT the plan's "management HTTP client":** TemplateEdit is Blazor Server in-process and calls `ITemplateEngineRepository` + `SaveChangesAsync` directly (mirrors how `_alarms` load/save works). Connection dropdown loads alarm-capable (OpcUa/MxGateway) connections via `ICentralUiRepository.GetAllDataConnectionsAsync` deduped by name. **Test is structural** (source-text assertions like `TestRunWarningTests`), NOT a full interactive bUnit render — TemplateEdit has ~10 injected services with their own graphs (ScriptAnalysisService/IMemoryCache/ISharedScriptCatalog/BuildParentContextsAsync/GetInstancesFilteredAsync…); the codebase has no precedent for fully rendering it, and the CRUD path is already covered behaviorally by the T21 ManagementActor tests. **T25 (InstanceConfigure) may be lighter to full-render — check first.**
## Decisions / deviations — Batch 6 (T1921)
- **T19:** `AlarmShelveStateCodec` (string↔enum, default Unshelved). Server `StreamRelayActor` maps `msg.Condition.*` + `Kind.ToString()` + nullable `OriginalRaiseTime` out; client `ConvertToDomainEvent` rebuilds `Condition` (severity = wire `Priority`) + `ParseAlarmKind` back. **Gotcha:** client imports `Google.Protobuf.WellKnownTypes`, so `Enum` is ambiguous — used `System.Enum.TryParse`. `confirmed` proto bool → domain `bool?` (false, never null after round-trip).
@@ -22,13 +22,13 @@
{"id": 19, "subject": "Task 19: gRPC alarm mapping (server + client)", "status": "completed", "blockedBy": [2, 18]},
{"id": 20, "subject": "Task 20: Management command contracts + registry", "status": "completed", "blockedBy": [4]},
{"id": 21, "subject": "Task 21: ManagementActor handlers", "status": "completed", "blockedBy": [6, 20]},
{"id": 22, "subject": "Task 22: CLI commands", "status": "pending", "blockedBy": [20]},
{"id": 23, "subject": "Task 23: DebugView alarm table enrichment", "status": "pending", "blockedBy": [2, 19]},
{"id": 24, "subject": "Task 24: Template editor Native Alarm Sources subsection", "status": "pending", "blockedBy": [20]},
{"id": 22, "subject": "Task 22: CLI commands", "status": "completed", "blockedBy": [20]},
{"id": 23, "subject": "Task 23: DebugView alarm table enrichment", "status": "completed", "blockedBy": [2, 19]},
{"id": 24, "subject": "Task 24: Template editor Native Alarm Sources subsection", "status": "completed", "blockedBy": [20]},
{"id": 25, "subject": "Task 25: Instance Configure native alarm source override panel", "status": "pending", "blockedBy": [20]},
{"id": 26, "subject": "Task 26: docker-env2 seed sample native alarm source", "status": "pending", "blockedBy": [22]},
{"id": 27, "subject": "Task 27: Documentation sync", "status": "pending", "blockedBy": [16, 19, 22, 23, 24, 25]},
{"id": 28, "subject": "Task 28: Integration / live verification", "status": "pending", "blockedBy": [10, 11, 12, 16, 19]}
],
"lastUpdated": "2026-05-31 batch-6-complete"
"lastUpdated": "2026-05-31 batch-7-complete"
}