Compare commits
27 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f2a422b02f | |||
| a5f843cbfb | |||
| c3c603f169 | |||
| a95e510015 | |||
| 47d74032e6 | |||
| 540a1188aa | |||
| 90331b622c | |||
| ad30adca2f | |||
| 4d4f443c27 | |||
| c7483615cf | |||
| d13144a9d7 | |||
| 155c9d619f | |||
| 51b0a8f55f | |||
| e50ec493cb | |||
| 312e072070 | |||
| fab600d3b0 | |||
| 1ea6f60ea2 | |||
| bf7b44c2d7 | |||
| ff16c69d59 | |||
| c037d9960d | |||
| fccf75324b | |||
| 094f2ffee4 | |||
| eff17d177c | |||
| 222b01f488 | |||
| 711793ffdc | |||
| 338bc20a0a | |||
| ab3ff1612c |
@@ -71,7 +71,7 @@ dotnet test src/ZB.MOM.WW.MxGateway.Worker.Tests/ZB.MOM.WW.MxGateway.Worker.Test
|
|||||||
dotnet run --project src/ZB.MOM.WW.MxGateway.Server/ZB.MOM.WW.MxGateway.Server.csproj
|
dotnet run --project src/ZB.MOM.WW.MxGateway.Server/ZB.MOM.WW.MxGateway.Server.csproj
|
||||||
|
|
||||||
# API-key admin CLI (same exe, "apikey" subcommand)
|
# API-key admin CLI (same exe, "apikey" subcommand)
|
||||||
dotnet run --project src/ZB.MOM.WW.MxGateway.Server/ZB.MOM.WW.MxGateway.Server.csproj -- apikey create --display-name "dev" --scopes session,invoke,event,metadata,admin
|
dotnet run --project src/ZB.MOM.WW.MxGateway.Server/ZB.MOM.WW.MxGateway.Server.csproj -- apikey create-key --key-id dev --display-name "dev" --scopes session:open,session:close,invoke:read,invoke:write,invoke:secure,events:read,metadata:read,admin
|
||||||
```
|
```
|
||||||
|
|
||||||
Single test by name (xUnit `--filter`):
|
Single test by name (xUnit `--filter`):
|
||||||
@@ -155,7 +155,7 @@ External analysis sources referenced by design docs:
|
|||||||
|
|
||||||
## Authentication
|
## Authentication
|
||||||
|
|
||||||
Gateway gRPC clients authenticate with an API key in metadata: `authorization: Bearer mxgw_<key-id>_<secret>`. Keys are stored hashed (with a peppered SHA) in a gateway-owned SQLite DB (default `C:\ProgramData\MxGateway\gateway-auth.db`). Scopes (`session`, `invoke`, `event`, `metadata`, `admin`) gate specific RPCs; missing → `Unauthenticated`, insufficient → `PermissionDenied`. The `apikey` subcommand on the server exe manages keys; see `src/ZB.MOM.WW.MxGateway.Server/Security/Authentication/`.
|
Gateway gRPC clients authenticate with an API key in metadata: `authorization: Bearer mxgw_<key-id>_<secret>`. Keys are stored hashed (with a peppered SHA) in a gateway-owned SQLite DB (default `C:\ProgramData\MxGateway\gateway-auth.db`). Scopes (`session:open`, `session:close`, `invoke:read`, `invoke:write`, `invoke:secure`, `events:read`, `metadata:read`, `admin`) gate specific RPCs; missing → `Unauthenticated`, insufficient → `PermissionDenied`. The `apikey` subcommand on the server exe manages keys; see `src/ZB.MOM.WW.MxGateway.Server/Security/Authentication/`.
|
||||||
|
|
||||||
Session event streaming is **owner-scoped**: the API key that opened a session is recorded on the session, and every `StreamEvents` attach/reattach is rejected with `PermissionDenied` unless the caller's key id matches the owner. Possessing the `event` scope and knowing a session id is not sufficient — this closes the reconnect/fan-out trust boundary (detach-grace and replay retention are on by default) so an `event`-scoped key cannot attach to another key's retained session.
|
Session event streaming is **owner-scoped**: the API key that opened a session is recorded on the session, and every `StreamEvents` attach/reattach is rejected with `PermissionDenied` unless the caller's key id matches the owner. Possessing the `event` scope and knowing a session id is not sufficient — this closes the reconnect/fan-out trust boundary (detach-grace and replay retention are on by default) so an `event`-scoped key cannot attach to another key's retained session.
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
| TST-10 | Not started | **Confirmed open** | No `docs/Deployment.md` (`ls docs/` — no deploy doc); no deploy script under `scripts/` | Deploy knowledge still lives only in operator memory notes. |
|
| TST-10 | Not started | **Confirmed open** | No `docs/Deployment.md` (`ls docs/` — no deploy doc); no deploy script under `scripts/` | Deploy knowledge still lives only in operator memory notes. |
|
||||||
| TST-14 | Not started | **Confirmed open** | Repo root still holds `MxAccessGateway-docs-{issues,fixed,final}.md`, `MxGatewayClient-docs-{issues,fixed}.md`, `oldtasks.md`, `stillpending.md` (root `ls`) | `oldtasks.md` did gain a legitimate new role as the epic-governance record (TST-04), so "delete when epic closes" needs re-deciding; the five untracked `*-docs-*.md` files remain pure clutter. |
|
| TST-14 | Not started | **Confirmed open** | Repo root still holds `MxAccessGateway-docs-{issues,fixed,final}.md`, `MxGatewayClient-docs-{issues,fixed}.md`, `oldtasks.md`, `stillpending.md` (root `ls`) | `oldtasks.md` did gain a legitimate new role as the epic-governance record (TST-04), so "delete when epic closes" needs re-deciding; the five untracked `*-docs-*.md` files remain pure clutter. |
|
||||||
| TST-15 | Not started (design done) | **Confirmed open** | `Server/Dashboard/Hubs/EventsHub.cs:42` — `TODO(per-session-acl)` still present | Design now exists: `docs/plans/2026-07-10-dashboard-session-acl-tst15.md`. Mitigation shipped meanwhile: SEC-25 value redaction in the hub mirror (see TST-27). |
|
| TST-15 | Not started (design done) | **Confirmed open** | `Server/Dashboard/Hubs/EventsHub.cs:42` — `TODO(per-session-acl)` still present | Design now exists: `docs/plans/2026-07-10-dashboard-session-acl-tst15.md`. Mitigation shipped meanwhile: SEC-25 value redaction in the hub mirror (see TST-27). |
|
||||||
| TST-16 | Not started | **Partially resolved — see TST-27** | `Server/Dashboard/Hubs/DashboardEventBroadcaster.cs:16,29` — `ShowTagValues` now gates value redaction of the SignalR mirror (SEC-25) | The flag is no longer fully dead, but it still does not gate `/browse` live-value display, and the config doc still calls it "Reserved" — fresh drift (TST-27). |
|
| TST-16 | Not started | **Partially resolved — see TST-27** | `Server/Dashboard/Hubs/DashboardEventBroadcaster.cs:16,29` — `ShowTagValues` now gates value redaction of the SignalR mirror (SEC-25) | The flag is no longer fully dead, but it still does not gate `/browse` live-value display, and the config doc still calls it "Reserved" — fresh drift (TST-27). **Closed 2026-08-17** (branch `feat/followup-closeout`): both residuals shipped — `AlarmsHubPublisher` redacts `current_value`/`limit_value` from a deep clone on both value-bearing `AlarmFeedMessage` arms before the `/hubs/alarms` broadcast, and `DashboardLiveDataService` substitutes `[redacted]` for `/browse` value text at the service boundary (the recommended seam), so the flag now gates every dashboard value surface. Source never mutated on either hub, so gRPC subscribers are unaffected. Tests: `AlarmsHubPublisherTests`, two `DashboardLiveDataServiceTests` cases. TST-16 → `Done` in [../remediation/00-tracking.md](../remediation/00-tracking.md#change-log). |
|
||||||
| TST-17 | Not started | **Confirmed open** | `Worker/MxAccess/WnWrapAlarmConsumer.cs:~264-275` — `_ = ackOperatorDomain; _ = ackOperatorFullName;` then 6-arg call; no diagnostic surfaced in the ack reply | Silent drop unchanged (comment block explains the −55 stub, but callers still can't see the degrade). |
|
| TST-17 | Not started | **Confirmed open** | `Worker/MxAccess/WnWrapAlarmConsumer.cs:~264-275` — `_ = ackOperatorDomain; _ = ackOperatorFullName;` then 6-arg call; no diagnostic surfaced in the ack reply | Silent drop unchanged (comment block explains the −55 stub, but callers still can't see the degrade). |
|
||||||
| TST-18 | Not started | **Confirmed open** | No `*HostedService*` test files under `Tests/Gateway/Sessions/` or `Tests/Gateway/Workers/` | Sweep cores remain covered indirectly (`SessionManagerTests.cs:985,1015` now also cover faulted-reap). |
|
| TST-18 | Not started | **Confirmed open** | No `*HostedService*` test files under `Tests/Gateway/Sessions/` or `Tests/Gateway/Workers/` | Sweep cores remain covered indirectly (`SessionManagerTests.cs:985,1015` now also cover faulted-reap). |
|
||||||
| TST-19 | Not started | **Confirmed open** | `Tests/Gateway/Workers/Fakes/FakeWorkerHarness.cs` — no lockstep note / `WorkerPipeSession` pointer (grep empty); no README in `Fakes/` | Risk is higher now that the real-worker suite has no scheduled run (TST-25). |
|
| TST-19 | Not started | **Confirmed open** | `Tests/Gateway/Workers/Fakes/FakeWorkerHarness.cs` — no lockstep note / `WorkerPipeSession` pointer (grep empty); no README in `Fakes/` | Risk is higher now that the real-worker suite has no scheduled run (TST-25). |
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
### TST-27 — `ShowTagValues` config doc still says "Reserved" after SEC-25 made the flag live — **Medium** · documentation currency
|
### TST-27 — `ShowTagValues` config doc still says "Reserved" after SEC-25 made the flag live — **Medium** · documentation currency
|
||||||
|
|
||||||
- **Files:** `docs/GatewayConfiguration.md:185` ("Reserved display control for tag values"); `src/ZB.MOM.WW.MxGateway.Server/Dashboard/Hubs/DashboardEventBroadcaster.cs:16-29` (flag read and enforced); `docs/GatewayDashboardDesign.md:170` (current, documents the redaction)
|
- **Files:** `docs/GatewayConfiguration.md:185` ("Reserved display control for tag values"); `src/ZB.MOM.WW.MxGateway.Server/Dashboard/Hubs/DashboardEventBroadcaster.cs:16-29` (flag read and enforced); `docs/GatewayDashboardDesign.md:170` (current, documents the redaction)
|
||||||
- **Description:** SEC-25 wired `Dashboard:ShowTagValues` into `DashboardEventBroadcaster`: when `false` (default), tag values are blanked from the deep-cloned event before it is mirrored to SignalR. The flag is therefore no longer dead — but the authoritative config reference still labels it "Reserved", so an operator consulting the options table concludes toggling it does nothing, when it actually controls whether tag values leak to every dashboard hub subscriber. This is remediation-created drift: the dashboard design doc was updated in the same change, the config doc was not. (Residual of TST-16 remains separately: the flag still gates nothing in the `/browse` live-value path.)
|
- **Description:** SEC-25 wired `Dashboard:ShowTagValues` into `DashboardEventBroadcaster`: when `false` (default), tag values are blanked from the deep-cloned event before it is mirrored to SignalR. The flag is therefore no longer dead — but the authoritative config reference still labels it "Reserved", so an operator consulting the options table concludes toggling it does nothing, when it actually controls whether tag values leak to every dashboard hub subscriber. This is remediation-created drift: the dashboard design doc was updated in the same change, the config doc was not. (Residual of TST-16 remains separately: the flag still gates nothing in the `/browse` live-value path.) **Closed 2026-08-17** — the config row was rewritten again when TST-16's residuals shipped: it now states the three seams the flag covers (events-hub mirror, alarms hub, `/browse`), so neither the "Reserved" wording nor the `/browse` carve-out survives. See the TST-16 row above.
|
||||||
- **Recommendation:** Update the `:185` row to describe the mirror-redaction behavior (and its security relevance given the missing per-session ACL, TST-15); note the `/browse` gap or close it when TST-16 is decided.
|
- **Recommendation:** Update the `:185` row to describe the mirror-redaction behavior (and its security relevance given the missing per-session ACL, TST-15); note the `/browse` gap or close it when TST-16 is decided.
|
||||||
|
|
||||||
### TST-28 — Gateway-side `max_frame_bytes` handshake field has no test in the portable suite — **Low** · test coverage
|
### TST-28 — Gateway-side `max_frame_bytes` handshake field has no test in the portable suite — **Low** · test coverage
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ Full design + implementation for each row lives in the linked domain doc under i
|
|||||||
| TST-13 | Medium | P2 | S | — | Done | gateway.md carries stale design-era sketches |
|
| TST-13 | Medium | P2 | S | — | Done | gateway.md carries stale design-era sketches |
|
||||||
| TST-14 | Medium | P2 | S | — | Not started | Repo-root working artifacts need triage |
|
| TST-14 | Medium | P2 | S | — | Not started | Repo-root working artifacts need triage |
|
||||||
| TST-15 | Medium | P2 | M | TST-04 | Done | Dashboard EventsHub has no per-session ACL |
|
| TST-15 | Medium | P2 | M | TST-04 | Done | Dashboard EventsHub has no per-session ACL |
|
||||||
| TST-16 | Medium | — | S | — | Not started | `Dashboard:ShowTagValues` is a dead flag |
|
| TST-16 | Medium | P1 | S | — | Done | `Dashboard:ShowTagValues` is a dead flag |
|
||||||
| TST-17 | Medium | — | S | — | Not started | Vendor-gated alarm parity residuals silently lossy |
|
| TST-17 | Medium | — | S | — | Not started | Vendor-gated alarm parity residuals silently lossy |
|
||||||
| TST-18 | Low | — | S | — | Not started | Hosted-service wrappers untested |
|
| TST-18 | Low | — | S | — | Not started | Hosted-service wrappers untested |
|
||||||
| TST-19 | Low | — | S | — | Not started | Keep FakeWorkerHarness canned replies in lockstep |
|
| TST-19 | Low | — | S | — | Not started | Keep FakeWorkerHarness canned replies in lockstep |
|
||||||
@@ -253,6 +253,7 @@ Findings the review flagged as one coordinated design pass — sequence them tog
|
|||||||
|
|
||||||
| Date | Change |
|
| Date | Change |
|
||||||
|---|---|
|
|---|---|
|
||||||
|
| 2026-08-17 | **TST-16 → `Done`: `Dashboard:ShowTagValues` now gates every dashboard value surface** (branch `feat/followup-closeout`). The flag was live on one seam only (the events-hub mirror, shipped with SEC-25); the two recorded residuals are closed, so it is no longer a partly-dead flag. **Alarms hub:** `AlarmsHubPublisher` took `IOptions<GatewayOptions>` and now clears `current_value`/`limit_value` from a **deep clone** of each `AlarmFeedMessage` on both value-bearing payload arms (`transition`, `active_alarm`) before the `/hubs/alarms` broadcast. Clone-only, matching `DashboardEventBroadcaster.RedactValues`: the source message fans out from one feed to gRPC `StreamAlarms` subscribers and the alarms page, none of which this dashboard-display flag governs. The redaction switches on the value-bearing arms and passes everything else through untouched and uncloned, so a payload arm added later (the `snapshot_status` arm landing alongside this change) is forwarded unbroken rather than silently dropped. **`/browse`:** the gate lives at the service boundary per TST-16's own recommendation — `DashboardLiveDataService` substitutes `DashboardTagValue.RedactedValueText` (`[redacted]`) for the formatted value text, so the value never enters the render tree and `BrowsePage.razor` needed no change; data type, quality, source timestamp, and read errors stay real, keeping the panel diagnostic. A visible marker, not a blank, so a suppressed value is distinguishable from a tag that read back empty. Tests: new `AlarmsHubPublisherTests` (4 — both arms redacted with metadata intact, source not mutated, `true` passes values through as the same instance, valueless arms forwarded as the same instance) and two `DashboardLiveDataServiceTests` cases (`false` → `[redacted]`, `true` → formatted); `DashboardEventBroadcasterTests` re-run as regression. Docs: `docs/GatewayConfiguration.md`'s `ShowTagValues` row rewritten from "gates only the events hub mirror, two still-open residuals" to the three seams it now covers, with the "no gRPC client is affected" scope statement; `docs/GatewayDashboardDesign.md` gained the redaction note on the `AlarmsHub` row and had its Browse-panel paragraph corrected (it claimed the panel "always shows values regardless of `Dashboard:ShowTagValues`"). |
|
||||||
| 2026-08-17 | **Alarm-snapshot truncation now has a structural degraded-status signal** (branch `feat/deferred-closeout`, commits `693a78d` + `b9fb0dd`). No review ID — this is branch work outside the 153-finding register, recorded here so the tracker is not silent on a shipped change to the alarm surface. Before it, a capped `GetXmlCurrentAlarms2` fetch suppressed absence-implies-Clear inference and said so only in a rate-limited worker stderr warning, so no client and no operator could tell a complete active set from a capped one. Two additive proto3 booleans carry the verdict out — `QueryActiveAlarmsReplyPayload.snapshot_truncated = 2` and `ActiveAlarmSnapshot.from_truncated_snapshot = 16` (per record, because `QueryActiveAlarms` is a bare `stream ActiveAlarmSnapshot` with no envelope; the reply payload states it too, since a prefix filter can leave zero records and a capped fetch with nothing to report still has to say so). Flow: `WnWrapAlarmConsumer` → `AlarmDispatcher` / `IAlarmCommandHandler` → `MxAccessCommandExecutor` reply → `GatewayAlarmMonitor` → `IGatewayAlarmService.SnapshotTruncated` → `AlarmsPage` banner. `b9fb0dd` then made the pairing structural after review: `IMxAccessAlarmConsumer` and `IAlarmCommandHandler` expose one accessor (`SnapshotActiveAlarms(out bool truncated)` / `QueryActive(..., out bool snapshotTruncated)`) satisfied from a single lock acquisition, so the snapshot and its verdict can no longer be read across a poll; the separate `LastSnapshotTruncated` property is gone from every layer. Detection is deliberately unchanged (`fetchedRecordCount >= maxAlarmsPerFetch`); switching to `ALARM_RECORDS/@COUNT` stays blocked on probe evidence (`docs/AlarmProbeFindings.md`). Not latched, and dropped with the cache generation by `ClearCache`. Additive gateway metadata about our fetch mechanics, not MXAccess behaviour — no synthesized event, so not a parity deviation. Docs: `gateway.md` alarm surface, `docs/DesignDecisions.md`. |
|
| 2026-08-17 | **Alarm-snapshot truncation now has a structural degraded-status signal** (branch `feat/deferred-closeout`, commits `693a78d` + `b9fb0dd`). No review ID — this is branch work outside the 153-finding register, recorded here so the tracker is not silent on a shipped change to the alarm surface. Before it, a capped `GetXmlCurrentAlarms2` fetch suppressed absence-implies-Clear inference and said so only in a rate-limited worker stderr warning, so no client and no operator could tell a complete active set from a capped one. Two additive proto3 booleans carry the verdict out — `QueryActiveAlarmsReplyPayload.snapshot_truncated = 2` and `ActiveAlarmSnapshot.from_truncated_snapshot = 16` (per record, because `QueryActiveAlarms` is a bare `stream ActiveAlarmSnapshot` with no envelope; the reply payload states it too, since a prefix filter can leave zero records and a capped fetch with nothing to report still has to say so). Flow: `WnWrapAlarmConsumer` → `AlarmDispatcher` / `IAlarmCommandHandler` → `MxAccessCommandExecutor` reply → `GatewayAlarmMonitor` → `IGatewayAlarmService.SnapshotTruncated` → `AlarmsPage` banner. `b9fb0dd` then made the pairing structural after review: `IMxAccessAlarmConsumer` and `IAlarmCommandHandler` expose one accessor (`SnapshotActiveAlarms(out bool truncated)` / `QueryActive(..., out bool snapshotTruncated)`) satisfied from a single lock acquisition, so the snapshot and its verdict can no longer be read across a poll; the separate `LastSnapshotTruncated` property is gone from every layer. Detection is deliberately unchanged (`fetchedRecordCount >= maxAlarmsPerFetch`); switching to `ALARM_RECORDS/@COUNT` stays blocked on probe evidence (`docs/AlarmProbeFindings.md`). Not latched, and dropped with the cache generation by `ClearCache`. Additive gateway metadata about our fetch mechanics, not MXAccess behaviour — no synthesized event, so not a parity deviation. Docs: `gateway.md` alarm surface, `docs/DesignDecisions.md`. |
|
||||||
| 2026-08-17 | **TST-15 → `Done` (discharges the ACL half of SEC-25): per-session dashboard event ACL shipped** (branch `feat/deferred-closeout`, commits `693a78d` + `7ec0b35`). Implements `docs/plans/2026-07-10-dashboard-session-acl-tst15.md`, whose header is now `Implemented` with as-built notes in its §12. `IDashboardSessionAcl.CanViewSession` is the single decision **both** subscribe seams consult — `EventsHub.SubscribeSession` (denial is a `HubException`; the caller is neither joined to the group nor registered in `EventsHubViewerRegistry`, so the mirror stays off) and `SessionDetailsPage`'s in-process subscribe (inline denial, no subscription) — so neither path is the weaker one and the `TODO(per-session-acl)` is gone. Decision order, fail-closed on every branch: authenticated Administrator → allow (evaluated **before** the registry lookup, so Admin × unknown-session allows — pinned by a test because reordering the two checks is a plausible refactor); session not found → deny; untagged session → `Dashboard:UntaggedSessionVisibility` (`AdminOnly` default); else allow iff `session.Tags ∩ zb:dashboardtag` claims, ordinal-ignore-case. Session tags are inherited from the owning API key's `dashboard_tags` constraint (`apikey --dashboard-tags`, already in the `ApiKeyConstraints` JSON blob — no SQLite migration) and never from the client's wire request. Viewer grants come from `Dashboard:GroupToTag` over the user's LDAP groups, stamped at cookie login (`DashboardAuthenticator.CreatePrincipal`) and **re-resolved, not copied**, at hub-token mint (`HubTokenService.Issue`), so the 5-minute token lifetime bounds a stale grant. Anonymous localhost is an empty-grant Viewer; `Dashboard:DisableLogin` auto-login carries both roles and so takes the admin bypass unchanged. Tests: `DashboardSessionAclTests` (decision table, every branch asserted in its denying direction too), `EventsHubTests`, `DashboardAuthenticatorTests`, `HubTokenServiceTests`, a `GatewayOptionsTests` case proving `Dashboard:GroupToTag` keeps its ordinal-ignore-case lookup through configuration binding, and two `[LiveLdapFact]`s in `DashboardLdapLiveTests` that drive a real bind against the shared GLAuth (`gw-viewer` → `team-a` grant admits the `team-a` session and refuses the `team-b` one; `multi-role` bypasses on the sessions its own grant does not cover). The live pair needed **no GLAuth change** — the tag layer is config-side, keyed on the existing `GwAdmin`/`GwReader` groups (recorded in `glauth.md`). Docs: `docs/Sessions.md` (session-tag model), `gateway.md` + CLAUDE.md dashboard-auth paragraphs, `docs/GatewayDashboardDesign.md` (three passages that described the ACL as outstanding), `docs/GatewayConfiguration.md` (`ShowTagValues` row: redaction is now the second of two layers, not the only one), `docs/Authentication.md` (`--dashboard-tags` is the only *constraint* flag that splits on commas). |
|
| 2026-08-17 | **TST-15 → `Done` (discharges the ACL half of SEC-25): per-session dashboard event ACL shipped** (branch `feat/deferred-closeout`, commits `693a78d` + `7ec0b35`). Implements `docs/plans/2026-07-10-dashboard-session-acl-tst15.md`, whose header is now `Implemented` with as-built notes in its §12. `IDashboardSessionAcl.CanViewSession` is the single decision **both** subscribe seams consult — `EventsHub.SubscribeSession` (denial is a `HubException`; the caller is neither joined to the group nor registered in `EventsHubViewerRegistry`, so the mirror stays off) and `SessionDetailsPage`'s in-process subscribe (inline denial, no subscription) — so neither path is the weaker one and the `TODO(per-session-acl)` is gone. Decision order, fail-closed on every branch: authenticated Administrator → allow (evaluated **before** the registry lookup, so Admin × unknown-session allows — pinned by a test because reordering the two checks is a plausible refactor); session not found → deny; untagged session → `Dashboard:UntaggedSessionVisibility` (`AdminOnly` default); else allow iff `session.Tags ∩ zb:dashboardtag` claims, ordinal-ignore-case. Session tags are inherited from the owning API key's `dashboard_tags` constraint (`apikey --dashboard-tags`, already in the `ApiKeyConstraints` JSON blob — no SQLite migration) and never from the client's wire request. Viewer grants come from `Dashboard:GroupToTag` over the user's LDAP groups, stamped at cookie login (`DashboardAuthenticator.CreatePrincipal`) and **re-resolved, not copied**, at hub-token mint (`HubTokenService.Issue`), so the 5-minute token lifetime bounds a stale grant. Anonymous localhost is an empty-grant Viewer; `Dashboard:DisableLogin` auto-login carries both roles and so takes the admin bypass unchanged. Tests: `DashboardSessionAclTests` (decision table, every branch asserted in its denying direction too), `EventsHubTests`, `DashboardAuthenticatorTests`, `HubTokenServiceTests`, a `GatewayOptionsTests` case proving `Dashboard:GroupToTag` keeps its ordinal-ignore-case lookup through configuration binding, and two `[LiveLdapFact]`s in `DashboardLdapLiveTests` that drive a real bind against the shared GLAuth (`gw-viewer` → `team-a` grant admits the `team-a` session and refuses the `team-b` one; `multi-role` bypasses on the sessions its own grant does not cover). The live pair needed **no GLAuth change** — the tag layer is config-side, keyed on the existing `GwAdmin`/`GwReader` groups (recorded in `glauth.md`). Docs: `docs/Sessions.md` (session-tag model), `gateway.md` + CLAUDE.md dashboard-auth paragraphs, `docs/GatewayDashboardDesign.md` (three passages that described the ACL as outstanding), `docs/GatewayConfiguration.md` (`ShowTagValues` row: redaction is now the second of two layers, not the only one), `docs/Authentication.md` (`--dashboard-tags` is the only *constraint* flag that splits on commas). |
|
||||||
| 2026-08-10 | **TST-25 acceptance Check 6 (forced-failure nightly issue) → Done.** The 2026-07-13 record wrote this check off as "abandoned to shared-runner congestion"; that was wrong on both counts. The 2026-07-13 probe *did* land (issue #125, `[CHECK6 PROBE]`, run 375), and since 2026-07-17 the `nightly-windev` `if: failure()` step has filed an issue on **every** red nightly — #126–#139, all authored by the `gitea-actions` bot. Traced run 672 (schedule, main, red) line by line: main step fails → `exitcode '1': failure` → the `if: failure()` step runs → `POST /api/v1/repos/dohertj2/mxaccessgw/issues` with the built-in token masked to `***` → issue #139 created at the matching timestamp. Re-confirmed by a fresh forced-failure probe on the throwaway branch `test/tst25-check6-nightly-issue` (temporary `tst25-check6-probe.yml` reproducing the job shape with `exit 1` for the live step; run 677 → issue #140). Branch deleted, issues #125 and #140 closed with explanatory comments. **One real defect found and fixed** (`fix/tst25-nightly-issue-path`, not merged): `${{ github.server_url }}` is the runner-internal `http://gitea:3000`, so every filed issue's run link was unreachable from a browser. The API call must keep using it (the job container resolves `gitea` only on the docker network and has no LAN egress to the public origin), so the fix adds a `PUBLIC_SERVER_URL: https://gitea.dohertylan.com` job env used **only** for the browser-facing link in the issue body; the probe validated the fixed template (#140 carries a `https://gitea.dohertylan.com/...` link that returns 200). **Separately observed, not fixed:** the nightly has been red continuously since at least 2026-07-17 (run 672: `x86 Worker.Tests failed with exit code 1`, 1 failed / 398 passed / 11 skipped — the known `EventBurst_DrainLoopCoalescesFlushes` class of flake), and the step de-duplicates nothing, so 14 issues are open, seven of them (#132–#138) for the identical SHA `47c0b64`. Worth a follow-up: fix the red nightly, and consider having the step reuse an open issue with the same title instead of filing a new one. |
|
| 2026-08-10 | **TST-25 acceptance Check 6 (forced-failure nightly issue) → Done.** The 2026-07-13 record wrote this check off as "abandoned to shared-runner congestion"; that was wrong on both counts. The 2026-07-13 probe *did* land (issue #125, `[CHECK6 PROBE]`, run 375), and since 2026-07-17 the `nightly-windev` `if: failure()` step has filed an issue on **every** red nightly — #126–#139, all authored by the `gitea-actions` bot. Traced run 672 (schedule, main, red) line by line: main step fails → `exitcode '1': failure` → the `if: failure()` step runs → `POST /api/v1/repos/dohertj2/mxaccessgw/issues` with the built-in token masked to `***` → issue #139 created at the matching timestamp. Re-confirmed by a fresh forced-failure probe on the throwaway branch `test/tst25-check6-nightly-issue` (temporary `tst25-check6-probe.yml` reproducing the job shape with `exit 1` for the live step; run 677 → issue #140). Branch deleted, issues #125 and #140 closed with explanatory comments. **One real defect found and fixed** (`fix/tst25-nightly-issue-path`, not merged): `${{ github.server_url }}` is the runner-internal `http://gitea:3000`, so every filed issue's run link was unreachable from a browser. The API call must keep using it (the job container resolves `gitea` only on the docker network and has no LAN egress to the public origin), so the fix adds a `PUBLIC_SERVER_URL: https://gitea.dohertylan.com` job env used **only** for the browser-facing link in the issue body; the probe validated the fixed template (#140 carries a `https://gitea.dohertylan.com/...` link that returns 200). **Separately observed, not fixed:** the nightly has been red continuously since at least 2026-07-17 (run 672: `x86 Worker.Tests failed with exit code 1`, 1 failed / 398 passed / 11 skipped — the known `EventBurst_DrainLoopCoalescesFlushes` class of flake), and the step de-duplicates nothing, so 14 issues are open, seven of them (#132–#138) for the identical SHA `47c0b64`. Worth a follow-up: fix the red nightly, and consider having the step reuse an open issue with the same title instead of filing a new one. |
|
||||||
|
|||||||
@@ -355,6 +355,8 @@ If TST-02's interim mitigation (flip retention off) is chosen instead of impleme
|
|||||||
|
|
||||||
**Verification.** `dotnet build src/ZB.MOM.WW.MxGateway.Server`; test toggling the flag suppresses/shows values; docs match.
|
**Verification.** `dotnet build src/ZB.MOM.WW.MxGateway.Server`; test toggling the flag suppresses/shows values; docs match.
|
||||||
|
|
||||||
|
**Closed 2026-08-18 — implemented (the Design's recommended path).** The flag is no longer dead: it now gates value display on all three seams that carry a tag value. `Dashboard/DashboardLiveDataService.cs` substitutes `[redacted]` at the service boundary for each successfully read `/browse` tag (a failed read keeps its `-` placeholder, so the error row and the redaction cannot contradict each other); `Dashboard/Hubs/AlarmsHubPublisher.cs` clears `current_value`/`limit_value` from a **deep-cloned** `AlarmFeedMessage` before broadcasting to `/hubs/alarms`, and `DashboardEventBroadcaster` does the same for the events-hub mirror — clones, because the sources fan out to gRPC `StreamAlarms`/`StreamEvents` and the replay ring, so no gRPC client is affected by this dashboard-display flag. The flag is **kept**, default still `false`. The stale prose the Finding flagged is gone: `docs/GatewayConfiguration.md` and `docs/GatewayDashboardDesign.md` now describe the real behaviour. Status tracked in `00-tracking.md` (already **Done**).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## TST-17 — Vendor-gated alarm parity residuals silently lossy `Medium` · `—`
|
## TST-17 — Vendor-gated alarm parity residuals silently lossy `Medium` · `—`
|
||||||
|
|||||||
@@ -156,6 +156,16 @@ poll. Treat the set as possibly incomplete rather than reconciling deletions
|
|||||||
from it. It is set-level degraded status, not a comment on the record's own
|
from it. It is set-level degraded status, not a comment on the record's own
|
||||||
fidelity, and is distinct from `Degraded` (the subtag fallback provider).
|
fidelity, and is distinct from `Degraded` (the subtag fallback provider).
|
||||||
|
|
||||||
|
`StreamAlarmsAsync` also carries that completeness verdict at feed level, as an
|
||||||
|
`AlarmFeedMessage.PayloadOneofCase.SnapshotStatus` frame whose
|
||||||
|
`SnapshotStatus.Truncated` is true while the monitor's cached set derives from a
|
||||||
|
truncated fetch. One arrives at stream open (after the `ProviderStatus` frame,
|
||||||
|
before the cached `ActiveAlarm` frames) so a late joiner learns the current
|
||||||
|
verdict, then one on every verdict change — including the clearing frame sent
|
||||||
|
when the gateway's alarm monitor restarts and drops a truncated verdict. Track
|
||||||
|
it if you need set completeness on a live feed without polling
|
||||||
|
`QueryActiveAlarmsAsync`.
|
||||||
|
|
||||||
`MxGatewaySession.CloseAsync` is explicit and idempotent. Repeated calls return
|
`MxGatewaySession.CloseAsync` is explicit and idempotent. Repeated calls return
|
||||||
the first `CloseSessionReply` instead of sending another close request.
|
the first `CloseSessionReply` instead of sending another close request.
|
||||||
|
|
||||||
|
|||||||
@@ -1546,8 +1546,9 @@ public static class MxGatewayClientCli
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Renders one <see cref="AlarmFeedMessage"/> for the human-readable
|
/// Renders one <see cref="AlarmFeedMessage"/> for the human-readable
|
||||||
/// (non-JSON) stream-alarms output, distinguishing the <c>payload</c> oneof
|
/// (non-JSON) stream-alarms output, distinguishing the <c>payload</c> oneof
|
||||||
/// arms: a snapshot active alarm, the snapshot-complete sentinel, or a live
|
/// arms: a snapshot active alarm, the snapshot-complete sentinel, a live
|
||||||
/// transition.
|
/// transition, the provider-mode status, or the feed-level
|
||||||
|
/// snapshot-completeness status.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private static string FormatAlarmFeedMessage(AlarmFeedMessage feedMessage)
|
private static string FormatAlarmFeedMessage(AlarmFeedMessage feedMessage)
|
||||||
{
|
{
|
||||||
@@ -1559,6 +1560,10 @@ public static class MxGatewayClientCli
|
|||||||
$"snapshot-complete {feedMessage.SnapshotComplete}",
|
$"snapshot-complete {feedMessage.SnapshotComplete}",
|
||||||
AlarmFeedMessage.PayloadOneofCase.Transition =>
|
AlarmFeedMessage.PayloadOneofCase.Transition =>
|
||||||
$"transition {ProtobufJsonFormatter.Format(feedMessage.Transition)}",
|
$"transition {ProtobufJsonFormatter.Format(feedMessage.Transition)}",
|
||||||
|
AlarmFeedMessage.PayloadOneofCase.ProviderStatus =>
|
||||||
|
$"provider-status {ProtobufJsonFormatter.Format(feedMessage.ProviderStatus)}",
|
||||||
|
AlarmFeedMessage.PayloadOneofCase.SnapshotStatus =>
|
||||||
|
$"snapshot-status {ProtobufJsonFormatter.Format(feedMessage.SnapshotStatus)}",
|
||||||
_ => $"unknown-payload {feedMessage.PayloadCase}",
|
_ => $"unknown-payload {feedMessage.PayloadCase}",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -153,6 +153,15 @@ deletions from it. It is set-level degraded status, not a comment on the
|
|||||||
record's own fidelity, and is distinct from `Degraded` (the subtag fallback
|
record's own fidelity, and is distinct from `Degraded` (the subtag fallback
|
||||||
provider).
|
provider).
|
||||||
|
|
||||||
|
`StreamAlarms` also carries that completeness verdict at feed level, as a frame
|
||||||
|
whose `GetSnapshotStatus()` is non-nil and whose `GetTruncated()` is true while
|
||||||
|
the monitor's cached set derives from a truncated fetch. One arrives at stream
|
||||||
|
open (after the `GetProviderStatus()` frame, before the cached
|
||||||
|
`GetActiveAlarm()` frames) so a late joiner learns the current verdict, then one
|
||||||
|
on every verdict change — including the clearing frame sent when the gateway's
|
||||||
|
alarm monitor restarts and drops a truncated verdict. Track it if you need set
|
||||||
|
completeness on a live feed without polling `QueryActiveAlarms`.
|
||||||
|
|
||||||
## Write Semantics And Common Pitfalls
|
## Write Semantics And Common Pitfalls
|
||||||
|
|
||||||
These are MXAccess parity behaviors that surprise new callers. The gateway
|
These are MXAccess parity behaviors that surprise new callers. The gateway
|
||||||
|
|||||||
@@ -1097,7 +1097,8 @@ func runStreamAlarms(ctx context.Context, args []string, stdout, stderr io.Write
|
|||||||
|
|
||||||
// formatAlarmFeedMessage renders one AlarmFeedMessage in the CLI's plain-text
|
// formatAlarmFeedMessage renders one AlarmFeedMessage in the CLI's plain-text
|
||||||
// output style, distinguishing the active-alarm snapshot, snapshot-complete
|
// output style, distinguishing the active-alarm snapshot, snapshot-complete
|
||||||
// sentinel, and transition cases of the message's payload oneof.
|
// sentinel, transition, provider-status, and snapshot-status cases of the
|
||||||
|
// message's payload oneof.
|
||||||
func formatAlarmFeedMessage(message *mxgateway.AlarmFeedMessage) string {
|
func formatAlarmFeedMessage(message *mxgateway.AlarmFeedMessage) string {
|
||||||
switch {
|
switch {
|
||||||
case message.GetActiveAlarm() != nil:
|
case message.GetActiveAlarm() != nil:
|
||||||
@@ -1108,6 +1109,11 @@ func formatAlarmFeedMessage(message *mxgateway.AlarmFeedMessage) string {
|
|||||||
case message.GetTransition() != nil:
|
case message.GetTransition() != nil:
|
||||||
transition := message.GetTransition()
|
transition := message.GetTransition()
|
||||||
return fmt.Sprintf("transition %s kind=%s severity=%d", transition.GetAlarmFullReference(), transition.GetTransitionKind(), transition.GetSeverity())
|
return fmt.Sprintf("transition %s kind=%s severity=%d", transition.GetAlarmFullReference(), transition.GetTransitionKind(), transition.GetSeverity())
|
||||||
|
case message.GetProviderStatus() != nil:
|
||||||
|
status := message.GetProviderStatus()
|
||||||
|
return fmt.Sprintf("provider-status mode=%s degraded=%t reason=%q", status.GetMode(), status.GetDegraded(), status.GetReason())
|
||||||
|
case message.GetSnapshotStatus() != nil:
|
||||||
|
return fmt.Sprintf("snapshot-status truncated=%t", message.GetSnapshotStatus().GetTruncated())
|
||||||
default:
|
default:
|
||||||
return "unknown"
|
return "unknown"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7342,9 +7342,13 @@ func (x *StreamAlarmsRequest) GetAlarmFilterPrefix() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
// One message on the StreamAlarms feed. The stream opens with one
|
// One message on the StreamAlarms feed. The stream opens with a
|
||||||
// `active_alarm` per currently-active alarm, then a single
|
// `provider_status` (the current provider mode), then a `snapshot_status`
|
||||||
// `snapshot_complete`, then a `transition` for every subsequent change.
|
// (whether the cached active set may be incomplete), then one `active_alarm`
|
||||||
|
// per currently-active alarm, then a single `snapshot_complete`. After that
|
||||||
|
// come the live frames: a `transition` for every subsequent alarm change,
|
||||||
|
// interleaved with a further `provider_status` on each failover/failback and a
|
||||||
|
// further `snapshot_status` on each change of the truncation verdict.
|
||||||
type AlarmFeedMessage struct {
|
type AlarmFeedMessage struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
// Types that are valid to be assigned to Payload:
|
// Types that are valid to be assigned to Payload:
|
||||||
@@ -7353,6 +7357,7 @@ type AlarmFeedMessage struct {
|
|||||||
// *AlarmFeedMessage_SnapshotComplete
|
// *AlarmFeedMessage_SnapshotComplete
|
||||||
// *AlarmFeedMessage_Transition
|
// *AlarmFeedMessage_Transition
|
||||||
// *AlarmFeedMessage_ProviderStatus
|
// *AlarmFeedMessage_ProviderStatus
|
||||||
|
// *AlarmFeedMessage_SnapshotStatus
|
||||||
Payload isAlarmFeedMessage_Payload `protobuf_oneof:"payload"`
|
Payload isAlarmFeedMessage_Payload `protobuf_oneof:"payload"`
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
@@ -7431,6 +7436,15 @@ func (x *AlarmFeedMessage) GetProviderStatus() *AlarmProviderStatus {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *AlarmFeedMessage) GetSnapshotStatus() *AlarmSnapshotStatus {
|
||||||
|
if x != nil {
|
||||||
|
if x, ok := x.Payload.(*AlarmFeedMessage_SnapshotStatus); ok {
|
||||||
|
return x.SnapshotStatus
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
type isAlarmFeedMessage_Payload interface {
|
type isAlarmFeedMessage_Payload interface {
|
||||||
isAlarmFeedMessage_Payload()
|
isAlarmFeedMessage_Payload()
|
||||||
}
|
}
|
||||||
@@ -7457,6 +7471,13 @@ type AlarmFeedMessage_ProviderStatus struct {
|
|||||||
ProviderStatus *AlarmProviderStatus `protobuf:"bytes,4,opt,name=provider_status,json=providerStatus,proto3,oneof"`
|
ProviderStatus *AlarmProviderStatus `protobuf:"bytes,4,opt,name=provider_status,json=providerStatus,proto3,oneof"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type AlarmFeedMessage_SnapshotStatus struct {
|
||||||
|
// Snapshot-completeness status. Emitted once on stream open and again on
|
||||||
|
// every change of the truncation verdict, so late joiners learn whether the
|
||||||
|
// feed's active-alarm set may be incomplete.
|
||||||
|
SnapshotStatus *AlarmSnapshotStatus `protobuf:"bytes,5,opt,name=snapshot_status,json=snapshotStatus,proto3,oneof"`
|
||||||
|
}
|
||||||
|
|
||||||
func (*AlarmFeedMessage_ActiveAlarm) isAlarmFeedMessage_Payload() {}
|
func (*AlarmFeedMessage_ActiveAlarm) isAlarmFeedMessage_Payload() {}
|
||||||
|
|
||||||
func (*AlarmFeedMessage_SnapshotComplete) isAlarmFeedMessage_Payload() {}
|
func (*AlarmFeedMessage_SnapshotComplete) isAlarmFeedMessage_Payload() {}
|
||||||
@@ -7465,6 +7486,8 @@ func (*AlarmFeedMessage_Transition) isAlarmFeedMessage_Payload() {}
|
|||||||
|
|
||||||
func (*AlarmFeedMessage_ProviderStatus) isAlarmFeedMessage_Payload() {}
|
func (*AlarmFeedMessage_ProviderStatus) isAlarmFeedMessage_Payload() {}
|
||||||
|
|
||||||
|
func (*AlarmFeedMessage_SnapshotStatus) isAlarmFeedMessage_Payload() {}
|
||||||
|
|
||||||
type AlarmProviderStatus struct {
|
type AlarmProviderStatus struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
Mode AlarmProviderMode `protobuf:"varint,1,opt,name=mode,proto3,enum=mxaccess_gateway.v1.AlarmProviderMode" json:"mode,omitempty"`
|
Mode AlarmProviderMode `protobuf:"varint,1,opt,name=mode,proto3,enum=mxaccess_gateway.v1.AlarmProviderMode" json:"mode,omitempty"`
|
||||||
@@ -7533,6 +7556,63 @@ func (x *AlarmProviderStatus) GetSince() *timestamppb.Timestamp {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Feed-level snapshot-completeness status. Emitted once on StreamAlarms open
|
||||||
|
// (after the initial provider_status frame, before the cached active_alarm
|
||||||
|
// frames) so late joiners learn the current verdict, and again on every change
|
||||||
|
// of the truncation verdict — when a reconcile reports a different verdict, and
|
||||||
|
// when the gateway's alarm monitor restarts and drops a truncated verdict with
|
||||||
|
// the cache generation it described (feed subscribers outlive that monitor
|
||||||
|
// session, so they are sent the clearing frame). Mirrors the per-record
|
||||||
|
// ActiveAlarmSnapshot.from_truncated_snapshot caveat at feed level so live
|
||||||
|
// consumers can reason about completeness without polling QueryActiveAlarms.
|
||||||
|
type AlarmSnapshotStatus struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
// True while the monitor's cached active-alarm set derives from a truncated
|
||||||
|
// (capped) worker fetch — the set may be missing alarms. Distinct from
|
||||||
|
// provider degradation (AlarmProviderStatus.degraded), which describes the
|
||||||
|
// fidelity of the records rather than the completeness of the set.
|
||||||
|
Truncated bool `protobuf:"varint,1,opt,name=truncated,proto3" json:"truncated,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AlarmSnapshotStatus) Reset() {
|
||||||
|
*x = AlarmSnapshotStatus{}
|
||||||
|
mi := &file_mxaccess_gateway_proto_msgTypes[87]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AlarmSnapshotStatus) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*AlarmSnapshotStatus) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *AlarmSnapshotStatus) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_mxaccess_gateway_proto_msgTypes[87]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use AlarmSnapshotStatus.ProtoReflect.Descriptor instead.
|
||||||
|
func (*AlarmSnapshotStatus) Descriptor() ([]byte, []int) {
|
||||||
|
return file_mxaccess_gateway_proto_rawDescGZIP(), []int{87}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AlarmSnapshotStatus) GetTruncated() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.Truncated
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
type MxStatusProxy struct {
|
type MxStatusProxy struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
// Mirrors the `success` member of the MXAccess MXSTATUS_PROXY struct
|
// Mirrors the `success` member of the MXAccess MXSTATUS_PROXY struct
|
||||||
@@ -7557,7 +7637,7 @@ type MxStatusProxy struct {
|
|||||||
|
|
||||||
func (x *MxStatusProxy) Reset() {
|
func (x *MxStatusProxy) Reset() {
|
||||||
*x = MxStatusProxy{}
|
*x = MxStatusProxy{}
|
||||||
mi := &file_mxaccess_gateway_proto_msgTypes[87]
|
mi := &file_mxaccess_gateway_proto_msgTypes[88]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -7569,7 +7649,7 @@ func (x *MxStatusProxy) String() string {
|
|||||||
func (*MxStatusProxy) ProtoMessage() {}
|
func (*MxStatusProxy) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *MxStatusProxy) ProtoReflect() protoreflect.Message {
|
func (x *MxStatusProxy) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_mxaccess_gateway_proto_msgTypes[87]
|
mi := &file_mxaccess_gateway_proto_msgTypes[88]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -7582,7 +7662,7 @@ func (x *MxStatusProxy) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use MxStatusProxy.ProtoReflect.Descriptor instead.
|
// Deprecated: Use MxStatusProxy.ProtoReflect.Descriptor instead.
|
||||||
func (*MxStatusProxy) Descriptor() ([]byte, []int) {
|
func (*MxStatusProxy) Descriptor() ([]byte, []int) {
|
||||||
return file_mxaccess_gateway_proto_rawDescGZIP(), []int{87}
|
return file_mxaccess_gateway_proto_rawDescGZIP(), []int{88}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *MxStatusProxy) GetSuccess() int32 {
|
func (x *MxStatusProxy) GetSuccess() int32 {
|
||||||
@@ -7660,7 +7740,7 @@ type MxValue struct {
|
|||||||
|
|
||||||
func (x *MxValue) Reset() {
|
func (x *MxValue) Reset() {
|
||||||
*x = MxValue{}
|
*x = MxValue{}
|
||||||
mi := &file_mxaccess_gateway_proto_msgTypes[88]
|
mi := &file_mxaccess_gateway_proto_msgTypes[89]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -7672,7 +7752,7 @@ func (x *MxValue) String() string {
|
|||||||
func (*MxValue) ProtoMessage() {}
|
func (*MxValue) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *MxValue) ProtoReflect() protoreflect.Message {
|
func (x *MxValue) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_mxaccess_gateway_proto_msgTypes[88]
|
mi := &file_mxaccess_gateway_proto_msgTypes[89]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -7685,7 +7765,7 @@ func (x *MxValue) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use MxValue.ProtoReflect.Descriptor instead.
|
// Deprecated: Use MxValue.ProtoReflect.Descriptor instead.
|
||||||
func (*MxValue) Descriptor() ([]byte, []int) {
|
func (*MxValue) Descriptor() ([]byte, []int) {
|
||||||
return file_mxaccess_gateway_proto_rawDescGZIP(), []int{88}
|
return file_mxaccess_gateway_proto_rawDescGZIP(), []int{89}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *MxValue) GetDataType() MxDataType {
|
func (x *MxValue) GetDataType() MxDataType {
|
||||||
@@ -7908,7 +7988,7 @@ type MxArray struct {
|
|||||||
|
|
||||||
func (x *MxArray) Reset() {
|
func (x *MxArray) Reset() {
|
||||||
*x = MxArray{}
|
*x = MxArray{}
|
||||||
mi := &file_mxaccess_gateway_proto_msgTypes[89]
|
mi := &file_mxaccess_gateway_proto_msgTypes[90]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -7920,7 +8000,7 @@ func (x *MxArray) String() string {
|
|||||||
func (*MxArray) ProtoMessage() {}
|
func (*MxArray) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *MxArray) ProtoReflect() protoreflect.Message {
|
func (x *MxArray) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_mxaccess_gateway_proto_msgTypes[89]
|
mi := &file_mxaccess_gateway_proto_msgTypes[90]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -7933,7 +8013,7 @@ func (x *MxArray) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use MxArray.ProtoReflect.Descriptor instead.
|
// Deprecated: Use MxArray.ProtoReflect.Descriptor instead.
|
||||||
func (*MxArray) Descriptor() ([]byte, []int) {
|
func (*MxArray) Descriptor() ([]byte, []int) {
|
||||||
return file_mxaccess_gateway_proto_rawDescGZIP(), []int{89}
|
return file_mxaccess_gateway_proto_rawDescGZIP(), []int{90}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *MxArray) GetElementDataType() MxDataType {
|
func (x *MxArray) GetElementDataType() MxDataType {
|
||||||
@@ -8117,7 +8197,7 @@ type MxSparseArray struct {
|
|||||||
|
|
||||||
func (x *MxSparseArray) Reset() {
|
func (x *MxSparseArray) Reset() {
|
||||||
*x = MxSparseArray{}
|
*x = MxSparseArray{}
|
||||||
mi := &file_mxaccess_gateway_proto_msgTypes[90]
|
mi := &file_mxaccess_gateway_proto_msgTypes[91]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -8129,7 +8209,7 @@ func (x *MxSparseArray) String() string {
|
|||||||
func (*MxSparseArray) ProtoMessage() {}
|
func (*MxSparseArray) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *MxSparseArray) ProtoReflect() protoreflect.Message {
|
func (x *MxSparseArray) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_mxaccess_gateway_proto_msgTypes[90]
|
mi := &file_mxaccess_gateway_proto_msgTypes[91]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -8142,7 +8222,7 @@ func (x *MxSparseArray) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use MxSparseArray.ProtoReflect.Descriptor instead.
|
// Deprecated: Use MxSparseArray.ProtoReflect.Descriptor instead.
|
||||||
func (*MxSparseArray) Descriptor() ([]byte, []int) {
|
func (*MxSparseArray) Descriptor() ([]byte, []int) {
|
||||||
return file_mxaccess_gateway_proto_rawDescGZIP(), []int{90}
|
return file_mxaccess_gateway_proto_rawDescGZIP(), []int{91}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *MxSparseArray) GetElementDataType() MxDataType {
|
func (x *MxSparseArray) GetElementDataType() MxDataType {
|
||||||
@@ -8176,7 +8256,7 @@ type MxSparseElement struct {
|
|||||||
|
|
||||||
func (x *MxSparseElement) Reset() {
|
func (x *MxSparseElement) Reset() {
|
||||||
*x = MxSparseElement{}
|
*x = MxSparseElement{}
|
||||||
mi := &file_mxaccess_gateway_proto_msgTypes[91]
|
mi := &file_mxaccess_gateway_proto_msgTypes[92]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -8188,7 +8268,7 @@ func (x *MxSparseElement) String() string {
|
|||||||
func (*MxSparseElement) ProtoMessage() {}
|
func (*MxSparseElement) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *MxSparseElement) ProtoReflect() protoreflect.Message {
|
func (x *MxSparseElement) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_mxaccess_gateway_proto_msgTypes[91]
|
mi := &file_mxaccess_gateway_proto_msgTypes[92]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -8201,7 +8281,7 @@ func (x *MxSparseElement) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use MxSparseElement.ProtoReflect.Descriptor instead.
|
// Deprecated: Use MxSparseElement.ProtoReflect.Descriptor instead.
|
||||||
func (*MxSparseElement) Descriptor() ([]byte, []int) {
|
func (*MxSparseElement) Descriptor() ([]byte, []int) {
|
||||||
return file_mxaccess_gateway_proto_rawDescGZIP(), []int{91}
|
return file_mxaccess_gateway_proto_rawDescGZIP(), []int{92}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *MxSparseElement) GetIndex() uint32 {
|
func (x *MxSparseElement) GetIndex() uint32 {
|
||||||
@@ -8227,7 +8307,7 @@ type BoolArray struct {
|
|||||||
|
|
||||||
func (x *BoolArray) Reset() {
|
func (x *BoolArray) Reset() {
|
||||||
*x = BoolArray{}
|
*x = BoolArray{}
|
||||||
mi := &file_mxaccess_gateway_proto_msgTypes[92]
|
mi := &file_mxaccess_gateway_proto_msgTypes[93]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -8239,7 +8319,7 @@ func (x *BoolArray) String() string {
|
|||||||
func (*BoolArray) ProtoMessage() {}
|
func (*BoolArray) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *BoolArray) ProtoReflect() protoreflect.Message {
|
func (x *BoolArray) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_mxaccess_gateway_proto_msgTypes[92]
|
mi := &file_mxaccess_gateway_proto_msgTypes[93]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -8252,7 +8332,7 @@ func (x *BoolArray) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use BoolArray.ProtoReflect.Descriptor instead.
|
// Deprecated: Use BoolArray.ProtoReflect.Descriptor instead.
|
||||||
func (*BoolArray) Descriptor() ([]byte, []int) {
|
func (*BoolArray) Descriptor() ([]byte, []int) {
|
||||||
return file_mxaccess_gateway_proto_rawDescGZIP(), []int{92}
|
return file_mxaccess_gateway_proto_rawDescGZIP(), []int{93}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *BoolArray) GetValues() []bool {
|
func (x *BoolArray) GetValues() []bool {
|
||||||
@@ -8271,7 +8351,7 @@ type Int32Array struct {
|
|||||||
|
|
||||||
func (x *Int32Array) Reset() {
|
func (x *Int32Array) Reset() {
|
||||||
*x = Int32Array{}
|
*x = Int32Array{}
|
||||||
mi := &file_mxaccess_gateway_proto_msgTypes[93]
|
mi := &file_mxaccess_gateway_proto_msgTypes[94]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -8283,7 +8363,7 @@ func (x *Int32Array) String() string {
|
|||||||
func (*Int32Array) ProtoMessage() {}
|
func (*Int32Array) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *Int32Array) ProtoReflect() protoreflect.Message {
|
func (x *Int32Array) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_mxaccess_gateway_proto_msgTypes[93]
|
mi := &file_mxaccess_gateway_proto_msgTypes[94]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -8296,7 +8376,7 @@ func (x *Int32Array) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use Int32Array.ProtoReflect.Descriptor instead.
|
// Deprecated: Use Int32Array.ProtoReflect.Descriptor instead.
|
||||||
func (*Int32Array) Descriptor() ([]byte, []int) {
|
func (*Int32Array) Descriptor() ([]byte, []int) {
|
||||||
return file_mxaccess_gateway_proto_rawDescGZIP(), []int{93}
|
return file_mxaccess_gateway_proto_rawDescGZIP(), []int{94}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Int32Array) GetValues() []int32 {
|
func (x *Int32Array) GetValues() []int32 {
|
||||||
@@ -8315,7 +8395,7 @@ type Int64Array struct {
|
|||||||
|
|
||||||
func (x *Int64Array) Reset() {
|
func (x *Int64Array) Reset() {
|
||||||
*x = Int64Array{}
|
*x = Int64Array{}
|
||||||
mi := &file_mxaccess_gateway_proto_msgTypes[94]
|
mi := &file_mxaccess_gateway_proto_msgTypes[95]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -8327,7 +8407,7 @@ func (x *Int64Array) String() string {
|
|||||||
func (*Int64Array) ProtoMessage() {}
|
func (*Int64Array) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *Int64Array) ProtoReflect() protoreflect.Message {
|
func (x *Int64Array) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_mxaccess_gateway_proto_msgTypes[94]
|
mi := &file_mxaccess_gateway_proto_msgTypes[95]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -8340,7 +8420,7 @@ func (x *Int64Array) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use Int64Array.ProtoReflect.Descriptor instead.
|
// Deprecated: Use Int64Array.ProtoReflect.Descriptor instead.
|
||||||
func (*Int64Array) Descriptor() ([]byte, []int) {
|
func (*Int64Array) Descriptor() ([]byte, []int) {
|
||||||
return file_mxaccess_gateway_proto_rawDescGZIP(), []int{94}
|
return file_mxaccess_gateway_proto_rawDescGZIP(), []int{95}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Int64Array) GetValues() []int64 {
|
func (x *Int64Array) GetValues() []int64 {
|
||||||
@@ -8359,7 +8439,7 @@ type FloatArray struct {
|
|||||||
|
|
||||||
func (x *FloatArray) Reset() {
|
func (x *FloatArray) Reset() {
|
||||||
*x = FloatArray{}
|
*x = FloatArray{}
|
||||||
mi := &file_mxaccess_gateway_proto_msgTypes[95]
|
mi := &file_mxaccess_gateway_proto_msgTypes[96]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -8371,7 +8451,7 @@ func (x *FloatArray) String() string {
|
|||||||
func (*FloatArray) ProtoMessage() {}
|
func (*FloatArray) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *FloatArray) ProtoReflect() protoreflect.Message {
|
func (x *FloatArray) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_mxaccess_gateway_proto_msgTypes[95]
|
mi := &file_mxaccess_gateway_proto_msgTypes[96]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -8384,7 +8464,7 @@ func (x *FloatArray) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use FloatArray.ProtoReflect.Descriptor instead.
|
// Deprecated: Use FloatArray.ProtoReflect.Descriptor instead.
|
||||||
func (*FloatArray) Descriptor() ([]byte, []int) {
|
func (*FloatArray) Descriptor() ([]byte, []int) {
|
||||||
return file_mxaccess_gateway_proto_rawDescGZIP(), []int{95}
|
return file_mxaccess_gateway_proto_rawDescGZIP(), []int{96}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *FloatArray) GetValues() []float32 {
|
func (x *FloatArray) GetValues() []float32 {
|
||||||
@@ -8403,7 +8483,7 @@ type DoubleArray struct {
|
|||||||
|
|
||||||
func (x *DoubleArray) Reset() {
|
func (x *DoubleArray) Reset() {
|
||||||
*x = DoubleArray{}
|
*x = DoubleArray{}
|
||||||
mi := &file_mxaccess_gateway_proto_msgTypes[96]
|
mi := &file_mxaccess_gateway_proto_msgTypes[97]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -8415,7 +8495,7 @@ func (x *DoubleArray) String() string {
|
|||||||
func (*DoubleArray) ProtoMessage() {}
|
func (*DoubleArray) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *DoubleArray) ProtoReflect() protoreflect.Message {
|
func (x *DoubleArray) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_mxaccess_gateway_proto_msgTypes[96]
|
mi := &file_mxaccess_gateway_proto_msgTypes[97]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -8428,7 +8508,7 @@ func (x *DoubleArray) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use DoubleArray.ProtoReflect.Descriptor instead.
|
// Deprecated: Use DoubleArray.ProtoReflect.Descriptor instead.
|
||||||
func (*DoubleArray) Descriptor() ([]byte, []int) {
|
func (*DoubleArray) Descriptor() ([]byte, []int) {
|
||||||
return file_mxaccess_gateway_proto_rawDescGZIP(), []int{96}
|
return file_mxaccess_gateway_proto_rawDescGZIP(), []int{97}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DoubleArray) GetValues() []float64 {
|
func (x *DoubleArray) GetValues() []float64 {
|
||||||
@@ -8447,7 +8527,7 @@ type StringArray struct {
|
|||||||
|
|
||||||
func (x *StringArray) Reset() {
|
func (x *StringArray) Reset() {
|
||||||
*x = StringArray{}
|
*x = StringArray{}
|
||||||
mi := &file_mxaccess_gateway_proto_msgTypes[97]
|
mi := &file_mxaccess_gateway_proto_msgTypes[98]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -8459,7 +8539,7 @@ func (x *StringArray) String() string {
|
|||||||
func (*StringArray) ProtoMessage() {}
|
func (*StringArray) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *StringArray) ProtoReflect() protoreflect.Message {
|
func (x *StringArray) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_mxaccess_gateway_proto_msgTypes[97]
|
mi := &file_mxaccess_gateway_proto_msgTypes[98]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -8472,7 +8552,7 @@ func (x *StringArray) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use StringArray.ProtoReflect.Descriptor instead.
|
// Deprecated: Use StringArray.ProtoReflect.Descriptor instead.
|
||||||
func (*StringArray) Descriptor() ([]byte, []int) {
|
func (*StringArray) Descriptor() ([]byte, []int) {
|
||||||
return file_mxaccess_gateway_proto_rawDescGZIP(), []int{97}
|
return file_mxaccess_gateway_proto_rawDescGZIP(), []int{98}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *StringArray) GetValues() []string {
|
func (x *StringArray) GetValues() []string {
|
||||||
@@ -8491,7 +8571,7 @@ type TimestampArray struct {
|
|||||||
|
|
||||||
func (x *TimestampArray) Reset() {
|
func (x *TimestampArray) Reset() {
|
||||||
*x = TimestampArray{}
|
*x = TimestampArray{}
|
||||||
mi := &file_mxaccess_gateway_proto_msgTypes[98]
|
mi := &file_mxaccess_gateway_proto_msgTypes[99]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -8503,7 +8583,7 @@ func (x *TimestampArray) String() string {
|
|||||||
func (*TimestampArray) ProtoMessage() {}
|
func (*TimestampArray) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *TimestampArray) ProtoReflect() protoreflect.Message {
|
func (x *TimestampArray) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_mxaccess_gateway_proto_msgTypes[98]
|
mi := &file_mxaccess_gateway_proto_msgTypes[99]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -8516,7 +8596,7 @@ func (x *TimestampArray) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use TimestampArray.ProtoReflect.Descriptor instead.
|
// Deprecated: Use TimestampArray.ProtoReflect.Descriptor instead.
|
||||||
func (*TimestampArray) Descriptor() ([]byte, []int) {
|
func (*TimestampArray) Descriptor() ([]byte, []int) {
|
||||||
return file_mxaccess_gateway_proto_rawDescGZIP(), []int{98}
|
return file_mxaccess_gateway_proto_rawDescGZIP(), []int{99}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *TimestampArray) GetValues() []*timestamppb.Timestamp {
|
func (x *TimestampArray) GetValues() []*timestamppb.Timestamp {
|
||||||
@@ -8535,7 +8615,7 @@ type RawArray struct {
|
|||||||
|
|
||||||
func (x *RawArray) Reset() {
|
func (x *RawArray) Reset() {
|
||||||
*x = RawArray{}
|
*x = RawArray{}
|
||||||
mi := &file_mxaccess_gateway_proto_msgTypes[99]
|
mi := &file_mxaccess_gateway_proto_msgTypes[100]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -8547,7 +8627,7 @@ func (x *RawArray) String() string {
|
|||||||
func (*RawArray) ProtoMessage() {}
|
func (*RawArray) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *RawArray) ProtoReflect() protoreflect.Message {
|
func (x *RawArray) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_mxaccess_gateway_proto_msgTypes[99]
|
mi := &file_mxaccess_gateway_proto_msgTypes[100]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -8560,7 +8640,7 @@ func (x *RawArray) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use RawArray.ProtoReflect.Descriptor instead.
|
// Deprecated: Use RawArray.ProtoReflect.Descriptor instead.
|
||||||
func (*RawArray) Descriptor() ([]byte, []int) {
|
func (*RawArray) Descriptor() ([]byte, []int) {
|
||||||
return file_mxaccess_gateway_proto_rawDescGZIP(), []int{99}
|
return file_mxaccess_gateway_proto_rawDescGZIP(), []int{100}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RawArray) GetValues() [][]byte {
|
func (x *RawArray) GetValues() [][]byte {
|
||||||
@@ -8580,7 +8660,7 @@ type ProtocolStatus struct {
|
|||||||
|
|
||||||
func (x *ProtocolStatus) Reset() {
|
func (x *ProtocolStatus) Reset() {
|
||||||
*x = ProtocolStatus{}
|
*x = ProtocolStatus{}
|
||||||
mi := &file_mxaccess_gateway_proto_msgTypes[100]
|
mi := &file_mxaccess_gateway_proto_msgTypes[101]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@@ -8592,7 +8672,7 @@ func (x *ProtocolStatus) String() string {
|
|||||||
func (*ProtocolStatus) ProtoMessage() {}
|
func (*ProtocolStatus) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *ProtocolStatus) ProtoReflect() protoreflect.Message {
|
func (x *ProtocolStatus) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_mxaccess_gateway_proto_msgTypes[100]
|
mi := &file_mxaccess_gateway_proto_msgTypes[101]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@@ -8605,7 +8685,7 @@ func (x *ProtocolStatus) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use ProtocolStatus.ProtoReflect.Descriptor instead.
|
// Deprecated: Use ProtocolStatus.ProtoReflect.Descriptor instead.
|
||||||
func (*ProtocolStatus) Descriptor() ([]byte, []int) {
|
func (*ProtocolStatus) Descriptor() ([]byte, []int) {
|
||||||
return file_mxaccess_gateway_proto_rawDescGZIP(), []int{100}
|
return file_mxaccess_gateway_proto_rawDescGZIP(), []int{101}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ProtocolStatus) GetCode() ProtocolStatusCode {
|
func (x *ProtocolStatus) GetCode() ProtocolStatusCode {
|
||||||
@@ -9115,20 +9195,23 @@ const file_mxaccess_gateway_proto_rawDesc = "" +
|
|||||||
"session_id\"y\n" +
|
"session_id\"y\n" +
|
||||||
"\x13StreamAlarmsRequest\x122\n" +
|
"\x13StreamAlarmsRequest\x122\n" +
|
||||||
"\x15client_correlation_id\x18\x01 \x01(\tR\x13clientCorrelationId\x12.\n" +
|
"\x15client_correlation_id\x18\x01 \x01(\tR\x13clientCorrelationId\x12.\n" +
|
||||||
"\x13alarm_filter_prefix\x18\x02 \x01(\tR\x11alarmFilterPrefix\"\xbf\x02\n" +
|
"\x13alarm_filter_prefix\x18\x02 \x01(\tR\x11alarmFilterPrefix\"\x94\x03\n" +
|
||||||
"\x10AlarmFeedMessage\x12M\n" +
|
"\x10AlarmFeedMessage\x12M\n" +
|
||||||
"\factive_alarm\x18\x01 \x01(\v2(.mxaccess_gateway.v1.ActiveAlarmSnapshotH\x00R\vactiveAlarm\x12-\n" +
|
"\factive_alarm\x18\x01 \x01(\v2(.mxaccess_gateway.v1.ActiveAlarmSnapshotH\x00R\vactiveAlarm\x12-\n" +
|
||||||
"\x11snapshot_complete\x18\x02 \x01(\bH\x00R\x10snapshotComplete\x12M\n" +
|
"\x11snapshot_complete\x18\x02 \x01(\bH\x00R\x10snapshotComplete\x12M\n" +
|
||||||
"\n" +
|
"\n" +
|
||||||
"transition\x18\x03 \x01(\v2+.mxaccess_gateway.v1.OnAlarmTransitionEventH\x00R\n" +
|
"transition\x18\x03 \x01(\v2+.mxaccess_gateway.v1.OnAlarmTransitionEventH\x00R\n" +
|
||||||
"transition\x12S\n" +
|
"transition\x12S\n" +
|
||||||
"\x0fprovider_status\x18\x04 \x01(\v2(.mxaccess_gateway.v1.AlarmProviderStatusH\x00R\x0eproviderStatusB\t\n" +
|
"\x0fprovider_status\x18\x04 \x01(\v2(.mxaccess_gateway.v1.AlarmProviderStatusH\x00R\x0eproviderStatus\x12S\n" +
|
||||||
|
"\x0fsnapshot_status\x18\x05 \x01(\v2(.mxaccess_gateway.v1.AlarmSnapshotStatusH\x00R\x0esnapshotStatusB\t\n" +
|
||||||
"\apayload\"\xb7\x01\n" +
|
"\apayload\"\xb7\x01\n" +
|
||||||
"\x13AlarmProviderStatus\x12:\n" +
|
"\x13AlarmProviderStatus\x12:\n" +
|
||||||
"\x04mode\x18\x01 \x01(\x0e2&.mxaccess_gateway.v1.AlarmProviderModeR\x04mode\x12\x1a\n" +
|
"\x04mode\x18\x01 \x01(\x0e2&.mxaccess_gateway.v1.AlarmProviderModeR\x04mode\x12\x1a\n" +
|
||||||
"\bdegraded\x18\x02 \x01(\bR\bdegraded\x12\x16\n" +
|
"\bdegraded\x18\x02 \x01(\bR\bdegraded\x12\x16\n" +
|
||||||
"\x06reason\x18\x03 \x01(\tR\x06reason\x120\n" +
|
"\x06reason\x18\x03 \x01(\tR\x06reason\x120\n" +
|
||||||
"\x05since\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\x05since\"\xbe\x02\n" +
|
"\x05since\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\x05since\"3\n" +
|
||||||
|
"\x13AlarmSnapshotStatus\x12\x1c\n" +
|
||||||
|
"\ttruncated\x18\x01 \x01(\bR\ttruncated\"\xbe\x02\n" +
|
||||||
"\rMxStatusProxy\x12\x18\n" +
|
"\rMxStatusProxy\x12\x18\n" +
|
||||||
"\asuccess\x18\x01 \x01(\x05R\asuccess\x12A\n" +
|
"\asuccess\x18\x01 \x01(\x05R\asuccess\x12A\n" +
|
||||||
"\bcategory\x18\x02 \x01(\x0e2%.mxaccess_gateway.v1.MxStatusCategoryR\bcategory\x12D\n" +
|
"\bcategory\x18\x02 \x01(\x0e2%.mxaccess_gateway.v1.MxStatusCategoryR\bcategory\x12D\n" +
|
||||||
@@ -9364,7 +9447,7 @@ func file_mxaccess_gateway_proto_rawDescGZIP() []byte {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var file_mxaccess_gateway_proto_enumTypes = make([]protoimpl.EnumInfo, 10)
|
var file_mxaccess_gateway_proto_enumTypes = make([]protoimpl.EnumInfo, 10)
|
||||||
var file_mxaccess_gateway_proto_msgTypes = make([]protoimpl.MessageInfo, 101)
|
var file_mxaccess_gateway_proto_msgTypes = make([]protoimpl.MessageInfo, 102)
|
||||||
var file_mxaccess_gateway_proto_goTypes = []any{
|
var file_mxaccess_gateway_proto_goTypes = []any{
|
||||||
(MxCommandKind)(0), // 0: mxaccess_gateway.v1.MxCommandKind
|
(MxCommandKind)(0), // 0: mxaccess_gateway.v1.MxCommandKind
|
||||||
(AlarmProviderMode)(0), // 1: mxaccess_gateway.v1.AlarmProviderMode
|
(AlarmProviderMode)(0), // 1: mxaccess_gateway.v1.AlarmProviderMode
|
||||||
@@ -9463,29 +9546,30 @@ var file_mxaccess_gateway_proto_goTypes = []any{
|
|||||||
(*StreamAlarmsRequest)(nil), // 94: mxaccess_gateway.v1.StreamAlarmsRequest
|
(*StreamAlarmsRequest)(nil), // 94: mxaccess_gateway.v1.StreamAlarmsRequest
|
||||||
(*AlarmFeedMessage)(nil), // 95: mxaccess_gateway.v1.AlarmFeedMessage
|
(*AlarmFeedMessage)(nil), // 95: mxaccess_gateway.v1.AlarmFeedMessage
|
||||||
(*AlarmProviderStatus)(nil), // 96: mxaccess_gateway.v1.AlarmProviderStatus
|
(*AlarmProviderStatus)(nil), // 96: mxaccess_gateway.v1.AlarmProviderStatus
|
||||||
(*MxStatusProxy)(nil), // 97: mxaccess_gateway.v1.MxStatusProxy
|
(*AlarmSnapshotStatus)(nil), // 97: mxaccess_gateway.v1.AlarmSnapshotStatus
|
||||||
(*MxValue)(nil), // 98: mxaccess_gateway.v1.MxValue
|
(*MxStatusProxy)(nil), // 98: mxaccess_gateway.v1.MxStatusProxy
|
||||||
(*MxArray)(nil), // 99: mxaccess_gateway.v1.MxArray
|
(*MxValue)(nil), // 99: mxaccess_gateway.v1.MxValue
|
||||||
(*MxSparseArray)(nil), // 100: mxaccess_gateway.v1.MxSparseArray
|
(*MxArray)(nil), // 100: mxaccess_gateway.v1.MxArray
|
||||||
(*MxSparseElement)(nil), // 101: mxaccess_gateway.v1.MxSparseElement
|
(*MxSparseArray)(nil), // 101: mxaccess_gateway.v1.MxSparseArray
|
||||||
(*BoolArray)(nil), // 102: mxaccess_gateway.v1.BoolArray
|
(*MxSparseElement)(nil), // 102: mxaccess_gateway.v1.MxSparseElement
|
||||||
(*Int32Array)(nil), // 103: mxaccess_gateway.v1.Int32Array
|
(*BoolArray)(nil), // 103: mxaccess_gateway.v1.BoolArray
|
||||||
(*Int64Array)(nil), // 104: mxaccess_gateway.v1.Int64Array
|
(*Int32Array)(nil), // 104: mxaccess_gateway.v1.Int32Array
|
||||||
(*FloatArray)(nil), // 105: mxaccess_gateway.v1.FloatArray
|
(*Int64Array)(nil), // 105: mxaccess_gateway.v1.Int64Array
|
||||||
(*DoubleArray)(nil), // 106: mxaccess_gateway.v1.DoubleArray
|
(*FloatArray)(nil), // 106: mxaccess_gateway.v1.FloatArray
|
||||||
(*StringArray)(nil), // 107: mxaccess_gateway.v1.StringArray
|
(*DoubleArray)(nil), // 107: mxaccess_gateway.v1.DoubleArray
|
||||||
(*TimestampArray)(nil), // 108: mxaccess_gateway.v1.TimestampArray
|
(*StringArray)(nil), // 108: mxaccess_gateway.v1.StringArray
|
||||||
(*RawArray)(nil), // 109: mxaccess_gateway.v1.RawArray
|
(*TimestampArray)(nil), // 109: mxaccess_gateway.v1.TimestampArray
|
||||||
(*ProtocolStatus)(nil), // 110: mxaccess_gateway.v1.ProtocolStatus
|
(*RawArray)(nil), // 110: mxaccess_gateway.v1.RawArray
|
||||||
(*durationpb.Duration)(nil), // 111: google.protobuf.Duration
|
(*ProtocolStatus)(nil), // 111: mxaccess_gateway.v1.ProtocolStatus
|
||||||
(*timestamppb.Timestamp)(nil), // 112: google.protobuf.Timestamp
|
(*durationpb.Duration)(nil), // 112: google.protobuf.Duration
|
||||||
|
(*timestamppb.Timestamp)(nil), // 113: google.protobuf.Timestamp
|
||||||
}
|
}
|
||||||
var file_mxaccess_gateway_proto_depIdxs = []int32{
|
var file_mxaccess_gateway_proto_depIdxs = []int32{
|
||||||
111, // 0: mxaccess_gateway.v1.OpenSessionRequest.command_timeout:type_name -> google.protobuf.Duration
|
112, // 0: mxaccess_gateway.v1.OpenSessionRequest.command_timeout:type_name -> google.protobuf.Duration
|
||||||
111, // 1: mxaccess_gateway.v1.OpenSessionReply.default_command_timeout:type_name -> google.protobuf.Duration
|
112, // 1: mxaccess_gateway.v1.OpenSessionReply.default_command_timeout:type_name -> google.protobuf.Duration
|
||||||
110, // 2: mxaccess_gateway.v1.OpenSessionReply.protocol_status:type_name -> mxaccess_gateway.v1.ProtocolStatus
|
111, // 2: mxaccess_gateway.v1.OpenSessionReply.protocol_status:type_name -> mxaccess_gateway.v1.ProtocolStatus
|
||||||
9, // 3: mxaccess_gateway.v1.CloseSessionReply.final_state:type_name -> mxaccess_gateway.v1.SessionState
|
9, // 3: mxaccess_gateway.v1.CloseSessionReply.final_state:type_name -> mxaccess_gateway.v1.SessionState
|
||||||
110, // 4: mxaccess_gateway.v1.CloseSessionReply.protocol_status:type_name -> mxaccess_gateway.v1.ProtocolStatus
|
111, // 4: mxaccess_gateway.v1.CloseSessionReply.protocol_status:type_name -> mxaccess_gateway.v1.ProtocolStatus
|
||||||
17, // 5: mxaccess_gateway.v1.MxCommandRequest.command:type_name -> mxaccess_gateway.v1.MxCommand
|
17, // 5: mxaccess_gateway.v1.MxCommandRequest.command:type_name -> mxaccess_gateway.v1.MxCommand
|
||||||
0, // 6: mxaccess_gateway.v1.MxCommand.kind:type_name -> mxaccess_gateway.v1.MxCommandKind
|
0, // 6: mxaccess_gateway.v1.MxCommand.kind:type_name -> mxaccess_gateway.v1.MxCommandKind
|
||||||
18, // 7: mxaccess_gateway.v1.MxCommand.register:type_name -> mxaccess_gateway.v1.RegisterCommand
|
18, // 7: mxaccess_gateway.v1.MxCommand.register:type_name -> mxaccess_gateway.v1.RegisterCommand
|
||||||
@@ -9527,30 +9611,30 @@ var file_mxaccess_gateway_proto_depIdxs = []int32{
|
|||||||
60, // 43: mxaccess_gateway.v1.MxCommand.get_worker_info:type_name -> mxaccess_gateway.v1.GetWorkerInfoCommand
|
60, // 43: mxaccess_gateway.v1.MxCommand.get_worker_info:type_name -> mxaccess_gateway.v1.GetWorkerInfoCommand
|
||||||
61, // 44: mxaccess_gateway.v1.MxCommand.drain_events:type_name -> mxaccess_gateway.v1.DrainEventsCommand
|
61, // 44: mxaccess_gateway.v1.MxCommand.drain_events:type_name -> mxaccess_gateway.v1.DrainEventsCommand
|
||||||
62, // 45: mxaccess_gateway.v1.MxCommand.shutdown_worker:type_name -> mxaccess_gateway.v1.ShutdownWorkerCommand
|
62, // 45: mxaccess_gateway.v1.MxCommand.shutdown_worker:type_name -> mxaccess_gateway.v1.ShutdownWorkerCommand
|
||||||
98, // 46: mxaccess_gateway.v1.WriteCommand.value:type_name -> mxaccess_gateway.v1.MxValue
|
99, // 46: mxaccess_gateway.v1.WriteCommand.value:type_name -> mxaccess_gateway.v1.MxValue
|
||||||
98, // 47: mxaccess_gateway.v1.Write2Command.value:type_name -> mxaccess_gateway.v1.MxValue
|
99, // 47: mxaccess_gateway.v1.Write2Command.value:type_name -> mxaccess_gateway.v1.MxValue
|
||||||
98, // 48: mxaccess_gateway.v1.Write2Command.timestamp_value:type_name -> mxaccess_gateway.v1.MxValue
|
99, // 48: mxaccess_gateway.v1.Write2Command.timestamp_value:type_name -> mxaccess_gateway.v1.MxValue
|
||||||
98, // 49: mxaccess_gateway.v1.WriteSecuredCommand.value:type_name -> mxaccess_gateway.v1.MxValue
|
99, // 49: mxaccess_gateway.v1.WriteSecuredCommand.value:type_name -> mxaccess_gateway.v1.MxValue
|
||||||
98, // 50: mxaccess_gateway.v1.WriteSecured2Command.value:type_name -> mxaccess_gateway.v1.MxValue
|
99, // 50: mxaccess_gateway.v1.WriteSecured2Command.value:type_name -> mxaccess_gateway.v1.MxValue
|
||||||
98, // 51: mxaccess_gateway.v1.WriteSecured2Command.timestamp_value:type_name -> mxaccess_gateway.v1.MxValue
|
99, // 51: mxaccess_gateway.v1.WriteSecured2Command.timestamp_value:type_name -> mxaccess_gateway.v1.MxValue
|
||||||
1, // 52: mxaccess_gateway.v1.SubscribeAlarmsCommand.forced_mode:type_name -> mxaccess_gateway.v1.AlarmProviderMode
|
1, // 52: mxaccess_gateway.v1.SubscribeAlarmsCommand.forced_mode:type_name -> mxaccess_gateway.v1.AlarmProviderMode
|
||||||
43, // 53: mxaccess_gateway.v1.SubscribeAlarmsCommand.watch_list:type_name -> mxaccess_gateway.v1.AlarmSubtagTarget
|
43, // 53: mxaccess_gateway.v1.SubscribeAlarmsCommand.watch_list:type_name -> mxaccess_gateway.v1.AlarmSubtagTarget
|
||||||
44, // 54: mxaccess_gateway.v1.SubscribeAlarmsCommand.failover:type_name -> mxaccess_gateway.v1.AlarmFailoverConfig
|
44, // 54: mxaccess_gateway.v1.SubscribeAlarmsCommand.failover:type_name -> mxaccess_gateway.v1.AlarmFailoverConfig
|
||||||
50, // 55: mxaccess_gateway.v1.WriteBulkCommand.entries:type_name -> mxaccess_gateway.v1.WriteBulkEntry
|
50, // 55: mxaccess_gateway.v1.WriteBulkCommand.entries:type_name -> mxaccess_gateway.v1.WriteBulkEntry
|
||||||
98, // 56: mxaccess_gateway.v1.WriteBulkEntry.value:type_name -> mxaccess_gateway.v1.MxValue
|
99, // 56: mxaccess_gateway.v1.WriteBulkEntry.value:type_name -> mxaccess_gateway.v1.MxValue
|
||||||
52, // 57: mxaccess_gateway.v1.Write2BulkCommand.entries:type_name -> mxaccess_gateway.v1.Write2BulkEntry
|
52, // 57: mxaccess_gateway.v1.Write2BulkCommand.entries:type_name -> mxaccess_gateway.v1.Write2BulkEntry
|
||||||
98, // 58: mxaccess_gateway.v1.Write2BulkEntry.value:type_name -> mxaccess_gateway.v1.MxValue
|
99, // 58: mxaccess_gateway.v1.Write2BulkEntry.value:type_name -> mxaccess_gateway.v1.MxValue
|
||||||
98, // 59: mxaccess_gateway.v1.Write2BulkEntry.timestamp_value:type_name -> mxaccess_gateway.v1.MxValue
|
99, // 59: mxaccess_gateway.v1.Write2BulkEntry.timestamp_value:type_name -> mxaccess_gateway.v1.MxValue
|
||||||
54, // 60: mxaccess_gateway.v1.WriteSecuredBulkCommand.entries:type_name -> mxaccess_gateway.v1.WriteSecuredBulkEntry
|
54, // 60: mxaccess_gateway.v1.WriteSecuredBulkCommand.entries:type_name -> mxaccess_gateway.v1.WriteSecuredBulkEntry
|
||||||
98, // 61: mxaccess_gateway.v1.WriteSecuredBulkEntry.value:type_name -> mxaccess_gateway.v1.MxValue
|
99, // 61: mxaccess_gateway.v1.WriteSecuredBulkEntry.value:type_name -> mxaccess_gateway.v1.MxValue
|
||||||
56, // 62: mxaccess_gateway.v1.WriteSecured2BulkCommand.entries:type_name -> mxaccess_gateway.v1.WriteSecured2BulkEntry
|
56, // 62: mxaccess_gateway.v1.WriteSecured2BulkCommand.entries:type_name -> mxaccess_gateway.v1.WriteSecured2BulkEntry
|
||||||
98, // 63: mxaccess_gateway.v1.WriteSecured2BulkEntry.value:type_name -> mxaccess_gateway.v1.MxValue
|
99, // 63: mxaccess_gateway.v1.WriteSecured2BulkEntry.value:type_name -> mxaccess_gateway.v1.MxValue
|
||||||
98, // 64: mxaccess_gateway.v1.WriteSecured2BulkEntry.timestamp_value:type_name -> mxaccess_gateway.v1.MxValue
|
99, // 64: mxaccess_gateway.v1.WriteSecured2BulkEntry.timestamp_value:type_name -> mxaccess_gateway.v1.MxValue
|
||||||
111, // 65: mxaccess_gateway.v1.ShutdownWorkerCommand.grace_period:type_name -> google.protobuf.Duration
|
112, // 65: mxaccess_gateway.v1.ShutdownWorkerCommand.grace_period:type_name -> google.protobuf.Duration
|
||||||
0, // 66: mxaccess_gateway.v1.MxCommandReply.kind:type_name -> mxaccess_gateway.v1.MxCommandKind
|
0, // 66: mxaccess_gateway.v1.MxCommandReply.kind:type_name -> mxaccess_gateway.v1.MxCommandKind
|
||||||
110, // 67: mxaccess_gateway.v1.MxCommandReply.protocol_status:type_name -> mxaccess_gateway.v1.ProtocolStatus
|
111, // 67: mxaccess_gateway.v1.MxCommandReply.protocol_status:type_name -> mxaccess_gateway.v1.ProtocolStatus
|
||||||
98, // 68: mxaccess_gateway.v1.MxCommandReply.return_value:type_name -> mxaccess_gateway.v1.MxValue
|
99, // 68: mxaccess_gateway.v1.MxCommandReply.return_value:type_name -> mxaccess_gateway.v1.MxValue
|
||||||
97, // 69: mxaccess_gateway.v1.MxCommandReply.statuses:type_name -> mxaccess_gateway.v1.MxStatusProxy
|
98, // 69: mxaccess_gateway.v1.MxCommandReply.statuses:type_name -> mxaccess_gateway.v1.MxStatusProxy
|
||||||
64, // 70: mxaccess_gateway.v1.MxCommandReply.register:type_name -> mxaccess_gateway.v1.RegisterReply
|
64, // 70: mxaccess_gateway.v1.MxCommandReply.register:type_name -> mxaccess_gateway.v1.RegisterReply
|
||||||
65, // 71: mxaccess_gateway.v1.MxCommandReply.add_item:type_name -> mxaccess_gateway.v1.AddItemReply
|
65, // 71: mxaccess_gateway.v1.MxCommandReply.add_item:type_name -> mxaccess_gateway.v1.AddItemReply
|
||||||
66, // 72: mxaccess_gateway.v1.MxCommandReply.add_item2:type_name -> mxaccess_gateway.v1.AddItem2Reply
|
66, // 72: mxaccess_gateway.v1.MxCommandReply.add_item2:type_name -> mxaccess_gateway.v1.AddItem2Reply
|
||||||
@@ -9575,24 +9659,24 @@ var file_mxaccess_gateway_proto_depIdxs = []int32{
|
|||||||
78, // 91: mxaccess_gateway.v1.MxCommandReply.session_state:type_name -> mxaccess_gateway.v1.SessionStateReply
|
78, // 91: mxaccess_gateway.v1.MxCommandReply.session_state:type_name -> mxaccess_gateway.v1.SessionStateReply
|
||||||
79, // 92: mxaccess_gateway.v1.MxCommandReply.worker_info:type_name -> mxaccess_gateway.v1.WorkerInfoReply
|
79, // 92: mxaccess_gateway.v1.MxCommandReply.worker_info:type_name -> mxaccess_gateway.v1.WorkerInfoReply
|
||||||
80, // 93: mxaccess_gateway.v1.MxCommandReply.drain_events:type_name -> mxaccess_gateway.v1.DrainEventsReply
|
80, // 93: mxaccess_gateway.v1.MxCommandReply.drain_events:type_name -> mxaccess_gateway.v1.DrainEventsReply
|
||||||
97, // 94: mxaccess_gateway.v1.SuspendReply.status:type_name -> mxaccess_gateway.v1.MxStatusProxy
|
98, // 94: mxaccess_gateway.v1.SuspendReply.status:type_name -> mxaccess_gateway.v1.MxStatusProxy
|
||||||
97, // 95: mxaccess_gateway.v1.ActivateReply.status:type_name -> mxaccess_gateway.v1.MxStatusProxy
|
98, // 95: mxaccess_gateway.v1.ActivateReply.status:type_name -> mxaccess_gateway.v1.MxStatusProxy
|
||||||
72, // 96: mxaccess_gateway.v1.BulkSubscribeReply.results:type_name -> mxaccess_gateway.v1.SubscribeResult
|
72, // 96: mxaccess_gateway.v1.BulkSubscribeReply.results:type_name -> mxaccess_gateway.v1.SubscribeResult
|
||||||
97, // 97: mxaccess_gateway.v1.BulkWriteResult.statuses:type_name -> mxaccess_gateway.v1.MxStatusProxy
|
98, // 97: mxaccess_gateway.v1.BulkWriteResult.statuses:type_name -> mxaccess_gateway.v1.MxStatusProxy
|
||||||
74, // 98: mxaccess_gateway.v1.BulkWriteReply.results:type_name -> mxaccess_gateway.v1.BulkWriteResult
|
74, // 98: mxaccess_gateway.v1.BulkWriteReply.results:type_name -> mxaccess_gateway.v1.BulkWriteResult
|
||||||
98, // 99: mxaccess_gateway.v1.BulkReadResult.value:type_name -> mxaccess_gateway.v1.MxValue
|
99, // 99: mxaccess_gateway.v1.BulkReadResult.value:type_name -> mxaccess_gateway.v1.MxValue
|
||||||
112, // 100: mxaccess_gateway.v1.BulkReadResult.source_timestamp:type_name -> google.protobuf.Timestamp
|
113, // 100: mxaccess_gateway.v1.BulkReadResult.source_timestamp:type_name -> google.protobuf.Timestamp
|
||||||
97, // 101: mxaccess_gateway.v1.BulkReadResult.statuses:type_name -> mxaccess_gateway.v1.MxStatusProxy
|
98, // 101: mxaccess_gateway.v1.BulkReadResult.statuses:type_name -> mxaccess_gateway.v1.MxStatusProxy
|
||||||
76, // 102: mxaccess_gateway.v1.BulkReadReply.results:type_name -> mxaccess_gateway.v1.BulkReadResult
|
76, // 102: mxaccess_gateway.v1.BulkReadReply.results:type_name -> mxaccess_gateway.v1.BulkReadResult
|
||||||
9, // 103: mxaccess_gateway.v1.SessionStateReply.state:type_name -> mxaccess_gateway.v1.SessionState
|
9, // 103: mxaccess_gateway.v1.SessionStateReply.state:type_name -> mxaccess_gateway.v1.SessionState
|
||||||
83, // 104: mxaccess_gateway.v1.DrainEventsReply.events:type_name -> mxaccess_gateway.v1.MxEvent
|
83, // 104: mxaccess_gateway.v1.DrainEventsReply.events:type_name -> mxaccess_gateway.v1.MxEvent
|
||||||
91, // 105: mxaccess_gateway.v1.QueryActiveAlarmsReplyPayload.snapshots:type_name -> mxaccess_gateway.v1.ActiveAlarmSnapshot
|
91, // 105: mxaccess_gateway.v1.QueryActiveAlarmsReplyPayload.snapshots:type_name -> mxaccess_gateway.v1.ActiveAlarmSnapshot
|
||||||
2, // 106: mxaccess_gateway.v1.MxEvent.family:type_name -> mxaccess_gateway.v1.MxEventFamily
|
2, // 106: mxaccess_gateway.v1.MxEvent.family:type_name -> mxaccess_gateway.v1.MxEventFamily
|
||||||
98, // 107: mxaccess_gateway.v1.MxEvent.value:type_name -> mxaccess_gateway.v1.MxValue
|
99, // 107: mxaccess_gateway.v1.MxEvent.value:type_name -> mxaccess_gateway.v1.MxValue
|
||||||
112, // 108: mxaccess_gateway.v1.MxEvent.source_timestamp:type_name -> google.protobuf.Timestamp
|
113, // 108: mxaccess_gateway.v1.MxEvent.source_timestamp:type_name -> google.protobuf.Timestamp
|
||||||
97, // 109: mxaccess_gateway.v1.MxEvent.statuses:type_name -> mxaccess_gateway.v1.MxStatusProxy
|
98, // 109: mxaccess_gateway.v1.MxEvent.statuses:type_name -> mxaccess_gateway.v1.MxStatusProxy
|
||||||
112, // 110: mxaccess_gateway.v1.MxEvent.worker_timestamp:type_name -> google.protobuf.Timestamp
|
113, // 110: mxaccess_gateway.v1.MxEvent.worker_timestamp:type_name -> google.protobuf.Timestamp
|
||||||
112, // 111: mxaccess_gateway.v1.MxEvent.gateway_receive_timestamp:type_name -> google.protobuf.Timestamp
|
113, // 111: mxaccess_gateway.v1.MxEvent.gateway_receive_timestamp:type_name -> google.protobuf.Timestamp
|
||||||
84, // 112: mxaccess_gateway.v1.MxEvent.replay_gap:type_name -> mxaccess_gateway.v1.ReplayGap
|
84, // 112: mxaccess_gateway.v1.MxEvent.replay_gap:type_name -> mxaccess_gateway.v1.ReplayGap
|
||||||
85, // 113: mxaccess_gateway.v1.MxEvent.on_data_change:type_name -> mxaccess_gateway.v1.OnDataChangeEvent
|
85, // 113: mxaccess_gateway.v1.MxEvent.on_data_change:type_name -> mxaccess_gateway.v1.OnDataChangeEvent
|
||||||
86, // 114: mxaccess_gateway.v1.MxEvent.on_write_complete:type_name -> mxaccess_gateway.v1.OnWriteCompleteEvent
|
86, // 114: mxaccess_gateway.v1.MxEvent.on_write_complete:type_name -> mxaccess_gateway.v1.OnWriteCompleteEvent
|
||||||
@@ -9601,68 +9685,69 @@ var file_mxaccess_gateway_proto_depIdxs = []int32{
|
|||||||
89, // 117: mxaccess_gateway.v1.MxEvent.on_alarm_transition:type_name -> mxaccess_gateway.v1.OnAlarmTransitionEvent
|
89, // 117: mxaccess_gateway.v1.MxEvent.on_alarm_transition:type_name -> mxaccess_gateway.v1.OnAlarmTransitionEvent
|
||||||
90, // 118: mxaccess_gateway.v1.MxEvent.on_alarm_provider_mode_changed:type_name -> mxaccess_gateway.v1.OnAlarmProviderModeChangedEvent
|
90, // 118: mxaccess_gateway.v1.MxEvent.on_alarm_provider_mode_changed:type_name -> mxaccess_gateway.v1.OnAlarmProviderModeChangedEvent
|
||||||
7, // 119: mxaccess_gateway.v1.OnBufferedDataChangeEvent.data_type:type_name -> mxaccess_gateway.v1.MxDataType
|
7, // 119: mxaccess_gateway.v1.OnBufferedDataChangeEvent.data_type:type_name -> mxaccess_gateway.v1.MxDataType
|
||||||
99, // 120: mxaccess_gateway.v1.OnBufferedDataChangeEvent.quality_values:type_name -> mxaccess_gateway.v1.MxArray
|
100, // 120: mxaccess_gateway.v1.OnBufferedDataChangeEvent.quality_values:type_name -> mxaccess_gateway.v1.MxArray
|
||||||
99, // 121: mxaccess_gateway.v1.OnBufferedDataChangeEvent.timestamp_values:type_name -> mxaccess_gateway.v1.MxArray
|
100, // 121: mxaccess_gateway.v1.OnBufferedDataChangeEvent.timestamp_values:type_name -> mxaccess_gateway.v1.MxArray
|
||||||
3, // 122: mxaccess_gateway.v1.OnAlarmTransitionEvent.transition_kind:type_name -> mxaccess_gateway.v1.AlarmTransitionKind
|
3, // 122: mxaccess_gateway.v1.OnAlarmTransitionEvent.transition_kind:type_name -> mxaccess_gateway.v1.AlarmTransitionKind
|
||||||
112, // 123: mxaccess_gateway.v1.OnAlarmTransitionEvent.original_raise_timestamp:type_name -> google.protobuf.Timestamp
|
113, // 123: mxaccess_gateway.v1.OnAlarmTransitionEvent.original_raise_timestamp:type_name -> google.protobuf.Timestamp
|
||||||
112, // 124: mxaccess_gateway.v1.OnAlarmTransitionEvent.transition_timestamp:type_name -> google.protobuf.Timestamp
|
113, // 124: mxaccess_gateway.v1.OnAlarmTransitionEvent.transition_timestamp:type_name -> google.protobuf.Timestamp
|
||||||
98, // 125: mxaccess_gateway.v1.OnAlarmTransitionEvent.current_value:type_name -> mxaccess_gateway.v1.MxValue
|
99, // 125: mxaccess_gateway.v1.OnAlarmTransitionEvent.current_value:type_name -> mxaccess_gateway.v1.MxValue
|
||||||
98, // 126: mxaccess_gateway.v1.OnAlarmTransitionEvent.limit_value:type_name -> mxaccess_gateway.v1.MxValue
|
99, // 126: mxaccess_gateway.v1.OnAlarmTransitionEvent.limit_value:type_name -> mxaccess_gateway.v1.MxValue
|
||||||
1, // 127: mxaccess_gateway.v1.OnAlarmTransitionEvent.source_provider:type_name -> mxaccess_gateway.v1.AlarmProviderMode
|
1, // 127: mxaccess_gateway.v1.OnAlarmTransitionEvent.source_provider:type_name -> mxaccess_gateway.v1.AlarmProviderMode
|
||||||
1, // 128: mxaccess_gateway.v1.OnAlarmProviderModeChangedEvent.mode:type_name -> mxaccess_gateway.v1.AlarmProviderMode
|
1, // 128: mxaccess_gateway.v1.OnAlarmProviderModeChangedEvent.mode:type_name -> mxaccess_gateway.v1.AlarmProviderMode
|
||||||
112, // 129: mxaccess_gateway.v1.OnAlarmProviderModeChangedEvent.at:type_name -> google.protobuf.Timestamp
|
113, // 129: mxaccess_gateway.v1.OnAlarmProviderModeChangedEvent.at:type_name -> google.protobuf.Timestamp
|
||||||
112, // 130: mxaccess_gateway.v1.ActiveAlarmSnapshot.original_raise_timestamp:type_name -> google.protobuf.Timestamp
|
113, // 130: mxaccess_gateway.v1.ActiveAlarmSnapshot.original_raise_timestamp:type_name -> google.protobuf.Timestamp
|
||||||
4, // 131: mxaccess_gateway.v1.ActiveAlarmSnapshot.current_state:type_name -> mxaccess_gateway.v1.AlarmConditionState
|
4, // 131: mxaccess_gateway.v1.ActiveAlarmSnapshot.current_state:type_name -> mxaccess_gateway.v1.AlarmConditionState
|
||||||
112, // 132: mxaccess_gateway.v1.ActiveAlarmSnapshot.last_transition_timestamp:type_name -> google.protobuf.Timestamp
|
113, // 132: mxaccess_gateway.v1.ActiveAlarmSnapshot.last_transition_timestamp:type_name -> google.protobuf.Timestamp
|
||||||
98, // 133: mxaccess_gateway.v1.ActiveAlarmSnapshot.current_value:type_name -> mxaccess_gateway.v1.MxValue
|
99, // 133: mxaccess_gateway.v1.ActiveAlarmSnapshot.current_value:type_name -> mxaccess_gateway.v1.MxValue
|
||||||
98, // 134: mxaccess_gateway.v1.ActiveAlarmSnapshot.limit_value:type_name -> mxaccess_gateway.v1.MxValue
|
99, // 134: mxaccess_gateway.v1.ActiveAlarmSnapshot.limit_value:type_name -> mxaccess_gateway.v1.MxValue
|
||||||
1, // 135: mxaccess_gateway.v1.ActiveAlarmSnapshot.source_provider:type_name -> mxaccess_gateway.v1.AlarmProviderMode
|
1, // 135: mxaccess_gateway.v1.ActiveAlarmSnapshot.source_provider:type_name -> mxaccess_gateway.v1.AlarmProviderMode
|
||||||
110, // 136: mxaccess_gateway.v1.AcknowledgeAlarmReply.protocol_status:type_name -> mxaccess_gateway.v1.ProtocolStatus
|
111, // 136: mxaccess_gateway.v1.AcknowledgeAlarmReply.protocol_status:type_name -> mxaccess_gateway.v1.ProtocolStatus
|
||||||
97, // 137: mxaccess_gateway.v1.AcknowledgeAlarmReply.status:type_name -> mxaccess_gateway.v1.MxStatusProxy
|
98, // 137: mxaccess_gateway.v1.AcknowledgeAlarmReply.status:type_name -> mxaccess_gateway.v1.MxStatusProxy
|
||||||
91, // 138: mxaccess_gateway.v1.AlarmFeedMessage.active_alarm:type_name -> mxaccess_gateway.v1.ActiveAlarmSnapshot
|
91, // 138: mxaccess_gateway.v1.AlarmFeedMessage.active_alarm:type_name -> mxaccess_gateway.v1.ActiveAlarmSnapshot
|
||||||
89, // 139: mxaccess_gateway.v1.AlarmFeedMessage.transition:type_name -> mxaccess_gateway.v1.OnAlarmTransitionEvent
|
89, // 139: mxaccess_gateway.v1.AlarmFeedMessage.transition:type_name -> mxaccess_gateway.v1.OnAlarmTransitionEvent
|
||||||
96, // 140: mxaccess_gateway.v1.AlarmFeedMessage.provider_status:type_name -> mxaccess_gateway.v1.AlarmProviderStatus
|
96, // 140: mxaccess_gateway.v1.AlarmFeedMessage.provider_status:type_name -> mxaccess_gateway.v1.AlarmProviderStatus
|
||||||
1, // 141: mxaccess_gateway.v1.AlarmProviderStatus.mode:type_name -> mxaccess_gateway.v1.AlarmProviderMode
|
97, // 141: mxaccess_gateway.v1.AlarmFeedMessage.snapshot_status:type_name -> mxaccess_gateway.v1.AlarmSnapshotStatus
|
||||||
112, // 142: mxaccess_gateway.v1.AlarmProviderStatus.since:type_name -> google.protobuf.Timestamp
|
1, // 142: mxaccess_gateway.v1.AlarmProviderStatus.mode:type_name -> mxaccess_gateway.v1.AlarmProviderMode
|
||||||
5, // 143: mxaccess_gateway.v1.MxStatusProxy.category:type_name -> mxaccess_gateway.v1.MxStatusCategory
|
113, // 143: mxaccess_gateway.v1.AlarmProviderStatus.since:type_name -> google.protobuf.Timestamp
|
||||||
6, // 144: mxaccess_gateway.v1.MxStatusProxy.detected_by:type_name -> mxaccess_gateway.v1.MxStatusSource
|
5, // 144: mxaccess_gateway.v1.MxStatusProxy.category:type_name -> mxaccess_gateway.v1.MxStatusCategory
|
||||||
7, // 145: mxaccess_gateway.v1.MxValue.data_type:type_name -> mxaccess_gateway.v1.MxDataType
|
6, // 145: mxaccess_gateway.v1.MxStatusProxy.detected_by:type_name -> mxaccess_gateway.v1.MxStatusSource
|
||||||
112, // 146: mxaccess_gateway.v1.MxValue.timestamp_value:type_name -> google.protobuf.Timestamp
|
7, // 146: mxaccess_gateway.v1.MxValue.data_type:type_name -> mxaccess_gateway.v1.MxDataType
|
||||||
99, // 147: mxaccess_gateway.v1.MxValue.array_value:type_name -> mxaccess_gateway.v1.MxArray
|
113, // 147: mxaccess_gateway.v1.MxValue.timestamp_value:type_name -> google.protobuf.Timestamp
|
||||||
100, // 148: mxaccess_gateway.v1.MxValue.sparse_array_value:type_name -> mxaccess_gateway.v1.MxSparseArray
|
100, // 148: mxaccess_gateway.v1.MxValue.array_value:type_name -> mxaccess_gateway.v1.MxArray
|
||||||
7, // 149: mxaccess_gateway.v1.MxArray.element_data_type:type_name -> mxaccess_gateway.v1.MxDataType
|
101, // 149: mxaccess_gateway.v1.MxValue.sparse_array_value:type_name -> mxaccess_gateway.v1.MxSparseArray
|
||||||
102, // 150: mxaccess_gateway.v1.MxArray.bool_values:type_name -> mxaccess_gateway.v1.BoolArray
|
7, // 150: mxaccess_gateway.v1.MxArray.element_data_type:type_name -> mxaccess_gateway.v1.MxDataType
|
||||||
103, // 151: mxaccess_gateway.v1.MxArray.int32_values:type_name -> mxaccess_gateway.v1.Int32Array
|
103, // 151: mxaccess_gateway.v1.MxArray.bool_values:type_name -> mxaccess_gateway.v1.BoolArray
|
||||||
104, // 152: mxaccess_gateway.v1.MxArray.int64_values:type_name -> mxaccess_gateway.v1.Int64Array
|
104, // 152: mxaccess_gateway.v1.MxArray.int32_values:type_name -> mxaccess_gateway.v1.Int32Array
|
||||||
105, // 153: mxaccess_gateway.v1.MxArray.float_values:type_name -> mxaccess_gateway.v1.FloatArray
|
105, // 153: mxaccess_gateway.v1.MxArray.int64_values:type_name -> mxaccess_gateway.v1.Int64Array
|
||||||
106, // 154: mxaccess_gateway.v1.MxArray.double_values:type_name -> mxaccess_gateway.v1.DoubleArray
|
106, // 154: mxaccess_gateway.v1.MxArray.float_values:type_name -> mxaccess_gateway.v1.FloatArray
|
||||||
107, // 155: mxaccess_gateway.v1.MxArray.string_values:type_name -> mxaccess_gateway.v1.StringArray
|
107, // 155: mxaccess_gateway.v1.MxArray.double_values:type_name -> mxaccess_gateway.v1.DoubleArray
|
||||||
108, // 156: mxaccess_gateway.v1.MxArray.timestamp_values:type_name -> mxaccess_gateway.v1.TimestampArray
|
108, // 156: mxaccess_gateway.v1.MxArray.string_values:type_name -> mxaccess_gateway.v1.StringArray
|
||||||
109, // 157: mxaccess_gateway.v1.MxArray.raw_values:type_name -> mxaccess_gateway.v1.RawArray
|
109, // 157: mxaccess_gateway.v1.MxArray.timestamp_values:type_name -> mxaccess_gateway.v1.TimestampArray
|
||||||
7, // 158: mxaccess_gateway.v1.MxSparseArray.element_data_type:type_name -> mxaccess_gateway.v1.MxDataType
|
110, // 158: mxaccess_gateway.v1.MxArray.raw_values:type_name -> mxaccess_gateway.v1.RawArray
|
||||||
101, // 159: mxaccess_gateway.v1.MxSparseArray.elements:type_name -> mxaccess_gateway.v1.MxSparseElement
|
7, // 159: mxaccess_gateway.v1.MxSparseArray.element_data_type:type_name -> mxaccess_gateway.v1.MxDataType
|
||||||
98, // 160: mxaccess_gateway.v1.MxSparseElement.value:type_name -> mxaccess_gateway.v1.MxValue
|
102, // 160: mxaccess_gateway.v1.MxSparseArray.elements:type_name -> mxaccess_gateway.v1.MxSparseElement
|
||||||
112, // 161: mxaccess_gateway.v1.TimestampArray.values:type_name -> google.protobuf.Timestamp
|
99, // 161: mxaccess_gateway.v1.MxSparseElement.value:type_name -> mxaccess_gateway.v1.MxValue
|
||||||
8, // 162: mxaccess_gateway.v1.ProtocolStatus.code:type_name -> mxaccess_gateway.v1.ProtocolStatusCode
|
113, // 162: mxaccess_gateway.v1.TimestampArray.values:type_name -> google.protobuf.Timestamp
|
||||||
11, // 163: mxaccess_gateway.v1.MxAccessGateway.OpenSession:input_type -> mxaccess_gateway.v1.OpenSessionRequest
|
8, // 163: mxaccess_gateway.v1.ProtocolStatus.code:type_name -> mxaccess_gateway.v1.ProtocolStatusCode
|
||||||
13, // 164: mxaccess_gateway.v1.MxAccessGateway.CloseSession:input_type -> mxaccess_gateway.v1.CloseSessionRequest
|
11, // 164: mxaccess_gateway.v1.MxAccessGateway.OpenSession:input_type -> mxaccess_gateway.v1.OpenSessionRequest
|
||||||
16, // 165: mxaccess_gateway.v1.MxAccessGateway.Invoke:input_type -> mxaccess_gateway.v1.MxCommandRequest
|
13, // 165: mxaccess_gateway.v1.MxAccessGateway.CloseSession:input_type -> mxaccess_gateway.v1.CloseSessionRequest
|
||||||
15, // 166: mxaccess_gateway.v1.MxAccessGateway.StreamEvents:input_type -> mxaccess_gateway.v1.StreamEventsRequest
|
16, // 166: mxaccess_gateway.v1.MxAccessGateway.Invoke:input_type -> mxaccess_gateway.v1.MxCommandRequest
|
||||||
92, // 167: mxaccess_gateway.v1.MxAccessGateway.AcknowledgeAlarm:input_type -> mxaccess_gateway.v1.AcknowledgeAlarmRequest
|
15, // 167: mxaccess_gateway.v1.MxAccessGateway.StreamEvents:input_type -> mxaccess_gateway.v1.StreamEventsRequest
|
||||||
94, // 168: mxaccess_gateway.v1.MxAccessGateway.StreamAlarms:input_type -> mxaccess_gateway.v1.StreamAlarmsRequest
|
92, // 168: mxaccess_gateway.v1.MxAccessGateway.AcknowledgeAlarm:input_type -> mxaccess_gateway.v1.AcknowledgeAlarmRequest
|
||||||
10, // 169: mxaccess_gateway.v1.MxAccessGateway.QueryActiveAlarms:input_type -> mxaccess_gateway.v1.QueryActiveAlarmsRequest
|
94, // 169: mxaccess_gateway.v1.MxAccessGateway.StreamAlarms:input_type -> mxaccess_gateway.v1.StreamAlarmsRequest
|
||||||
12, // 170: mxaccess_gateway.v1.MxAccessGateway.OpenSession:output_type -> mxaccess_gateway.v1.OpenSessionReply
|
10, // 170: mxaccess_gateway.v1.MxAccessGateway.QueryActiveAlarms:input_type -> mxaccess_gateway.v1.QueryActiveAlarmsRequest
|
||||||
14, // 171: mxaccess_gateway.v1.MxAccessGateway.CloseSession:output_type -> mxaccess_gateway.v1.CloseSessionReply
|
12, // 171: mxaccess_gateway.v1.MxAccessGateway.OpenSession:output_type -> mxaccess_gateway.v1.OpenSessionReply
|
||||||
63, // 172: mxaccess_gateway.v1.MxAccessGateway.Invoke:output_type -> mxaccess_gateway.v1.MxCommandReply
|
14, // 172: mxaccess_gateway.v1.MxAccessGateway.CloseSession:output_type -> mxaccess_gateway.v1.CloseSessionReply
|
||||||
83, // 173: mxaccess_gateway.v1.MxAccessGateway.StreamEvents:output_type -> mxaccess_gateway.v1.MxEvent
|
63, // 173: mxaccess_gateway.v1.MxAccessGateway.Invoke:output_type -> mxaccess_gateway.v1.MxCommandReply
|
||||||
93, // 174: mxaccess_gateway.v1.MxAccessGateway.AcknowledgeAlarm:output_type -> mxaccess_gateway.v1.AcknowledgeAlarmReply
|
83, // 174: mxaccess_gateway.v1.MxAccessGateway.StreamEvents:output_type -> mxaccess_gateway.v1.MxEvent
|
||||||
95, // 175: mxaccess_gateway.v1.MxAccessGateway.StreamAlarms:output_type -> mxaccess_gateway.v1.AlarmFeedMessage
|
93, // 175: mxaccess_gateway.v1.MxAccessGateway.AcknowledgeAlarm:output_type -> mxaccess_gateway.v1.AcknowledgeAlarmReply
|
||||||
91, // 176: mxaccess_gateway.v1.MxAccessGateway.QueryActiveAlarms:output_type -> mxaccess_gateway.v1.ActiveAlarmSnapshot
|
95, // 176: mxaccess_gateway.v1.MxAccessGateway.StreamAlarms:output_type -> mxaccess_gateway.v1.AlarmFeedMessage
|
||||||
170, // [170:177] is the sub-list for method output_type
|
91, // 177: mxaccess_gateway.v1.MxAccessGateway.QueryActiveAlarms:output_type -> mxaccess_gateway.v1.ActiveAlarmSnapshot
|
||||||
163, // [163:170] is the sub-list for method input_type
|
171, // [171:178] is the sub-list for method output_type
|
||||||
163, // [163:163] is the sub-list for extension type_name
|
164, // [164:171] is the sub-list for method input_type
|
||||||
163, // [163:163] is the sub-list for extension extendee
|
164, // [164:164] is the sub-list for extension type_name
|
||||||
0, // [0:163] is the sub-list for field type_name
|
164, // [164:164] is the sub-list for extension extendee
|
||||||
|
0, // [0:164] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_mxaccess_gateway_proto_init() }
|
func init() { file_mxaccess_gateway_proto_init() }
|
||||||
@@ -9752,8 +9837,9 @@ func file_mxaccess_gateway_proto_init() {
|
|||||||
(*AlarmFeedMessage_SnapshotComplete)(nil),
|
(*AlarmFeedMessage_SnapshotComplete)(nil),
|
||||||
(*AlarmFeedMessage_Transition)(nil),
|
(*AlarmFeedMessage_Transition)(nil),
|
||||||
(*AlarmFeedMessage_ProviderStatus)(nil),
|
(*AlarmFeedMessage_ProviderStatus)(nil),
|
||||||
|
(*AlarmFeedMessage_SnapshotStatus)(nil),
|
||||||
}
|
}
|
||||||
file_mxaccess_gateway_proto_msgTypes[88].OneofWrappers = []any{
|
file_mxaccess_gateway_proto_msgTypes[89].OneofWrappers = []any{
|
||||||
(*MxValue_BoolValue)(nil),
|
(*MxValue_BoolValue)(nil),
|
||||||
(*MxValue_Int32Value)(nil),
|
(*MxValue_Int32Value)(nil),
|
||||||
(*MxValue_Int64Value)(nil),
|
(*MxValue_Int64Value)(nil),
|
||||||
@@ -9765,7 +9851,7 @@ func file_mxaccess_gateway_proto_init() {
|
|||||||
(*MxValue_RawValue)(nil),
|
(*MxValue_RawValue)(nil),
|
||||||
(*MxValue_SparseArrayValue)(nil),
|
(*MxValue_SparseArrayValue)(nil),
|
||||||
}
|
}
|
||||||
file_mxaccess_gateway_proto_msgTypes[89].OneofWrappers = []any{
|
file_mxaccess_gateway_proto_msgTypes[90].OneofWrappers = []any{
|
||||||
(*MxArray_BoolValues)(nil),
|
(*MxArray_BoolValues)(nil),
|
||||||
(*MxArray_Int32Values)(nil),
|
(*MxArray_Int32Values)(nil),
|
||||||
(*MxArray_Int64Values)(nil),
|
(*MxArray_Int64Values)(nil),
|
||||||
@@ -9781,7 +9867,7 @@ func file_mxaccess_gateway_proto_init() {
|
|||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_mxaccess_gateway_proto_rawDesc), len(file_mxaccess_gateway_proto_rawDesc)),
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_mxaccess_gateway_proto_rawDesc), len(file_mxaccess_gateway_proto_rawDesc)),
|
||||||
NumEnums: 10,
|
NumEnums: 10,
|
||||||
NumMessages: 101,
|
NumMessages: 102,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 1,
|
NumServices: 1,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -125,6 +125,16 @@ deletions from it. It is set-level degraded status, not a comment on the
|
|||||||
record's own fidelity, and is distinct from `getDegraded()` (the subtag
|
record's own fidelity, and is distinct from `getDegraded()` (the subtag
|
||||||
fallback provider).
|
fallback provider).
|
||||||
|
|
||||||
|
`streamAlarms` also carries that completeness verdict at feed level, as a
|
||||||
|
message whose `getPayloadCase()` is `SNAPSHOT_STATUS` and whose
|
||||||
|
`getSnapshotStatus().getTruncated()` is true while the monitor's cached set
|
||||||
|
derives from a truncated fetch. One arrives at stream open (after the
|
||||||
|
`PROVIDER_STATUS` frame, before the cached `ACTIVE_ALARM` frames) so a late
|
||||||
|
joiner learns the current verdict, then one on every verdict change — including
|
||||||
|
the clearing frame sent when the gateway's alarm monitor restarts and drops a
|
||||||
|
truncated verdict. Track it if you need set completeness on a live feed without
|
||||||
|
polling `queryActiveAlarms`.
|
||||||
|
|
||||||
## Write Semantics And Common Pitfalls
|
## Write Semantics And Common Pitfalls
|
||||||
|
|
||||||
These are MXAccess parity behaviors that surprise new callers. The gateway
|
These are MXAccess parity behaviors that surprise new callers. The gateway
|
||||||
|
|||||||
+1033
-204
File diff suppressed because it is too large
Load Diff
+8
-2
@@ -47,8 +47,9 @@ import java.util.function.Consumer;
|
|||||||
import mxaccess_gateway.v1.MxaccessGateway.AcknowledgeAlarmReply;
|
import mxaccess_gateway.v1.MxaccessGateway.AcknowledgeAlarmReply;
|
||||||
import mxaccess_gateway.v1.MxaccessGateway.AcknowledgeAlarmRequest;
|
import mxaccess_gateway.v1.MxaccessGateway.AcknowledgeAlarmRequest;
|
||||||
import mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshot;
|
import mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshot;
|
||||||
import mxaccess_gateway.v1.MxaccessGateway.AlarmProviderStatus;
|
|
||||||
import mxaccess_gateway.v1.MxaccessGateway.AlarmFeedMessage;
|
import mxaccess_gateway.v1.MxaccessGateway.AlarmFeedMessage;
|
||||||
|
import mxaccess_gateway.v1.MxaccessGateway.AlarmProviderStatus;
|
||||||
|
import mxaccess_gateway.v1.MxaccessGateway.AlarmSnapshotStatus;
|
||||||
import mxaccess_gateway.v1.MxaccessGateway.BulkReadResult;
|
import mxaccess_gateway.v1.MxaccessGateway.BulkReadResult;
|
||||||
import mxaccess_gateway.v1.MxaccessGateway.BulkWriteResult;
|
import mxaccess_gateway.v1.MxaccessGateway.BulkWriteResult;
|
||||||
import mxaccess_gateway.v1.MxaccessGateway.CloseSessionRequest;
|
import mxaccess_gateway.v1.MxaccessGateway.CloseSessionRequest;
|
||||||
@@ -2282,7 +2283,8 @@ public final class MxGatewayCli implements Callable<Integer> {
|
|||||||
/**
|
/**
|
||||||
* Renders one {@link AlarmFeedMessage} in the CLI's plain-text output
|
* Renders one {@link AlarmFeedMessage} in the CLI's plain-text output
|
||||||
* style, distinguishing the active-alarm snapshot, snapshot-complete
|
* style, distinguishing the active-alarm snapshot, snapshot-complete
|
||||||
* sentinel, and transition cases of the message's {@code payload} oneof.
|
* sentinel, transition, provider-status, and snapshot-status cases of the
|
||||||
|
* message's {@code payload} oneof.
|
||||||
*/
|
*/
|
||||||
private static String formatAlarmFeedMessage(AlarmFeedMessage message) {
|
private static String formatAlarmFeedMessage(AlarmFeedMessage message) {
|
||||||
return switch (message.getPayloadCase()) {
|
return switch (message.getPayloadCase()) {
|
||||||
@@ -2307,6 +2309,10 @@ public final class MxGatewayCli implements Callable<Integer> {
|
|||||||
"provider-status mode=%s degraded=%b reason=%s",
|
"provider-status mode=%s degraded=%b reason=%s",
|
||||||
status.getMode().name(), status.getDegraded(), status.getReason());
|
status.getMode().name(), status.getDegraded(), status.getReason());
|
||||||
}
|
}
|
||||||
|
case SNAPSHOT_STATUS -> {
|
||||||
|
AlarmSnapshotStatus status = message.getSnapshotStatus();
|
||||||
|
yield String.format("snapshot-status truncated=%b", status.getTruncated());
|
||||||
|
}
|
||||||
case PAYLOAD_NOT_SET -> "unknown";
|
case PAYLOAD_NOT_SET -> "unknown";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@@ -122,6 +122,16 @@ poll. Treat the set as possibly incomplete rather than reconciling deletions
|
|||||||
from it. It is set-level degraded status, not a comment on the record's own
|
from it. It is set-level degraded status, not a comment on the record's own
|
||||||
fidelity, and is distinct from `degraded` (the subtag fallback provider).
|
fidelity, and is distinct from `degraded` (the subtag fallback provider).
|
||||||
|
|
||||||
|
`stream_alarms` also carries that completeness verdict at feed level, as a
|
||||||
|
message whose `WhichOneof("payload")` is `snapshot_status` and whose
|
||||||
|
`snapshot_status.truncated` is true while the monitor's cached set derives from
|
||||||
|
a truncated fetch. One arrives at stream open (after the `provider_status`
|
||||||
|
frame, before the cached `active_alarm` frames) so a late joiner learns the
|
||||||
|
current verdict, then one on every verdict change — including the clearing frame
|
||||||
|
sent when the gateway's alarm monitor restarts and drops a truncated verdict.
|
||||||
|
Track it if you need set completeness on a live feed without polling
|
||||||
|
`query_active_alarms`.
|
||||||
|
|
||||||
Canceling a Python task cancels the client-side gRPC call or stream wait. It
|
Canceling a Python task cancels the client-side gRPC call or stream wait. It
|
||||||
does not abort an in-flight MXAccess COM call inside the worker process.
|
does not abort an in-flight MXAccess COM call inside the worker process.
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
+16
-5
@@ -28,11 +28,13 @@ tarball, where the rest of the mxaccessgw repo does not exist. The vendored
|
|||||||
copies are shipped in the published `.crate` via `Cargo.toml`'s `include`
|
copies are shipped in the published `.crate` via `Cargo.toml`'s `include`
|
||||||
list, which is what makes the crate buildable standalone; they are build
|
list, which is what makes the crate buildable standalone; they are build
|
||||||
inputs only, never a second source of truth. **Refresh rule:** any commit
|
inputs only, never a second source of truth. **Refresh rule:** any commit
|
||||||
that edits a Contracts proto (`mxaccess_gateway.proto`, `mxaccess_worker.proto`,
|
that edits *or adds* a Contracts proto (today `mxaccess_gateway.proto`,
|
||||||
`galaxy_repository.proto`) must copy the changed file(s) into
|
`mxaccess_worker.proto`, `galaxy_repository.proto`) must copy the changed or
|
||||||
`clients/rust/protos/` in that same commit — `scripts/check-codegen.ps1`
|
new file(s) into `clients/rust/protos/` in that same commit —
|
||||||
Check 3 fails the build on byte drift between the vendored copies and the
|
`scripts/check-codegen.ps1` Check 3 fails the build on byte drift between the
|
||||||
canonical Contracts protos. `tonic`/`prost` bindings are generated into
|
vendored copies and the canonical Contracts protos, and equally on a canonical
|
||||||
|
proto that has no vendored copy (which an in-repo build cannot catch, since
|
||||||
|
`build.rs` reads the canonical directory here). `tonic`/`prost` bindings are generated into
|
||||||
Cargo build output. `src/generated.rs` declares the Rust modules that
|
Cargo build output. `src/generated.rs` declares the Rust modules that
|
||||||
include those generated files. `src/generated` remains reserved for checked-in
|
include those generated files. `src/generated` remains reserved for checked-in
|
||||||
generator output if the crate later changes to source-tree generation.
|
generator output if the crate later changes to source-tree generation.
|
||||||
@@ -130,6 +132,15 @@ poll. Treat the set as possibly incomplete rather than reconciling deletions
|
|||||||
from it. It is set-level degraded status, not a comment on the record's own
|
from it. It is set-level degraded status, not a comment on the record's own
|
||||||
fidelity, and is distinct from `degraded` (the subtag fallback provider).
|
fidelity, and is distinct from `degraded` (the subtag fallback provider).
|
||||||
|
|
||||||
|
`AlarmFeedStream` also carries that completeness verdict at feed level, as an
|
||||||
|
`alarm_feed_message::Payload::SnapshotStatus` frame whose `truncated` field is
|
||||||
|
true while the monitor's cached set derives from a truncated fetch. One arrives
|
||||||
|
at stream open (after the `ProviderStatus` frame, before the cached
|
||||||
|
`ActiveAlarm` frames) so a late joiner learns the current verdict, then one on
|
||||||
|
every verdict change — including the clearing frame sent when the gateway's
|
||||||
|
alarm monitor restarts and drops a truncated verdict. Track it if you need set
|
||||||
|
completeness on a live feed without polling `query_active_alarms`.
|
||||||
|
|
||||||
The session helpers keep MXAccess handles visible:
|
The session helpers keep MXAccess handles visible:
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
|
|||||||
@@ -2231,7 +2231,7 @@ fn event_value_to_json(value: &ProtoMxValue) -> Value {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Render a streamed [`AlarmFeedMessage`] as a terse one-line summary that
|
/// Render a streamed [`AlarmFeedMessage`] as a terse one-line summary that
|
||||||
/// distinguishes the four `payload` oneof cases.
|
/// distinguishes the five `payload` oneof cases.
|
||||||
fn alarm_feed_message_summary(message: &AlarmFeedMessage) -> String {
|
fn alarm_feed_message_summary(message: &AlarmFeedMessage) -> String {
|
||||||
match &message.payload {
|
match &message.payload {
|
||||||
Some(alarm_feed_message::Payload::ActiveAlarm(snapshot)) => {
|
Some(alarm_feed_message::Payload::ActiveAlarm(snapshot)) => {
|
||||||
@@ -2259,6 +2259,9 @@ fn alarm_feed_message_summary(message: &AlarmFeedMessage) -> String {
|
|||||||
status.reason
|
status.reason
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Some(alarm_feed_message::Payload::SnapshotStatus(status)) => {
|
||||||
|
format!("snapshot-status truncated={}", status.truncated)
|
||||||
|
}
|
||||||
None => "(empty)".to_owned(),
|
None => "(empty)".to_owned(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2308,6 +2311,11 @@ fn alarm_feed_message_to_json(message: &AlarmFeedMessage) -> Value {
|
|||||||
})),
|
})),
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
Some(alarm_feed_message::Payload::SnapshotStatus(status)) => json!({
|
||||||
|
"snapshotStatus": {
|
||||||
|
"truncated": status.truncated,
|
||||||
|
}
|
||||||
|
}),
|
||||||
None => Value::Null,
|
None => Value::Null,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2961,4 +2969,23 @@ mod tests {
|
|||||||
assert_eq!(provider["reason"], "alarmmgr unavailable");
|
assert_eq!(provider["reason"], "alarmmgr unavailable");
|
||||||
assert_eq!(provider["since"]["seconds"], 1_777_995_000_i64);
|
assert_eq!(provider["since"]["seconds"], 1_777_995_000_i64);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn alarm_feed_snapshot_status_renders_in_summary_and_json() {
|
||||||
|
use zb_mom_ww_mxgateway_client::generated::mxaccess_gateway::v1::{
|
||||||
|
alarm_feed_message, AlarmFeedMessage, AlarmSnapshotStatus,
|
||||||
|
};
|
||||||
|
|
||||||
|
let message = AlarmFeedMessage {
|
||||||
|
payload: Some(alarm_feed_message::Payload::SnapshotStatus(
|
||||||
|
AlarmSnapshotStatus { truncated: true },
|
||||||
|
)),
|
||||||
|
};
|
||||||
|
|
||||||
|
let summary = super::alarm_feed_message_summary(&message);
|
||||||
|
assert_eq!(summary, "snapshot-status truncated=true");
|
||||||
|
|
||||||
|
let value = super::alarm_feed_message_to_json(&message);
|
||||||
|
assert_eq!(value["snapshotStatus"]["truncated"], true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1003,9 +1003,13 @@ message StreamAlarmsRequest {
|
|||||||
string alarm_filter_prefix = 2;
|
string alarm_filter_prefix = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// One message on the StreamAlarms feed. The stream opens with one
|
// One message on the StreamAlarms feed. The stream opens with a
|
||||||
// `active_alarm` per currently-active alarm, then a single
|
// `provider_status` (the current provider mode), then a `snapshot_status`
|
||||||
// `snapshot_complete`, then a `transition` for every subsequent change.
|
// (whether the cached active set may be incomplete), then one `active_alarm`
|
||||||
|
// per currently-active alarm, then a single `snapshot_complete`. After that
|
||||||
|
// come the live frames: a `transition` for every subsequent alarm change,
|
||||||
|
// interleaved with a further `provider_status` on each failover/failback and a
|
||||||
|
// further `snapshot_status` on each change of the truncation verdict.
|
||||||
message AlarmFeedMessage {
|
message AlarmFeedMessage {
|
||||||
oneof payload {
|
oneof payload {
|
||||||
// Part of the initial active-alarm snapshot (ConditionRefresh).
|
// Part of the initial active-alarm snapshot (ConditionRefresh).
|
||||||
@@ -1018,6 +1022,10 @@ message AlarmFeedMessage {
|
|||||||
// Provider-mode status. Emitted once on stream open and again on every
|
// Provider-mode status. Emitted once on stream open and again on every
|
||||||
// failover/failback so late joiners learn the current mode immediately.
|
// failover/failback so late joiners learn the current mode immediately.
|
||||||
AlarmProviderStatus provider_status = 4;
|
AlarmProviderStatus provider_status = 4;
|
||||||
|
// Snapshot-completeness status. Emitted once on stream open and again on
|
||||||
|
// every change of the truncation verdict, so late joiners learn whether the
|
||||||
|
// feed's active-alarm set may be incomplete.
|
||||||
|
AlarmSnapshotStatus snapshot_status = 5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1028,6 +1036,23 @@ message AlarmProviderStatus {
|
|||||||
google.protobuf.Timestamp since = 4;
|
google.protobuf.Timestamp since = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Feed-level snapshot-completeness status. Emitted once on StreamAlarms open
|
||||||
|
// (after the initial provider_status frame, before the cached active_alarm
|
||||||
|
// frames) so late joiners learn the current verdict, and again on every change
|
||||||
|
// of the truncation verdict — when a reconcile reports a different verdict, and
|
||||||
|
// when the gateway's alarm monitor restarts and drops a truncated verdict with
|
||||||
|
// the cache generation it described (feed subscribers outlive that monitor
|
||||||
|
// session, so they are sent the clearing frame). Mirrors the per-record
|
||||||
|
// ActiveAlarmSnapshot.from_truncated_snapshot caveat at feed level so live
|
||||||
|
// consumers can reason about completeness without polling QueryActiveAlarms.
|
||||||
|
message AlarmSnapshotStatus {
|
||||||
|
// True while the monitor's cached active-alarm set derives from a truncated
|
||||||
|
// (capped) worker fetch — the set may be missing alarms. Distinct from
|
||||||
|
// provider degradation (AlarmProviderStatus.degraded), which describes the
|
||||||
|
// fidelity of the records rather than the completeness of the set.
|
||||||
|
bool truncated = 1;
|
||||||
|
}
|
||||||
|
|
||||||
message MxStatusProxy {
|
message MxStatusProxy {
|
||||||
// Mirrors the `success` member of the MXAccess MXSTATUS_PROXY struct
|
// Mirrors the `success` member of the MXAccess MXSTATUS_PROXY struct
|
||||||
// (a 16-bit signed value in the COM struct, widened to int32 on the
|
// (a 16-bit signed value in the COM struct, widened to int32 on the
|
||||||
|
|||||||
@@ -764,6 +764,17 @@ The v2 8-arg method returns -55 on this AVEVA build regardless of
|
|||||||
operator-identity inputs — looks like a stub. The v1 6-arg method
|
operator-identity inputs — looks like a stub. The v1 6-arg method
|
||||||
works. Production `WnWrapAlarmConsumer.AcknowledgeByName` calls the
|
works. Production `WnWrapAlarmConsumer.AcknowledgeByName` calls the
|
||||||
6-arg overload and discards the proto's `domain` + `full_name` fields.
|
6-arg overload and discards the proto's `domain` + `full_name` fields.
|
||||||
|
|
||||||
|
**Correction, 2026-08-18** (`docs/AlarmProbeFindings.md`). Both halves
|
||||||
|
of the paragraph above are narrower than they read. The -55 tracks the
|
||||||
|
*consumer*, not the overload: against the `SetXmlAlarmQuery`-applied
|
||||||
|
reader both the 6-arg and 8-arg forms return -55, and against the
|
||||||
|
ack-only consumer both return 0. And "works" means "returns 0" only —
|
||||||
|
a probe that raised a real alarm and then acked it six ways watched the
|
||||||
|
snapshot stay `UNACK_ALM`, `OPERATOR_NAME` stay empty, and the alarm
|
||||||
|
extension's own `.Acked` attribute stay `False` for 16 s after each
|
||||||
|
call. On this rig the wnwrap ack is accepted and then inert, so a zero
|
||||||
|
return code must not be read as an applied acknowledgement.
|
||||||
The proto contract keeps the 8 fields for forward compatibility if
|
The proto contract keeps the 8 fields for forward compatibility if
|
||||||
AVEVA fixes the v2 method later.
|
AVEVA fixes the v2 method later.
|
||||||
|
|
||||||
|
|||||||
+182
-32
@@ -1,7 +1,8 @@
|
|||||||
# Alarm Probe Findings
|
# Alarm Probe Findings
|
||||||
|
|
||||||
`WnWrapAlarmConsumer` rests on two assumptions that no unit test can settle, because both
|
`WnWrapAlarmConsumer` rested on two assumptions that no unit test can settle, because both
|
||||||
are properties of AVEVA's alarm provider rather than of our code:
|
are properties of AVEVA's alarm provider rather than of our code. The second is now settled
|
||||||
|
and one half of the first is; the questions are stated here as they were asked:
|
||||||
|
|
||||||
1. **GUID identity.** The snapshot diff in `ComputeTransitions` keys on the alarm record's
|
1. **GUID identity.** The snapshot diff in `ComputeTransitions` keys on the alarm record's
|
||||||
`GUID`. If wnwrap mints a fresh GUID when an alarm changes state, a single
|
`GUID`. If wnwrap mints a fresh GUID when an alarm changes state, a single
|
||||||
@@ -13,23 +14,27 @@ are properties of AVEVA's alarm provider rather than of our code:
|
|||||||
rather than the records-in-reply count, truncation detection can become exact instead of
|
rather than the records-in-reply count, truncation detection can become exact instead of
|
||||||
conservative, and the bounded staleness `ApplySnapshotUpdate` accepts goes away.
|
conservative, and the bounded staleness `ApplySnapshotUpdate` accepts goes away.
|
||||||
|
|
||||||
This document records what a live probe run against the dev rig (`DESKTOP-6JL3KKO`,
|
This document records what live probe runs against the dev rig (`DESKTOP-6JL3KKO`,
|
||||||
2026-08-17) could and could not establish, so the next attempt starts from the blocker
|
2026-08-17 and 2026-08-18) could and could not establish, so the next attempt starts from
|
||||||
rather than rediscovering it.
|
the blocker rather than rediscovering it.
|
||||||
|
|
||||||
## Outcome
|
## Outcome
|
||||||
|
|
||||||
| Question | Status |
|
| Question | Status |
|
||||||
|---|---|
|
|---|---|
|
||||||
| GUID stable across polls and `ALM → RTN` | Answered — yes, by the 2026-05-01 capture in `AlarmClientDiscovery.md` |
|
| GUID stable across polls and `ALM → RTN` | Answered — yes (2026-05-01 capture in `AlarmClientDiscovery.md`, reconfirmed 2026-08-18) |
|
||||||
| GUID stable across `UNACK → ACK`, and across clear-then-re-raise | **Open** |
|
| GUID stable across clear-then-re-raise | Answered 2026-08-18 — **no**, a re-raise mints a new GUID |
|
||||||
| `COUNT` = total active vs records-in-reply under a capped fetch | **Open** |
|
| GUID stable across `UNACK → ACK` | **Open** — the rig cannot be driven into an acknowledged state at all |
|
||||||
|
| `COUNT` = total active vs records-in-reply under a capped fetch | Answered 2026-08-18 — **records in the reply** |
|
||||||
|
|
||||||
Both open questions are blocked by the same thing: the rig has no active alarm and cannot
|
The 2026-08-17 run below is kept because it is the record of the wrong-verb blocker. The
|
||||||
be driven into one over MXAccess, so there is no alarm instance whose GUID can be followed
|
2026-08-18 run cleared that blocker with `AuthenticateUser` + `WriteSecured` and answered
|
||||||
through an acknowledge and no population large enough to overflow a capped fetch.
|
two of the three questions; the acknowledge leg is now blocked on something narrower and
|
||||||
|
different, described in "Second attempt".
|
||||||
|
|
||||||
## Why The Rig Cannot Raise An Alarm
|
## First attempt (2026-08-17): plain `Write`
|
||||||
|
|
||||||
|
### Why The Rig Could Not Raise An Alarm
|
||||||
|
|
||||||
The rig is otherwise healthy, which is what makes the blocker specific rather than a
|
The rig is otherwise healthy, which is what makes the blocker specific rather than a
|
||||||
general "nothing works":
|
general "nothing works":
|
||||||
@@ -64,7 +69,8 @@ for the whole probe session.
|
|||||||
|
|
||||||
### Unblocking
|
### Unblocking
|
||||||
|
|
||||||
Any one of these makes both questions answerable, in rough order of cost:
|
Any one of these makes both questions answerable, in rough order of cost. The second one
|
||||||
|
is what the 2026-08-18 run did, and it worked:
|
||||||
|
|
||||||
- Re-enable the System Platform script that flips `TestMachine_001.TestAlarm001`
|
- Re-enable the System Platform script that flips `TestMachine_001.TestAlarm001`
|
||||||
(referenced throughout `AlarmClientDiscovery.md`). It writes from inside the engine, so
|
(referenced throughout `AlarmClientDiscovery.md`). It writes from inside the engine, so
|
||||||
@@ -78,7 +84,7 @@ Three separate objects are wired to the same alarm UDA name, so once writes land
|
|||||||
`maxAlmCnt` of 1 or 2 forces truncation against three active alarms and answers the `COUNT`
|
`maxAlmCnt` of 1 or 2 forces truncation against three active alarms and answers the `COUNT`
|
||||||
question in the same run.
|
question in the same run.
|
||||||
|
|
||||||
## Evidence
|
### Evidence
|
||||||
|
|
||||||
Snapshot payload, identical at every cap (1, 2, and 1024) and at every poll across the
|
Snapshot payload, identical at every cap (1, 2, and 1024) and at every poll across the
|
||||||
~100-second session:
|
~100-second session:
|
||||||
@@ -98,26 +104,170 @@ The probe used for the run was a throwaway file in the windev CI clone
|
|||||||
harness it was modelled on is
|
harness it was modelled on is
|
||||||
`src/ZB.MOM.WW.MxGateway.Worker.Tests/Probes/WnWrapConsumerProbeTests.cs`.
|
`src/ZB.MOM.WW.MxGateway.Worker.Tests/Probes/WnWrapConsumerProbeTests.cs`.
|
||||||
|
|
||||||
## Implications
|
## Second attempt (2026-08-18): secured-write verb
|
||||||
|
|
||||||
### Transition identity
|
The findings above named the fix in their own "Unblocking" list, and it holds:
|
||||||
|
`AuthenticateUser` + `WriteSecured` raises the alarms that plain `Write` could not touch.
|
||||||
|
The rig's alarm attributes are not unreachable — they are secured, and the 2026-08-17 probe
|
||||||
|
used the wrong verb.
|
||||||
|
|
||||||
`ComputeTransitions` keying on GUID is safe for the raise and clear legs, which is the
|
### Method
|
||||||
evidence `AlarmClientDiscovery.md` already carries. The acknowledge leg — the one where a
|
|
||||||
re-minted GUID would corrupt the feed, because an ack is the state change most likely to
|
|
||||||
create a new record in a provider that models acknowledgement as a separate event — is
|
|
||||||
still assumed rather than observed. Nothing here justifies changing the diff, but the
|
|
||||||
assumption should not be described in code as established.
|
|
||||||
|
|
||||||
### Truncation detection
|
Three throwaway probes in the windev CI clone (`C:\build\mxaccessgw-ci`, detached at
|
||||||
|
`ab3ff16`), each an x86 net48 xUnit fact running on a dedicated STA with a
|
||||||
|
`PeekMessage`/`DispatchMessage` pump so MXAccess events deliver:
|
||||||
|
|
||||||
`IsTruncatedFetch` stays as written. Tightening it to an exact test requires knowing that
|
1. secured write + both GUID legs + the capped-fetch question,
|
||||||
`COUNT` reports the total, and this run cannot show that. The conservative rule keeps its
|
2. the acknowledge surface, exhaustively,
|
||||||
justification: at the cap, treating a complete fetch as truncated costs one poll of
|
3. the acknowledge question re-asked through an independent observer.
|
||||||
staleness, while treating a truncated fetch as complete broadcasts clears for every alarm
|
|
||||||
past the cap.
|
|
||||||
|
|
||||||
The one substantive correction is to the phrasing rather than the logic. The reply is not
|
All three used `LMXProxyServerClass` directly for the write path and a
|
||||||
featureless — it carries a `COUNT` attribute the parser currently ignores. Whether that
|
`wwAlarmConsumerClass` pair — a reader with `SetXmlAlarmQuery` applied and an ack-only
|
||||||
attribute is a usable "more available" signal is unverified, not absent, and the comments
|
consumer without it — mirroring `WnWrapAlarmConsumer`'s own two-consumer arrangement. The
|
||||||
in `WnWrapAlarmConsumer` now say so.
|
subscription was `\\DESKTOP-6JL3KKO\Galaxy!TestArea`, matching the 2026-08-17 run.
|
||||||
|
`MXGATEWAY_LIVE_MXACCESS_WRITE_SECURED_USER` / `_PASSWORD` are set at neither machine nor
|
||||||
|
user scope on the box, so the probes used the default rig identity, `Administrator` with an
|
||||||
|
empty password. All three files were deleted afterwards and the clone is a clean tree.
|
||||||
|
|
||||||
|
### The secured write lands
|
||||||
|
|
||||||
|
Same session, same item, one after the other — the control reproduces 2026-08-17 exactly
|
||||||
|
and the secured verb succeeds:
|
||||||
|
|
||||||
|
```
|
||||||
|
Write 'TestMachine_001.TestAlarm001' <- True
|
||||||
|
WRITE-COMPLETE hLMX=1 hItem=1 statuses=[success=0 category=SecurityError detectedBy=RespondingAutomationObject detail=1008 text=]
|
||||||
|
observed 'TestMachine_001.TestAlarm001' = False
|
||||||
|
|
||||||
|
AuthenticateUser -> userId=1
|
||||||
|
WriteSecured 'TestMachine_001.TestAlarm001' <- True currentUserId=1 verifierUserId=0
|
||||||
|
DATA-CHANGE hItem=1 value=True quality=192
|
||||||
|
WRITE-COMPLETE hLMX=1 hItem=1 statuses=[success=-1 category=Ok detectedBy=RespondingAutomationObject detail=0 text=]
|
||||||
|
observed 'TestMachine_001.TestAlarm001' = True
|
||||||
|
```
|
||||||
|
|
||||||
|
`AuthenticateUser("Administrator", "")` resolves to user id 1, matching the value
|
||||||
|
`WorkerLiveMxAccessSmokeTests` records. No verifier is needed: `verifierUserId=0` is
|
||||||
|
accepted. All six subsequent raise/clear writes across the three objects behaved the same
|
||||||
|
way, so the path is reliable rather than a one-off.
|
||||||
|
|
||||||
|
### Q2 — `ALARM_RECORDS/@COUNT` reports the reply, not the total
|
||||||
|
|
||||||
|
With all three `TestMachine_00{1,2,3}.TestAlarm001` alarms active, the same subscription
|
||||||
|
fetched at three caps back to back:
|
||||||
|
|
||||||
|
```
|
||||||
|
FETCH three-active cap=1024 ALARM_RECORDS/@COUNT=3 elementCount=3
|
||||||
|
FETCH three-active cap=1 ALARM_RECORDS/@COUNT=1 elementCount=1
|
||||||
|
FETCH three-active cap=2 ALARM_RECORDS/@COUNT=2 elementCount=2
|
||||||
|
```
|
||||||
|
|
||||||
|
`@COUNT` tracked the cap, not the population. It equals the element count in every reply,
|
||||||
|
including the two that are provably truncated — the galaxy held three active alarms while
|
||||||
|
`@COUNT` read 1 and 2. The attribute therefore carries no "more available" information, and
|
||||||
|
the hypothesis that it might report the total is refuted rather than merely untested.
|
||||||
|
|
||||||
|
`IsTruncatedFetch` stays exactly as written, and this is now settled rather than deferred:
|
||||||
|
there is no exact truncation signal to switch to. Tightening it is **not** a future task.
|
||||||
|
The conservative rule keeps its original justification — at the cap, treating a complete
|
||||||
|
fetch as truncated costs one poll of staleness, while treating a truncated fetch as
|
||||||
|
complete broadcasts clears for every alarm past the cap.
|
||||||
|
|
||||||
|
### Q1 — clear-then-re-raise mints a new GUID
|
||||||
|
|
||||||
|
`TestMachine_001.TestAlarm001` was raised, cleared, and re-raised through `WriteSecured`,
|
||||||
|
with a full snapshot fetch after each leg:
|
||||||
|
|
||||||
|
```
|
||||||
|
after-raise TAG=TestMachine_001.TestAlarm001 GUID=72B84A6E7BA74D42B611EB5393626F79 STATE=UNACK_ALM VALUE=true
|
||||||
|
after-clear-001 TAG=TestMachine_001.TestAlarm001 GUID=72B84A6E7BA74D42B611EB5393626F79 STATE=UNACK_RTN VALUE=false
|
||||||
|
after-reraise TAG=TestMachine_001.TestAlarm001 GUID=2394FEAA94774154AAA97C3AC29CA51E STATE=UNACK_ALM VALUE=true
|
||||||
|
```
|
||||||
|
|
||||||
|
Two facts, one confirming and one new. The `ALM → RTN` leg holds its GUID, reconfirming the
|
||||||
|
2026-05-01 capture against a write-driven rather than script-driven transition. The re-raise
|
||||||
|
does not: the record comes back under a GUID that has never been seen before.
|
||||||
|
|
||||||
|
The two records do **not** coexist — the snapshot carries one record per tag, and the
|
||||||
|
re-raise replaces the returned record rather than joining it. Both fetches above are the
|
||||||
|
full `cap=1024` reply, byte-identical in length (1613) at `@COUNT=3`/`elementCount=3`, the
|
||||||
|
three records being one per `TestMachine_00{1,2,3}`; `72B84A6E…` is simply absent from the
|
||||||
|
later one. So a single poll spanning the re-raise sees the old GUID disappear and the new
|
||||||
|
one appear together.
|
||||||
|
|
||||||
|
That is the correct reading for `ComputeTransitions` rather than a problem for it. The old
|
||||||
|
GUID leaving the active set is a real Clear and the new GUID is a real Raise, because they
|
||||||
|
are two alarm instances. The diff needed no change.
|
||||||
|
|
||||||
|
### Q1 — the acknowledge leg is still unobserved, for a new reason
|
||||||
|
|
||||||
|
The blocker moved. The rig can now be driven into an alarm; it cannot be driven out of
|
||||||
|
`UNACK_ALM`. Every acknowledge surface `wwAlarmConsumerClass` exposes was tried against a
|
||||||
|
freshly raised alarm, each followed by 16 seconds of polling:
|
||||||
|
|
||||||
|
| Attempt | Result |
|
||||||
|
|---|---|
|
||||||
|
| `AlarmAckByName` 6-arg on the ack-only consumer, node = machine | `rc=0`, state unchanged |
|
||||||
|
| same, node empty | `rc=0`, state unchanged |
|
||||||
|
| same, name as `Galaxy!TestArea.TestMachine_001.TestAlarm001` | `rc=0`, state unchanged |
|
||||||
|
| same, operator name `Administrator` | `rc=0`, state unchanged |
|
||||||
|
| `AlarmAckByName` 6-arg on the reader consumer (`SetXmlAlarmQuery` applied) | `rc=-55`, state unchanged |
|
||||||
|
| `AlarmAckByName` 8-arg (v2) on the ack-only consumer | `rc=0`, state unchanged |
|
||||||
|
|
||||||
|
The `rc=-55` on the `SetXmlAlarmQuery`-applied consumer reproduces the 2026-05-01 finding
|
||||||
|
that motivated the two-consumer split, so the ack-only consumer was correctly provisioned;
|
||||||
|
the `rc=0` returns are the ones that go nowhere.
|
||||||
|
|
||||||
|
A third probe removed the last doubt by watching the alarm extension's own `.Acked`
|
||||||
|
attribute over MXAccess — an observer entirely independent of the wnwrap snapshot:
|
||||||
|
|
||||||
|
```
|
||||||
|
VALUES after-raise: 'TestMachine_001.TestAlarm001.Acked' = False
|
||||||
|
AlarmAckByName -> rc=0
|
||||||
|
VALUES after-wnwrap-ack: 'TestMachine_001.TestAlarm001.Acked' = False
|
||||||
|
XML after-wnwrap-ack: STATE=UNACK_ALM OPRNAME= OPRNODE=
|
||||||
|
```
|
||||||
|
|
||||||
|
Nothing moves: not the extension attribute, not the snapshot `STATE`, not `OPERATOR_NAME`.
|
||||||
|
`rc=0` from wnwrap means the call was accepted, not that an acknowledgement was applied.
|
||||||
|
|
||||||
|
Acknowledging by writing the extension attribute directly is not an alternative — the
|
||||||
|
attribute is not writable, and says so with an operational rather than a security failure,
|
||||||
|
for both verbs:
|
||||||
|
|
||||||
|
```
|
||||||
|
WriteSecured 'TestMachine_001.TestAlarm001.Acked' <- true
|
||||||
|
WRITE-COMPLETE statuses=[success=0 category=MxCategoryOperationalError detectedBy=MxSourceRespondingAutomationObject detail=1007]
|
||||||
|
Write 'TestMachine_001.TestAlarm001.Acked' <- true
|
||||||
|
WRITE-COMPLETE statuses=[success=0 category=MxCategoryOperationalError detectedBy=MxSourceRespondingAutomationObject detail=1007]
|
||||||
|
```
|
||||||
|
|
||||||
|
`detail=1007` from the responding automation object, unchanged by authentication, is a
|
||||||
|
read-only attribute rather than a permission refusal — the `1008` `SecurityError` the alarm
|
||||||
|
UDA itself returns is what a permission refusal looks like on this rig. So the ack has no
|
||||||
|
MXAccess-side entry point and the wnwrap-side entry point is inert.
|
||||||
|
|
||||||
|
#### Remaining unblock paths for the acknowledge leg
|
||||||
|
|
||||||
|
- Acknowledge from the System Platform side — the IDE's alarm client, InTouch, or an
|
||||||
|
ArchestrA graphic bound to the alarm — and watch the snapshot from a running probe. This
|
||||||
|
proves whether wnwrap's `STATE` ever reports `ACK_ALM` at all, which is the actual
|
||||||
|
question; the ack API being inert may be a wnwrap defect layered on top of a snapshot
|
||||||
|
that would report the state correctly.
|
||||||
|
- Check whether `alarmmgr` on this rig is configured with an alarm-acknowledgement security
|
||||||
|
requirement that the wnwrap consumer, which passes an operator *name* string and no
|
||||||
|
authenticated identity, cannot meet. If so, ack over wnwrap is not merely untested here
|
||||||
|
but unavailable by configuration, and the gateway's `AcknowledgeByName` path needs the
|
||||||
|
same treatment on any customer galaxy configured that way.
|
||||||
|
- If neither lands, the acknowledge leg stays assumed. It is worth restating that this is a
|
||||||
|
documentation gap, not a correctness one: a re-minted GUID on acknowledge would produce a
|
||||||
|
spurious Clear plus a spurious Raise, which is the same shape the now-observed re-raise
|
||||||
|
behaviour produces and which `ComputeTransitions` already handles as two instances.
|
||||||
|
|
||||||
|
### Rig state left behind
|
||||||
|
|
||||||
|
The three `TestMachine_00{1,2,3}.TestAlarm001` UDAs are back to `false` and their
|
||||||
|
`.InAlarm` subtags read `false`, but each leaves a `UNACK_RTN` record in the wnwrap
|
||||||
|
snapshot, since nothing can acknowledge them away. `SnapshotActiveAlarms` counts only
|
||||||
|
`UNACK_ALM` and `ACK_ALM` as active, so these are inert for the gateway; they will clear on
|
||||||
|
the next `alarmmgr` restart.
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ Examples:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
mxgateway apikey init-db
|
mxgateway apikey init-db
|
||||||
mxgateway apikey create-key --key-id ops.alice --display-name "Alice (ops)" --scopes read,write
|
mxgateway apikey create-key --key-id ops.alice --display-name "Alice (ops)" --scopes invoke:read,invoke:write
|
||||||
mxgateway apikey create-key --key-id area1.reader --display-name "Area 1 reader" --scopes invoke:read,metadata:read --read-subtree "Area1/*" --browse-subtree "Area1/*"
|
mxgateway apikey create-key --key-id area1.reader --display-name "Area 1 reader" --scopes invoke:read,metadata:read --read-subtree "Area1/*" --browse-subtree "Area1/*"
|
||||||
mxgateway apikey create-key --key-id ops.temp --display-name "Temp contractor" --scopes invoke:read --expires 90d
|
mxgateway apikey create-key --key-id ops.temp --display-name "Temp contractor" --scopes invoke:read --expires 90d
|
||||||
mxgateway apikey create-key --key-id team-a.svc --display-name "Team A service" --scopes session:open,invoke:read --dashboard-tags team-a
|
mxgateway apikey create-key --key-id team-a.svc --display-name "Team A service" --scopes session:open,invoke:read --dashboard-tags team-a
|
||||||
|
|||||||
+11
-2
@@ -195,8 +195,17 @@ another tenant's tag. A key with no tags opens untagged sessions.
|
|||||||
|
|
||||||
Tags are set at key creation with
|
Tags are set at key creation with
|
||||||
`apikey create-key --dashboard-tags team-a,team-b` (repeatable; segments are
|
`apikey create-key --dashboard-tags team-a,team-b` (repeatable; segments are
|
||||||
trimmed and de-duplicated ordinal-ignore-case). Keys created from the dashboard
|
trimmed and de-duplicated ordinal-ignore-case). The dashboard API Keys page sets
|
||||||
API Keys page are currently always untagged.
|
them too: its create form has a **Dashboard tags** field alongside the data-access
|
||||||
|
constraints, split on the same separators the other constraint fields use and
|
||||||
|
de-duplicated ordinal-ignore-case as the CLI does. The two differ on one point: a
|
||||||
|
stray separator drops an empty segment silently on the form rather than failing
|
||||||
|
the command, because a browser form has no exit code to fail with.
|
||||||
|
|
||||||
|
That page's constraints column names `dashboard_tags` like any other member. It
|
||||||
|
has to: `IsEmpty` counts the tags, so a key whose only recorded policy is a
|
||||||
|
dashboard tag is not unconstrained, and leaving it out of the summary rendered
|
||||||
|
that key with the same empty cell as a key with no policy at all.
|
||||||
|
|
||||||
The dashboard ACL that consumes the tag shipped on 2026-08-17 (SEC-25 / TST-15).
|
The dashboard ACL that consumes the tag shipped on 2026-08-17 (SEC-25 / TST-15).
|
||||||
`IDashboardSessionAcl.CanViewSession` is consulted at both dashboard subscribe
|
`IDashboardSessionAcl.CanViewSession` is consulted at both dashboard subscribe
|
||||||
|
|||||||
@@ -206,7 +206,8 @@ publish` ship them inside the `.crate`, making the crate buildable standalone
|
|||||||
with no access to the rest of the mxaccessgw repo. Any Contracts proto change
|
with no access to the rest of the mxaccessgw repo. Any Contracts proto change
|
||||||
must refresh `clients/rust/protos/` in the same commit; `scripts/check-codegen.ps1`
|
must refresh `clients/rust/protos/` in the same commit; `scripts/check-codegen.ps1`
|
||||||
Check 3 byte-compares the vendored copies against the canonical protos and
|
Check 3 byte-compares the vendored copies against the canonical protos and
|
||||||
fails on drift. Because the vendored protos make a standalone build possible,
|
fails on drift — in both directions, so a newly added canonical proto that
|
||||||
|
was never vendored fails there rather than at a consumer's standalone build. Because the vendored protos make a standalone build possible,
|
||||||
`cargo package`/`cargo publish` run **with** verification (no `--no-verify`) —
|
`cargo package`/`cargo publish` run **with** verification (no `--no-verify`) —
|
||||||
a `cargo package` that cannot build from the vendored tree alone would mean
|
a `cargo package` that cannot build from the vendored tree alone would mean
|
||||||
the vendored copies are stale, and verification is what catches that before
|
the vendored copies are stale, and verification is what catches that before
|
||||||
|
|||||||
+26
-8
@@ -203,7 +203,7 @@ Consequences, and how this sits with the existing failover/reconcile design:
|
|||||||
separately — see the next decision. A galaxy that truncates persistently
|
separately — see the next decision. A galaxy that truncates persistently
|
||||||
is a configuration problem: raise `MxGateway:Alarms:MaxAlarmsPerFetch`.
|
is a configuration problem: raise `MxGateway:Alarms:MaxAlarmsPerFetch`.
|
||||||
|
|
||||||
### Alarms — truncation is reported per record on the public snapshot stream
|
### Alarms — truncation is reported per record on the snapshot stream, as a status frame on the live feed
|
||||||
|
|
||||||
Decision (2026-08-17): the truncated-fetch verdict above is carried to clients as
|
Decision (2026-08-17): the truncated-fetch verdict above is carried to clients as
|
||||||
`QueryActiveAlarmsReplyPayload.snapshot_truncated` on the worker IPC reply and as
|
`QueryActiveAlarmsReplyPayload.snapshot_truncated` on the worker IPC reply and as
|
||||||
@@ -226,19 +226,37 @@ payload carries the flag as well because a prefix filter (or an empty galaxy) ca
|
|||||||
leave zero records, and a truncated fetch with nothing to report still has to say
|
leave zero records, and a truncated fetch with nothing to report still has to say
|
||||||
so.
|
so.
|
||||||
|
|
||||||
The **detection heuristic is unchanged**: `IsTruncatedFetch` remains
|
The **detection heuristic is unchanged, and now permanently**: `IsTruncatedFetch`
|
||||||
`fetchedRecordCount >= maxAlarmsPerFetch`. The live probe run for this work could
|
remains `fetchedRecordCount >= maxAlarmsPerFetch`. The 2026-08-18 probe settled
|
||||||
not verify whether `ALARM_RECORDS/@COUNT` reports the total active count or only
|
what the earlier run could not: with three alarms active, `ALARM_RECORDS/@COUNT`
|
||||||
the records in the reply (`docs/AlarmProbeFindings.md`), and an exact-looking
|
read 1 at a cap of 1 and 2 at a cap of 2, so it reports the records in the reply
|
||||||
signal derived from an unverified attribute is worse than an honest heuristic —
|
rather than the total active count (`docs/AlarmProbeFindings.md`). There is no
|
||||||
it would read as precise while being wrong in the one direction that matters.
|
exact signal to switch to — `@COUNT` cannot distinguish a capped fetch from a
|
||||||
Switching to `@COUNT` stays blocked on probe evidence.
|
complete one — so the heuristic is the design rather than a placeholder waiting
|
||||||
|
on evidence.
|
||||||
|
|
||||||
The flag is **not latched**. It is replaced by each fetch's verdict, so the first
|
The flag is **not latched**. It is replaced by each fetch's verdict, so the first
|
||||||
sub-cap fetch clears it, and `GatewayAlarmMonitor.ClearCache` drops it with the
|
sub-cap fetch clears it, and `GatewayAlarmMonitor.ClearCache` drops it with the
|
||||||
cache generation it describes. A caveat that never turns off is a caveat
|
cache generation it describes. A caveat that never turns off is a caveat
|
||||||
operators learn to ignore.
|
operators learn to ignore.
|
||||||
|
|
||||||
|
The **live feed carries the verdict as set-level status**, not per record.
|
||||||
|
`StreamAlarms` has an envelope — `AlarmFeedMessage` — so the shape forced on
|
||||||
|
`QueryActiveAlarms` above is not forced here: the feed gets a fifth oneof case,
|
||||||
|
`snapshot_status` (`AlarmSnapshotStatus.truncated`), alongside `provider_status`.
|
||||||
|
The two carriers are therefore deliberately different shapes for the same verdict,
|
||||||
|
and each is the only additive option on its own surface. Emission is
|
||||||
|
**edge-triggered**, for the same reason the flag is not latched: a status frame
|
||||||
|
repeated on every reconcile is noise a consumer filters out, and a filtered-out
|
||||||
|
signal is no signal. The exception is the open-time frame, which is
|
||||||
|
unconditional — a late joiner cannot distinguish "not truncated" from "this
|
||||||
|
gateway does not send the frame" by silence, so it is told explicitly. It is
|
||||||
|
ordered after `provider_status` and before the cached `active_alarm` frames so a
|
||||||
|
consumer applying the snapshot as it streams holds the caveat while it applies
|
||||||
|
the records it qualifies. A monitor restart's `ClearCache` emits the clearing
|
||||||
|
frame as well: feed subscribers outlive the monitor's worker session, so a silent
|
||||||
|
re-seed would leave them caveating a set that is no longer truncated.
|
||||||
|
|
||||||
This is gateway metadata about **our** fetch mechanics, not a claim about MXAccess
|
This is gateway metadata about **our** fetch mechanics, not a claim about MXAccess
|
||||||
behaviour, so it is not a parity deviation: no event is synthesized and no
|
behaviour, so it is not a parity deviation: no event is synthesized and no
|
||||||
MXAccess-observable semantics change.
|
MXAccess-observable semantics change.
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ events (a "gap") and must re-snapshot; whatever is still retained is replayed.
|
|||||||
| `MxGateway:Dashboard:SnapshotIntervalMilliseconds` | `1000` | Dashboard snapshot refresh interval used by the snapshot SignalR hub and the pages that subscribe to it. |
|
| `MxGateway:Dashboard:SnapshotIntervalMilliseconds` | `1000` | Dashboard snapshot refresh interval used by the snapshot SignalR hub and the pages that subscribe to it. |
|
||||||
| `MxGateway:Dashboard:RecentFaultLimit` | `100` | Maximum number of fault summaries projected into each dashboard snapshot. |
|
| `MxGateway:Dashboard:RecentFaultLimit` | `100` | Maximum number of fault summaries projected into each dashboard snapshot. |
|
||||||
| `MxGateway:Dashboard:RecentSessionLimit` | `200` | Maximum number of session summaries projected into each dashboard snapshot. |
|
| `MxGateway:Dashboard:RecentSessionLimit` | `200` | Maximum number of session summaries projected into each dashboard snapshot. |
|
||||||
| `MxGateway:Dashboard:ShowTagValues` | `false` | Controls whether tag values reach the dashboard's SignalR events hub mirror. `false` (default): `DashboardEventBroadcaster` blanks tag values from a deep-cloned copy of each `MxEvent` before it reaches any hub subscriber — event metadata (tag reference, quality, status, timestamps) still renders; see `docs/GatewayDashboardDesign.md`'s `EventsHub` row for the mechanism. This is now the second of two independent layers, not the only one: `IDashboardSessionAcl` decides *which* sessions a caller may subscribe to at all (see `GroupToTag` / `UntaggedSessionVisibility` below), while this flag decides what a permitted subscriber sees. Setting it `true` therefore exposes tag values to everyone the ACL admits — every Administrator, plus each Viewer holding a matching tag. The flag gates only the SignalR events hub mirror — it does **not** cover the `/browse` live-value display, nor the alarms hub (`AlarmsHubPublisher` broadcasts alarm transitions with their `current_value`/`limit_value` fields unredacted); both remain separate, still-open residuals. |
|
| `MxGateway:Dashboard:ShowTagValues` | `false` | Controls whether tag values reach the dashboard at all. `false` (the default) suppresses them on all three seams that carry one: (1) the **events hub mirror** — `DashboardEventBroadcaster` blanks `MxEvent.value` plus the alarm body's `current_value`/`limit_value` from a deep-cloned copy before it reaches any hub subscriber (see `docs/GatewayDashboardDesign.md`'s `EventsHub` row); (2) the **alarms hub** — `AlarmsHubPublisher` clears `current_value`/`limit_value` from a deep-cloned copy of each `AlarmFeedMessage`, on both value-bearing payload arms (`transition` and `active_alarm`), before broadcasting to `/hubs/alarms`; (3) the **`/browse` live-value panel** — `DashboardLiveDataService` substitutes the literal `[redacted]` for the value text of each **successfully read** tag; a failed read keeps its `-` placeholder (there was no value to suppress, and the row's error is left untouched, so the two cannot contradict each other). Both hub redactions clone: the source `MxEvent` is shared with the gRPC event stream and the replay ring, and the source `AlarmFeedMessage` fans out to gRPC `StreamAlarms` subscribers, so neither is mutated in place and **no gRPC client is affected by this flag** — it is a dashboard-display control only. Everything that is not the value survives on every seam: tag reference, alarm reference/severity/state/operator, data type, quality, status, and timestamps still render, so the dashboard stays diagnostic without disclosing process values. This is one of two independent layers: `IDashboardSessionAcl` decides *which* sessions a caller may subscribe to at all (see `GroupToTag` / `UntaggedSessionVisibility` below), while this flag decides what a permitted subscriber sees. Setting it `true` exposes tag values to everyone the ACL admits — every Administrator, plus each Viewer holding a matching tag — and, because the alarms hub is session-less, exposes alarm values to every dashboard client that can reach `/hubs/alarms`. |
|
||||||
| `MxGateway:Dashboard:GroupToRole` | _(empty)_ | LDAP group → dashboard role mapping. Keys are LDAP group names (short CN or full DN — leading-RDN match). Values must be `Administrator` (read/write, API-key CRUD) or `Viewer` (read-only) — matched ordinally by the startup validator, so the spelling is exact and `Admin` is rejected. A user whose LDAP groups don't intersect this map cannot sign in; with no mapping at all, only the loopback bypass admits anyone. |
|
| `MxGateway:Dashboard:GroupToRole` | _(empty)_ | LDAP group → dashboard role mapping. Keys are LDAP group names (short CN or full DN — leading-RDN match). Values must be `Administrator` (read/write, API-key CRUD) or `Viewer` (read-only) — matched ordinally by the startup validator, so the spelling is exact and `Admin` is rejected. A user whose LDAP groups don't intersect this map cannot sign in; with no mapping at all, only the loopback bypass admits anyone. |
|
||||||
| `MxGateway:Dashboard:GroupToTag` | _(empty)_ | LDAP group → dashboard visibility tags. Keys follow the same convention as `GroupToRole` (short CN or full DN — leading-RDN match, case-insensitive); values are tag lists. A dashboard user's granted tag set is the union over the groups they belong to; an unmapped group contributes nothing. **Visibility only:** tags scope which sessions' event streams a Viewer may observe on the dashboard — they never grant or deny data access, which stays with the API key's scopes and constraints. Independent of `GroupToRole`: a group may appear in either map, both, or neither. Empty (the default) means Viewers hold no tags, so under the default `UntaggedSessionVisibility` they observe no session's events. |
|
| `MxGateway:Dashboard:GroupToTag` | _(empty)_ | LDAP group → dashboard visibility tags. Keys follow the same convention as `GroupToRole` (short CN or full DN — leading-RDN match, case-insensitive); values are tag lists. A dashboard user's granted tag set is the union over the groups they belong to; an unmapped group contributes nothing. **Visibility only:** tags scope which sessions' event streams a Viewer may observe on the dashboard — they never grant or deny data access, which stays with the API key's scopes and constraints. Independent of `GroupToRole`: a group may appear in either map, both, or neither. Empty (the default) means Viewers hold no tags, so under the default `UntaggedSessionVisibility` they observe no session's events. |
|
||||||
| `MxGateway:Dashboard:UntaggedSessionVisibility` | `AdminOnly` | Who may observe a session that carries no tags (its owning API key declared none). `AdminOnly` (default, fail-closed) restricts untagged sessions to dashboard Administrators. `AllViewers` shows them to every Viewer — opt-in for a single-tenant deployment that wants the pre-tag behaviour. Administrators always see every session regardless of tags. |
|
| `MxGateway:Dashboard:UntaggedSessionVisibility` | `AdminOnly` | Who may observe a session that carries no tags (its owning API key declared none). `AdminOnly` (default, fail-closed) restricts untagged sessions to dashboard Administrators. `AllViewers` shows them to every Viewer — opt-in for a single-tenant deployment that wants the pre-tag behaviour. Administrators always see every session regardless of tags. |
|
||||||
|
|||||||
@@ -273,7 +273,7 @@ bearer). Each hub class is `[Authorize(Policy = HubClientsPolicy)]`.
|
|||||||
| Hub | Path | Producer | Payload | Routing |
|
| Hub | Path | Producer | Payload | Routing |
|
||||||
|---|---|---|---|---|
|
|---|---|---|---|---|
|
||||||
| `DashboardSnapshotHub` | `/hubs/snapshot` | `DashboardSnapshotPublisher` (BackgroundService consuming `IDashboardSnapshotService.WatchSnapshotsAsync`) | `DashboardSnapshot` | Sent to all connected clients on every snapshot tick, but only while at least one client is connected (see "Idle gating" below); new connections receive the current snapshot synchronously in `OnConnectedAsync`. |
|
| `DashboardSnapshotHub` | `/hubs/snapshot` | `DashboardSnapshotPublisher` (BackgroundService consuming `IDashboardSnapshotService.WatchSnapshotsAsync`) | `DashboardSnapshot` | Sent to all connected clients on every snapshot tick, but only while at least one client is connected (see "Idle gating" below); new connections receive the current snapshot synchronously in `OnConnectedAsync`. |
|
||||||
| `AlarmsHub` | `/hubs/alarms` | `AlarmsHubPublisher` (BackgroundService consuming `IGatewayAlarmService.StreamAsync(filter: null)`) | `AlarmFeedMessage` (`active_alarm` / `snapshot_complete` / `transition`) | Connected clients auto-join `__alarms__`; all clients receive every message. Publisher auto-reconnects every 5s on stream faults. |
|
| `AlarmsHub` | `/hubs/alarms` | `AlarmsHubPublisher` (BackgroundService consuming `IGatewayAlarmService.StreamAsync(filter: null)`) | `AlarmFeedMessage` (`active_alarm` / `snapshot_complete` / `transition` / `provider_status` / `snapshot_status`) | Connected clients auto-join `__alarms__`; all clients receive every message. Publisher auto-reconnects every 5s on stream faults. The alarm value fields (`current_value` / `limit_value`) are stripped from a deep-cloned copy of the message when `Dashboard:ShowTagValues` is false (the default) — on both value-bearing payload arms, so neither a live transition nor a snapshot record leaks a process value; every other field still renders. The source message is never mutated: it fans out from the same feed to gRPC `StreamAlarms` subscribers, which this dashboard-display flag does not govern. Arms carrying no value are forwarded as-is, uncloned. |
|
||||||
| `EventsHub` | `/hubs/events` | `DashboardEventBroadcaster` invoked by each session's internal dashboard-mirror subscriber on its `SessionEventDistributor` (registered when the session becomes Ready) | `MxEvent` | Clients call `SubscribeSession(sessionId)` to join `session:{id}`, which also registers them in `EventsHubViewerRegistry` — the mirror is gated on that registry, which counts hub and in-process viewers alike (see "Mirror gating" below). The dashboard is a first-class distributor subscriber, so it receives the session's events whether or not a gRPC client is streaming. It sees RAW session events — not the per-gRPC-subscriber `AfterWorkerSequence` filtering that `EventStreamService` applies at its own boundary — because the dashboard is a separate LDAP-authenticated monitoring view meant to show the session's full event activity. Tag values are stripped from the mirrored `MxEvent` copy by `DashboardEventBroadcaster` when `Dashboard:ShowTagValues` is false (the default) — event metadata (tag reference, quality, status, timestamps) still renders, but the value fields are blanked, so no value leaks through this seam. `SubscribeSession` is gated by `IDashboardSessionAcl` (SEC-25 / TST-15): a denied caller gets a `HubException`, is not joined to the group, and is not registered as a viewer, so the mirror stays off for a session nobody is legitimately watching. The same ACL gates the in-process seam the session-details page uses, so neither path is the weaker one. Value redaction remains an independent layer — it bounds what a *permitted* subscriber sees. |
|
| `EventsHub` | `/hubs/events` | `DashboardEventBroadcaster` invoked by each session's internal dashboard-mirror subscriber on its `SessionEventDistributor` (registered when the session becomes Ready) | `MxEvent` | Clients call `SubscribeSession(sessionId)` to join `session:{id}`, which also registers them in `EventsHubViewerRegistry` — the mirror is gated on that registry, which counts hub and in-process viewers alike (see "Mirror gating" below). The dashboard is a first-class distributor subscriber, so it receives the session's events whether or not a gRPC client is streaming. It sees RAW session events — not the per-gRPC-subscriber `AfterWorkerSequence` filtering that `EventStreamService` applies at its own boundary — because the dashboard is a separate LDAP-authenticated monitoring view meant to show the session's full event activity. Tag values are stripped from the mirrored `MxEvent` copy by `DashboardEventBroadcaster` when `Dashboard:ShowTagValues` is false (the default) — event metadata (tag reference, quality, status, timestamps) still renders, but the value fields are blanked, so no value leaks through this seam. `SubscribeSession` is gated by `IDashboardSessionAcl` (SEC-25 / TST-15): a denied caller gets a `HubException`, is not joined to the group, and is not registered as a viewer, so the mirror stays off for a session nobody is legitimately watching. The same ACL gates the in-process seam the session-details page uses, so neither path is the weaker one. Value redaction remains an independent layer — it bounds what a *permitted* subscriber sees. |
|
||||||
|
|
||||||
### Default cadences
|
### Default cadences
|
||||||
@@ -517,12 +517,17 @@ tree to a flat list of matching attributes.
|
|||||||
|
|
||||||
Right-clicking an attribute (or double-clicking it) adds it to the subscription
|
Right-clicking an attribute (or double-clicking it) adds it to the subscription
|
||||||
panel. The panel shows each subscribed tag's live value, MXAccess data type,
|
panel. The panel shows each subscribed tag's live value, MXAccess data type,
|
||||||
quality and source timestamp, refreshed every two seconds. The subscription
|
quality and source timestamp, refreshed every two seconds — but the value column
|
||||||
panel is the explicit opt-in tag-value surface: it always shows values
|
obeys `Dashboard:ShowTagValues` like every other dashboard value surface. With
|
||||||
regardless of `Dashboard:ShowTagValues`, which governs the diagnostic
|
the flag false (the default) `DashboardLiveDataService` hands the page
|
||||||
session/worker views and the per-session event mirror — both its hub and
|
`[redacted]` in place of the formatted value of each **successfully read** tag —
|
||||||
in-process audiences (values are redacted from the mirrored events when the flag
|
a failed read keeps its `-` placeholder, since there was no value to suppress —
|
||||||
is false).
|
while data type, quality, source
|
||||||
|
timestamp and any read error are untouched, so the panel still answers "is this
|
||||||
|
tag advising and healthy" without disclosing the value. The substitution happens
|
||||||
|
at the service, not in the page: one decision point, and the value never enters
|
||||||
|
the render tree. Set the flag true to make the panel the explicit opt-in
|
||||||
|
tag-value surface it was originally designed as.
|
||||||
|
|
||||||
### Alarms page
|
### Alarms page
|
||||||
|
|
||||||
@@ -649,6 +654,11 @@ Show read-only effective configuration:
|
|||||||
- auth mode,
|
- auth mode,
|
||||||
- SQLite auth database path with sensitive parts redacted if needed,
|
- SQLite auth database path with sensitive parts redacted if needed,
|
||||||
- dashboard enabled state,
|
- dashboard enabled state,
|
||||||
|
- the LDAP group mappings that decide what a signed-in user may see —
|
||||||
|
`Dashboard:GroupToRole` (group → `Administrator` / `Viewer`) and
|
||||||
|
`Dashboard:GroupToTag` (group → the session tags it grants),
|
||||||
|
- `Dashboard:UntaggedSessionVisibility`, which decides who sees a session whose
|
||||||
|
owning API key carries no dashboard tags,
|
||||||
- protocol version.
|
- protocol version.
|
||||||
|
|
||||||
Do not show API key secrets or pepper values.
|
Do not show API key secrets or pepper values.
|
||||||
|
|||||||
@@ -689,6 +689,11 @@ committed client descriptor set (Check 1), the C# `Generated/` (Check 2), the Ru
|
|||||||
protos (Check 3), or the Go/Python client bindings (Check 4, IPC-25) no longer match the current
|
protos (Check 3), or the Go/Python client bindings (Check 4, IPC-25) no longer match the current
|
||||||
`.proto` sources — the codegen drift class this repo has hit repeatedly (stale client
|
`.proto` sources — the codegen drift class this repo has hit repeatedly (stale client
|
||||||
descriptors, net48 `CS0246` on unregenerated protos, silently stale Go/Python worker bindings).
|
descriptors, net48 `CS0246` on unregenerated protos, silently stale Go/Python worker bindings).
|
||||||
|
Check 3 sweeps both directions: a vendored copy that drifted from (or has no) canonical proto
|
||||||
|
fails, and so does a canonical proto with no vendored copy at all. The second direction matters
|
||||||
|
because `clients/rust/build.rs` prefers the canonical directory whenever it exists, so an
|
||||||
|
unvendored proto builds fine in-repo and only breaks the standalone crate build a consumer runs
|
||||||
|
from the published tarball — drift no in-repo build can surface.
|
||||||
Check 4 regenerates the Go and Python bindings with their pinned generators (`protoc-gen-go`
|
Check 4 regenerates the Go and Python bindings with their pinned generators (`protoc-gen-go`
|
||||||
v1.36.11 / `protoc-gen-go-grpc` 1.6.2, `grpcio-tools` 1.80.0) and fails on any diff; a missing
|
v1.36.11 / `protoc-gen-go-grpc` 1.6.2, `grpcio-tools` 1.80.0) and fails on any diff; a missing
|
||||||
generator fails the check rather than skipping it. The **primary** guard for the
|
generator fails the check rather than skipping it. The **primary** guard for the
|
||||||
|
|||||||
+36
-5
@@ -94,7 +94,7 @@ An accepted gRPC command payload can still be too large for the worker pipe: the
|
|||||||
|
|
||||||
### `StreamAlarms`
|
### `StreamAlarms`
|
||||||
|
|
||||||
`StreamAlarms` is a server-streaming, **session-less** RPC that attaches to the gateway's central alarm feed. The handler delegates to `IGatewayAlarmService.StreamAsync`. The stream opens with one `AlarmFeedMessage` carrying an `active_alarm` per currently-active alarm (the ConditionRefresh snapshot), then a single `snapshot_complete`, then a `transition` for every subsequent raise / acknowledge / clear. It is served by the always-on `GatewayAlarmMonitor`, which owns a single gateway-managed worker session and fans out to every attached client — clients no longer open a session of their own. `alarm_filter_prefix`, when set, scopes the stream to a sub-tree.
|
`StreamAlarms` is a server-streaming, **session-less** RPC that attaches to the gateway's central alarm feed. The handler delegates to `IGatewayAlarmService.StreamAsync`. The stream opens with a `provider_status` and a `snapshot_status` `AlarmFeedMessage` (the current provider mode and snapshot-completeness verdict), then one `AlarmFeedMessage` carrying an `active_alarm` per currently-active alarm (the ConditionRefresh snapshot), then a single `snapshot_complete`, then a `transition` for every subsequent raise / acknowledge / clear — interleaved with a further `provider_status` on each failover/failback and a further `snapshot_status` on each change of the truncation verdict. It is served by the always-on `GatewayAlarmMonitor`, which owns a single gateway-managed worker session and fans out to every attached client — clients no longer open a session of their own. `alarm_filter_prefix`, when set, scopes the stream to a sub-tree.
|
||||||
|
|
||||||
### `QueryActiveAlarms`
|
### `QueryActiveAlarms`
|
||||||
|
|
||||||
@@ -114,10 +114,41 @@ message AlarmProviderStatus {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The gateway emits `provider_status` once when a client first subscribes
|
The gateway emits `provider_status` once when a client first subscribes — as
|
||||||
(immediately after the initial snapshot and before the first live transition)
|
the **first** frame on the stream, before the `snapshot_status` frame and
|
||||||
and again on every failover or failback. A late-joining client therefore
|
before any cached `active_alarm` — and again on every failover or failback. A
|
||||||
always learns the current provider mode without waiting for the next switch.
|
late-joining client therefore learns the current provider mode before it sees a
|
||||||
|
single alarm, without waiting for the next switch.
|
||||||
|
|
||||||
|
#### Snapshot completeness on the alarm feed
|
||||||
|
|
||||||
|
`AlarmFeedMessage` has a fifth `payload` case, `snapshot_status`, carrying
|
||||||
|
an `AlarmSnapshotStatus` message:
|
||||||
|
|
||||||
|
```protobuf
|
||||||
|
message AlarmSnapshotStatus {
|
||||||
|
bool truncated = 1; // the cached active set may be missing alarms
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
It is the feed-level twin of the per-record
|
||||||
|
`ActiveAlarmSnapshot.from_truncated_snapshot` flag: `truncated` is true while the
|
||||||
|
monitor's cached active-alarm set derives from a capped worker fetch. Read it as
|
||||||
|
"this set may be incomplete", never as a statement about record fidelity — that
|
||||||
|
is what `degraded` / `source_provider` mean, and the two are independent.
|
||||||
|
|
||||||
|
Emission mirrors `provider_status` but with one ordering rule of its own. The
|
||||||
|
gateway emits `snapshot_status` once when a client subscribes, **after** the
|
||||||
|
open-time `provider_status` and **before** the cached `active_alarm` frames, so a
|
||||||
|
consumer applying the snapshot as it streams has the completeness caveat in hand
|
||||||
|
while it applies it. The open-time frame is unconditional — an explicit
|
||||||
|
`truncated = false` is what distinguishes a complete set from a gateway that
|
||||||
|
never sends the frame. Afterwards it is emitted only on a *change* of verdict:
|
||||||
|
when a reconcile flips the verdict either way, and when a monitor restart drops a
|
||||||
|
truncated verdict with the cache generation it describes (feed subscribers
|
||||||
|
outlive the monitor's worker session, so they see that clear). Clients that do
|
||||||
|
not know the case see an unset `payload` oneof and ignore the message, exactly as
|
||||||
|
before.
|
||||||
|
|
||||||
`AlarmProviderMode` is an enum with three values:
|
`AlarmProviderMode` is an enum with three values:
|
||||||
|
|
||||||
|
|||||||
@@ -416,22 +416,44 @@ gateway 1123/1123, live MXAccess smoke 8/8 — green first try, no stale-obj qui
|
|||||||
had diverged from Contracts (masked by the in-repo build path); refreshed byte-identical,
|
had diverged from Contracts (masked by the in-repo build path); refreshed byte-identical,
|
||||||
and the client protoset descriptors were regenerated.
|
and the client protoset descriptors were regenerated.
|
||||||
|
|
||||||
Follow-ups recorded, not started:
|
Follow-ups recorded here — all closed or narrowed on 2026-08-18 (branch
|
||||||
- `IGatewayAlarmService.StreamAsync` / `AlarmFeedMessage` does not carry the truncation
|
`feat/followup-closeout`, plan `docs/plans/2026-08-17-followup-closeout.md`).
|
||||||
signal — live central-feed consumers (lmxopcua, ScadaBridge) cannot see snapshot
|
Each bullet states what it said when written, then its closure:
|
||||||
degradation; add if those consumers need completeness reasoning.
|
|
||||||
- No guard keeps `clients/rust/protos/` in sync with Contracts (a `diff` check in
|
- `IGatewayAlarmService.StreamAsync` / `AlarmFeedMessage` did not carry the truncation
|
||||||
`scripts/check-codegen.ps1` would close it).
|
signal — live central-feed consumers (lmxopcua, ScadaBridge) could not see snapshot
|
||||||
- `EffectiveDashboardConfiguration` (dashboard settings page) doesn't display
|
degradation. **Closed 2026-08-18 — shipped.** `AlarmSnapshotStatus` with
|
||||||
`GroupToTag` / `UntaggedSessionVisibility`, though it shows `GroupToRole`.
|
`snapshot_status = 5` on the feed: gateway-side edge emission plus open-time priming
|
||||||
- ApiKeysPage's `ConstraintText` neither offers tag input nor lists `DashboardTags`,
|
(`fccf753`, `312e072`), rolled out to all five clients (`c748361`, `4d4f443`).
|
||||||
and since `IsEmpty` now counts tags, a tags-only key renders `-` where a truly
|
- "No guard keeps `clients/rust/protos/` in sync with Contracts." **Was stale when
|
||||||
unconstrained key renders `unconstrained` — two spellings of one meaning.
|
written.** `scripts/check-codegen.ps1` Check 3 already existed and already byte-compared
|
||||||
- `AlarmsHubPublisher` broadcasts alarm transitions with `current_value`/`limit_value`
|
by SHA-256 in CI. The real gap was narrower — the sweep ran in one direction only, so a
|
||||||
unredacted — the `ShowTagValues` redaction covers only the events hub mirror
|
canonical proto with no vendored copy passed. **Closed 2026-08-18** by `711793f`: Check 3
|
||||||
(pre-existing; now noted in `docs/GatewayConfiguration.md`).
|
now sweeps both directions and a canonical proto missing its vendored copy fails.
|
||||||
- The alarm probes' remaining questions (ack-leg GUID stability, `@COUNT` semantics)
|
- `EffectiveDashboardConfiguration` (dashboard settings page) didn't display
|
||||||
unblock via the paths in `docs/AlarmProbeFindings.md`.
|
`GroupToTag` / `UntaggedSessionVisibility`, though it showed `GroupToRole`.
|
||||||
|
**Closed 2026-08-18 — shipped** (`094f2ff`; comparer propagation fixed in `ff16c69`).
|
||||||
|
- ApiKeysPage's `ConstraintText` neither offered tag input nor listed `DashboardTags`,
|
||||||
|
and since `IsEmpty` counts tags, a tags-only key rendered `-` where a truly
|
||||||
|
unconstrained key rendered `unconstrained`. **Closed 2026-08-18 — shipped** (`c037d99`),
|
||||||
|
with the create form de-duplicating typed tags ordinal-ignore-case to match the CLI
|
||||||
|
(`fab600d`).
|
||||||
|
- `AlarmsHubPublisher` broadcast alarm transitions with `current_value`/`limit_value`
|
||||||
|
unredacted — the `ShowTagValues` redaction covered only the events hub mirror.
|
||||||
|
**Closed 2026-08-18** together with the `/browse` residual: `ShowTagValues` now gates
|
||||||
|
all three seams (`eff17d1`, `1ea6f60`, `e50ec49`).
|
||||||
|
- The alarm probes' remaining questions (ack-leg GUID stability, `@COUNT` semantics).
|
||||||
|
**Narrowed 2026-08-18** by a second probe attempt that used the secured-write verb the
|
||||||
|
first attempt lacked (`90331b6`, `540a118`):
|
||||||
|
- `@COUNT` — **answered.** It reports records in the reply, not matching records in the
|
||||||
|
provider, so exact truncation detection through it is permanently refuted; the
|
||||||
|
heuristic in `IsTruncatedFetch` stays as the only available signal.
|
||||||
|
- clear-then-re-raise GUID — **answered.** The re-raise carries a new GUID that replaces
|
||||||
|
the record rather than coexisting with it, which makes the existing `Clear`+`Raise`
|
||||||
|
handling correct as written.
|
||||||
|
- ack leg — **still blocked**, now with a sharper cause: the ack returns `rc=0` and is
|
||||||
|
accepted but inert, so the GUID never moves. Remaining unblock paths are recorded in
|
||||||
|
`docs/AlarmProbeFindings.md`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,512 @@
|
|||||||
|
# Follow-up Closeout Implementation Plan
|
||||||
|
|
||||||
|
> **For Claude:** REQUIRED SUB-SKILL: Use superpowers-extended-cc:subagent-driven-development
|
||||||
|
> to implement this plan task-by-task in this session.
|
||||||
|
|
||||||
|
**Goal:** Close the follow-ups recorded in `docs/plans/2026-08-17-deferred-closeout.md`
|
||||||
|
(as-built notes, "Follow-ups recorded, not started"): the feed-level alarm-truncation
|
||||||
|
signal on `StreamAlarms`/`AlarmFeedMessage`, the `ShowTagValues` redaction gaps
|
||||||
|
(alarms hub + `/browse` live values — TST-16 residual), the codegen guard's
|
||||||
|
one-directional Rust check (the recorded "no guard" note is stale — Check 3 exists),
|
||||||
|
the dashboard settings page's missing `GroupToTag`/`UntaggedSessionVisibility` rows,
|
||||||
|
the ApiKeysPage `DashboardTags` display/input gaps, and a bounded retry of the wnwrap
|
||||||
|
alarm probes using the secured-write verb the first attempt didn't use.
|
||||||
|
|
||||||
|
**Architecture:** Same two-phase posture as the prior three plans. Gateway-side work
|
||||||
|
builds and tests on macOS via `NonWindows.slnx`; windev (`ssh windev`, PowerShell, CI
|
||||||
|
clone `C:\build\mxaccessgw-ci`) runs the probe retry and final full-matrix verification.
|
||||||
|
**This plan touches `.proto` contracts** (Task 1) — contracts regeneration and the
|
||||||
|
five-client rollout (Task 2) follow the exact pattern Task 9 of the previous plan used.
|
||||||
|
The gateway-side truncation edge needs **no worker change**: `GatewayAlarmMonitor`
|
||||||
|
already receives `snapshot_truncated` on every reconcile; the feed frame is raised
|
||||||
|
gateway-side (per-reconcile fidelity, matching the operator-facing caveat's semantics).
|
||||||
|
|
||||||
|
**Tech stack:** .NET 10 gateway / protobuf contracts / five language clients / Blazor
|
||||||
|
Server dashboard / PowerShell codegen scripts / windev live rig.
|
||||||
|
|
||||||
|
**Branch:** `feat/followup-closeout` off `main` (`ab3ff16`).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Ground rules for every implementer subagent
|
||||||
|
|
||||||
|
- NEVER run `git stash`, `git reset`, `git clean`, or `git checkout <sha/branch>`.
|
||||||
|
Commit with explicit **pathspecs on the commit itself**:
|
||||||
|
`git commit -m "..." -- <paths>` — never `git add -A`, `git commit -a`, or a bare
|
||||||
|
`git commit` after add (a concurrent task's staged files would be swept in).
|
||||||
|
- Build/test mutual exclusion: before any `dotnet build`/`dotnet test`, acquire the lock via
|
||||||
|
`mkdir /private/tmp/claude-501/-Users-dohertj2-Desktop-MxAccessGateway/f36938ae-bbca-4245-b5c9-fac512d69e22/scratchpad/buildlock`
|
||||||
|
(retry with backoff while it fails); `rmdir` it on ALL exit paths, including failures.
|
||||||
|
- `TreatWarningsAsErrors=true`, `Nullable=enable` — new warnings break the build; fix, don't suppress.
|
||||||
|
- Follow `docs/style-guides/CSharpStyleGuide.md`: file-scoped namespaces, `sealed` by
|
||||||
|
default, `Async` suffix, MXAccess-aligned names.
|
||||||
|
- Update affected docs in the same commit as the source change.
|
||||||
|
- MXAccess parity is the contract; never synthesize events. The feed truncation frame is a
|
||||||
|
gateway-status frame (like `provider_status`), not a synthesized MXAccess event.
|
||||||
|
- Never log secrets, API keys, credentials, or tag values.
|
||||||
|
- The `Files:` block is the scope contract. If the task can't be done inside it, that's a
|
||||||
|
plan defect — surface it, don't silently expand scope.
|
||||||
|
- On macOS build `NonWindows.slnx`; the x86 Worker and full `slnx` only build on windev.
|
||||||
|
- `git commit` hitting `index.lock` contention → wait 5 s and retry.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Task 1: Feed-level alarm-truncation signal (proto + gateway)
|
||||||
|
|
||||||
|
**Classification:** high-risk
|
||||||
|
**Estimated implement time:** ~5 min
|
||||||
|
**Parallelizable with:** Task 3, Task 4, Task 5, Task 6
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
- Modify: `src/ZB.MOM.WW.MxGateway.Contracts/Protos/mxaccess_gateway.proto`
|
||||||
|
- Modify: `src/ZB.MOM.WW.MxGateway.Server/Alarms/GatewayAlarmMonitor.cs`
|
||||||
|
- Modify: `src/ZB.MOM.WW.MxGateway.Server/Alarms/IGatewayAlarmService.cs` (doc comment only)
|
||||||
|
- Test: `src/ZB.MOM.WW.MxGateway.Tests/Gateway/Alarms/` (existing `GatewayAlarmMonitor` test class(es))
|
||||||
|
- Docs: `gateway.md`, `docs/Grpc.md`, `docs/DesignDecisions.md`
|
||||||
|
- Build output: `src/ZB.MOM.WW.MxGateway.Contracts/Generated/` (regenerated, committed)
|
||||||
|
|
||||||
|
Do NOT touch `docs/GatewayConfiguration.md` or `docs/GatewayDashboardDesign.md` (owned
|
||||||
|
by Task 3 this wave) or any `clients/**` path (Task 2).
|
||||||
|
|
||||||
|
**Spec.**
|
||||||
|
|
||||||
|
Proto (`mxaccess_gateway.proto`) — additive only:
|
||||||
|
|
||||||
|
1. New message next to `AlarmProviderStatus` (`:1025-1030`):
|
||||||
|
|
||||||
|
```proto
|
||||||
|
// Feed-level snapshot-completeness status. Emitted once on StreamAlarms open
|
||||||
|
// (after the initial provider_status frame, before the cached active_alarm frames)
|
||||||
|
// so late joiners learn the current verdict, and again on every change of the
|
||||||
|
// truncation verdict observed at reconcile. Mirrors the per-record
|
||||||
|
// ActiveAlarmSnapshot.from_truncated_snapshot caveat at feed level so live
|
||||||
|
// consumers (lmxopcua, ScadaBridge) can reason about completeness without
|
||||||
|
// polling QueryActiveAlarms. Additive in v1; absent frames mean "not truncated"
|
||||||
|
// only for streams opened against gateways that emit the frame at open.
|
||||||
|
message AlarmSnapshotStatus {
|
||||||
|
// True while the monitor's cached active-alarm set derives from a truncated
|
||||||
|
// (capped) worker fetch — the set may be missing alarms. Distinct from
|
||||||
|
// provider degradation (AlarmProviderStatus.degraded).
|
||||||
|
bool truncated = 1;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
2. New oneof case in `AlarmFeedMessage` (`:1006-1023`, next free field 5):
|
||||||
|
`AlarmSnapshotStatus snapshot_status = 5;`
|
||||||
|
|
||||||
|
Gateway (`GatewayAlarmMonitor.cs`):
|
||||||
|
|
||||||
|
- `ApplyReconcile` (`:632-694`) currently records `_snapshotTruncated = snapshotTruncated`
|
||||||
|
at `:691` with a comment saying truncation "needs no special handling here". Change:
|
||||||
|
detect the edge (old value ≠ new value) and, when it changes, broadcast
|
||||||
|
`new AlarmFeedMessage { SnapshotStatus = new AlarmSnapshotStatus { Truncated = snapshotTruncated } }`
|
||||||
|
via `BroadcastToAll` (`:720-732` — the provider-status precedent at `:531`). Match the
|
||||||
|
existing locking discipline exactly: compute/record under `_sync` the way
|
||||||
|
`ApplyProviderModeChangeAsync` (`:513-566`) does, broadcast the way it does. Update the
|
||||||
|
now-stale comment at `:627-631`.
|
||||||
|
- Late-joiner priming in `StreamAsync` (`:748-800`): after the `provider_status` frame
|
||||||
|
(`:782`) and before the cached `active_alarm` frames (`:786`), yield one
|
||||||
|
`snapshot_status` frame carrying the current `_snapshotTruncated`, read under the same
|
||||||
|
lock that snapshots `_alarms` (`:763-780`) so the flag and the alarm set are a
|
||||||
|
consistent pair.
|
||||||
|
- `ClearCache` (`:742`) resets `_snapshotTruncated` to false — decide and document
|
||||||
|
whether the reset emits a frame (it should: a monitor restart that drops a truncated
|
||||||
|
verdict is a completeness change subscribers must see; emit via the same edge path).
|
||||||
|
- `MxAccessGatewayService.StreamAlarms` is a pass-through — no change.
|
||||||
|
- `IGatewayAlarmService.SnapshotTruncated` doc comment (`:41-59`): note the new
|
||||||
|
feed-level frame so the two surfaces cross-reference.
|
||||||
|
|
||||||
|
Tests (extend the existing GatewayAlarmMonitor test class(es), matching their fake/
|
||||||
|
reconcile-driving idiom):
|
||||||
|
1. Reconcile flipping truncated false→true emits exactly one `snapshot_status` frame
|
||||||
|
(truncated=true) to an attached subscriber; a second identical reconcile emits none.
|
||||||
|
2. true→false emits the clearing frame.
|
||||||
|
3. A subscriber attaching while truncated=true receives, in order: `provider_status`,
|
||||||
|
`snapshot_status(truncated=true)`, cached `active_alarm`s, `snapshot_complete`.
|
||||||
|
4. A subscriber attaching while truncated=false receives `snapshot_status(truncated=false)`
|
||||||
|
at open (the baseline frame is unconditional).
|
||||||
|
|
||||||
|
Docs, same commit:
|
||||||
|
- `gateway.md` §"truncated-snapshot visibility" (`:243-262`): add the feed-level frame,
|
||||||
|
emission rules (open + edges), and ordering.
|
||||||
|
- `docs/Grpc.md` `:105-120` (provider_status oneof case rules): add the fifth case with
|
||||||
|
its emission rules; `:95-99` StreamAlarms handler contract.
|
||||||
|
- `docs/DesignDecisions.md` `:206-230` ("truncation is reported per record…", dated
|
||||||
|
2026-08-17): extend the entry — per-record stays for `QueryActiveAlarms` (bare stream,
|
||||||
|
no envelope); the live feed now carries the set-level signal as a status frame.
|
||||||
|
|
||||||
|
**Step 1:** Write the four monitor tests first (they fail: no `SnapshotStatus` case).
|
||||||
|
Building the Tests project will fail to compile until the proto field exists — so add
|
||||||
|
the proto change, rebuild Contracts (regenerates `Generated/`), then confirm the tests
|
||||||
|
fail for behavioral reasons (no frame emitted), not compile errors.
|
||||||
|
**Step 2:** Implement the monitor changes; run
|
||||||
|
`dotnet test src/ZB.MOM.WW.MxGateway.Tests/... --filter "FullyQualifiedName~GatewayAlarmMonitor"` → all pass.
|
||||||
|
**Step 3:** Full macOS build (`NonWindows.slnx`) 0W/0E + run the alarm-area test filter.
|
||||||
|
**Step 4:** Update the three docs.
|
||||||
|
**Step 5:** Commit with pathspecs (proto, Generated, monitor, interface, tests, 3 docs).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Task 2: Five-client rollout of `snapshot_status`
|
||||||
|
|
||||||
|
**Classification:** standard
|
||||||
|
**Estimated implement time:** ~5 min
|
||||||
|
**Parallelizable with:** Task 7 (windev-only; disjoint files)
|
||||||
|
**Blocked by:** Task 1, Task 3, Task 4
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
- Modify: `clients/rust/protos/mxaccess_gateway.proto` (byte-identical refresh from Contracts)
|
||||||
|
- Regenerate: `clients/proto/descriptors/mxaccessgw-client-v1.protoset`
|
||||||
|
(via `scripts/publish-client-proto-inputs.ps1`), Go + Python generated bindings
|
||||||
|
(per-client `generate-proto.ps1`)
|
||||||
|
- Modify: `clients/dotnet/ZB.MOM.WW.MxGateway.Client.Cli/MxGatewayClientCli.cs:1552-1565`
|
||||||
|
(feed renderer — add BOTH the missing `ProviderStatus` case and the new `SnapshotStatus` case)
|
||||||
|
- Modify: `clients/go/cmd/mxgw-go/main.go:1101-1114` (`formatAlarmFeedMessage` — same two cases)
|
||||||
|
- Modify: `clients/rust/crates/mxgw-cli/src/main.rs:2233-2264` and `:2266+`
|
||||||
|
(`alarm_feed_message_summary` / `alarm_feed_message_to_json` — add `SnapshotStatus` arm)
|
||||||
|
- Modify: READMEs — `clients/dotnet/README.md` (~`:152-158`), `clients/python/README.md`
|
||||||
|
(~`:118-123`), `clients/rust/README.md` (~`:126`), `clients/go/README.md` (~`:148-154`),
|
||||||
|
`clients/java/README.md` (~`:120-126`): one paragraph each on the feed-level frame
|
||||||
|
- Modify: `docs/GatewayDashboardDesign.md:276` (AlarmsHub payload-case row: add the new case)
|
||||||
|
|
||||||
|
**Spec.** Follow the exact rollout Task 9 of the prior plan used (recorded at
|
||||||
|
`docs/plans/2026-08-17-deferred-closeout.md:300-318`): regenerate everything from
|
||||||
|
Contracts, refresh the Rust vendored proto byte-identically, then verify with
|
||||||
|
`pwsh scripts/check-codegen.ps1` (all four checks green — note Task 4 may have added a
|
||||||
|
reverse-direction sweep to Check 3 by the time this runs; it must pass too).
|
||||||
|
Python/Java CLIs render generic protobuf-JSON — README paragraph only, no code.
|
||||||
|
Java's `build/resources/**` proto copies are untracked build output — do not commit.
|
||||||
|
|
||||||
|
**Steps:** regenerate → renderer cases → build/test each touched client per the
|
||||||
|
CLAUDE.md verification matrix (dotnet client slnx + tests; `gofmt`+`go build`+`go test`;
|
||||||
|
`cargo fmt`+`check`+`test`+`clippy -D warnings`; python `pytest`; java `gradle test`) →
|
||||||
|
`pwsh scripts/check-codegen.ps1` green → READMEs + dashboard-design row → commit with pathspecs.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Task 3: Complete `ShowTagValues` coverage — alarms hub + `/browse` (TST-16 residual)
|
||||||
|
|
||||||
|
**Classification:** high-risk (security posture)
|
||||||
|
**Estimated implement time:** ~5 min
|
||||||
|
**Parallelizable with:** Task 1, Task 4, Task 5, Task 6
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
- Modify: `src/ZB.MOM.WW.MxGateway.Server/Dashboard/Hubs/AlarmsHubPublisher.cs`
|
||||||
|
- Modify: `src/ZB.MOM.WW.MxGateway.Server/Dashboard/DashboardLiveDataService.cs`
|
||||||
|
- Modify (if value formatting sits there): `src/ZB.MOM.WW.MxGateway.Server/Dashboard/DashboardTagValue.cs`
|
||||||
|
- Test: `src/ZB.MOM.WW.MxGateway.Tests/Gateway/Dashboard/AlarmsHubPublisherTests.cs` (new)
|
||||||
|
- Test: existing `DashboardLiveDataService` test class (extend), else new file alongside
|
||||||
|
- Docs: `docs/GatewayConfiguration.md:195` (the residual sentence),
|
||||||
|
`docs/GatewayDashboardDesign.md` (AlarmsHub row `:276` — redaction note; do NOT edit the
|
||||||
|
payload-case list, Task 2 owns that), `archreview/remediation/00-tracking.md:231`
|
||||||
|
(TST-16 residual row), `archreview/2026-07-12/60-testing-docs-gaps.md` (residual lines)
|
||||||
|
|
||||||
|
Do NOT touch `gateway.md` (owned by Task 1 this wave) or `SettingsPage.razor`/
|
||||||
|
`EffectiveDashboardConfiguration` (Task 5).
|
||||||
|
|
||||||
|
**Spec.**
|
||||||
|
|
||||||
|
Seam A — `AlarmsHubPublisher` (`:14-68`): today it forwards the raw `AlarmFeedMessage`
|
||||||
|
verbatim (`:40-43`), leaking `current_value`/`limit_value` from BOTH the `transition`
|
||||||
|
arm (proto `:882`, `:886`) and the `active_alarm` snapshot arm (proto `:931-932`) to any
|
||||||
|
`/hubs/alarms` browser client. Inject the dashboard options (mirror how
|
||||||
|
`DashboardEventBroadcaster.cs:53` captures `_showTagValues`); when `ShowTagValues` is
|
||||||
|
false, deep-`Clone()` the message and clear the four value fields before `SendAsync`.
|
||||||
|
**Never mutate the source message** — it is fanned out to gRPC `StreamAlarms` subscribers
|
||||||
|
and the AlarmsPage status loop (`DashboardEventBroadcaster.RedactValues` at `:247-259`
|
||||||
|
is the exact pattern, including the clone-only rule). When `ShowTagValues` is true,
|
||||||
|
forward as today. Frames with no value fields (`snapshot_complete`, `provider_status`,
|
||||||
|
and Task 1's `snapshot_status` if already merged — handle via default: clone only when
|
||||||
|
the arm carries values) pass through untouched.
|
||||||
|
|
||||||
|
Seam B — `/browse` live values: `BrowsePage.razor:133,:144,:147` renders
|
||||||
|
`value?.ValueText` unconditionally, fed by `DashboardLiveDataService.cs:99-101` →
|
||||||
|
`DashboardTagValue.ValueText` (`DashboardTagValue.cs:41-45`,
|
||||||
|
`DashboardMxValueFormatter.FormatValue`). Redact **at the service boundary** (per the
|
||||||
|
original TST-16 recommendation, `archreview/remediation/60-testing-docs-gaps.md:346-352`):
|
||||||
|
when `ShowTagValues` is false, `DashboardLiveDataService` produces `ValueText` as the
|
||||||
|
literal `"[redacted]"` instead of the formatted value; quality/timestamp columns stay.
|
||||||
|
No `BrowsePage.razor` change should be needed — if one turns out to be, that's a plan
|
||||||
|
defect to surface. Keep the redaction decision in one place; don't duplicate the check
|
||||||
|
in the page.
|
||||||
|
|
||||||
|
Tests:
|
||||||
|
- `AlarmsHubPublisherTests` (new): reuse the `CapturingHubContext` shape from
|
||||||
|
`DashboardEventBroadcasterTests.cs:23` and the `DashboardSnapshotPublisherTests`
|
||||||
|
BackgroundService-driving template (fake stream service, internal ctor if needed).
|
||||||
|
Cases: ShowTagValues=false redacts both arms' value fields but keeps metadata;
|
||||||
|
source message not mutated; ShowTagValues=true passes values through;
|
||||||
|
valueless frames forwarded intact.
|
||||||
|
- `DashboardLiveDataService`: ShowTagValues=false → `ValueText == "[redacted]"`;
|
||||||
|
true → formatted value.
|
||||||
|
|
||||||
|
Docs: rewrite `docs/GatewayConfiguration.md:195` — the flag now covers the events hub
|
||||||
|
mirror, the alarms hub, and `/browse`; state the "[redacted]" rendering. Mark the TST-16
|
||||||
|
residual rows closed in both archreview files (match their existing status wording).
|
||||||
|
|
||||||
|
**Steps:** tests first (fail) → implement both seams → targeted filters
|
||||||
|
(`~AlarmsHubPublisher`, `~DashboardLiveDataService`, plus `~DashboardEventBroadcaster`
|
||||||
|
regression) → macOS build 0W/0E → docs → commit with pathspecs.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Task 4: Codegen guard — reverse-direction Check 3 + stale-note correction
|
||||||
|
|
||||||
|
**Classification:** small
|
||||||
|
**Estimated implement time:** ~3 min
|
||||||
|
**Parallelizable with:** Task 1, Task 3, Task 5, Task 6
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
- Modify: `scripts/check-codegen.ps1:75-95` (Check 3)
|
||||||
|
- Docs: `docs/GatewayTesting.md:687-698` (Check 3 description),
|
||||||
|
`docs/ClientPackaging.md:199-213` (one-line note), `clients/rust/README.md:25-38`
|
||||||
|
(refresh-rule note if wording changes)
|
||||||
|
|
||||||
|
**Spec.** The recorded follow-up ("no guard keeps `clients/rust/protos/` in sync") is
|
||||||
|
stale — Check 3 (`:75-95`) already SHA-256-compares vendored↔canonical and runs in CI
|
||||||
|
(`.gitea/workflows/ci.yml:76-78`). The real gap: `:79` iterates only the **vendored**
|
||||||
|
dir, so a newly added canonical proto with no vendored copy passes silently and would
|
||||||
|
break a standalone crate build later. Add the reverse sweep: iterate
|
||||||
|
`$canonicalProtoDir`; any canonical `*.proto` with no same-named vendored counterpart →
|
||||||
|
append to `$failures` with a copy-to instruction, same reporting style as `:81-89`.
|
||||||
|
Keep all-checks-always-run behavior. Do NOT edit the closeout plan's follow-ups block —
|
||||||
|
Task 9 owns that file.
|
||||||
|
|
||||||
|
**Steps:** edit script → verify locally: `pwsh scripts/check-codegen.ps1` runs Check 3
|
||||||
|
both directions green (macOS pwsh is fine for Check 3/hashing; if Checks 2/4 can't run
|
||||||
|
locally, run Check 3's logic standalone and say so) → prove the new failure mode by
|
||||||
|
temporarily copying a scratch proto into the canonical dir under the scratchpad — NOT
|
||||||
|
into the repo — or by dry-running the loop against a temp dir pair → docs → commit with
|
||||||
|
pathspecs.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Task 5: Settings page — show `GroupToTag` and `UntaggedSessionVisibility`
|
||||||
|
|
||||||
|
**Classification:** small
|
||||||
|
**Estimated implement time:** ~3 min
|
||||||
|
**Parallelizable with:** Task 1, Task 3, Task 4, Task 6
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
- Modify: `src/ZB.MOM.WW.MxGateway.Server/Configuration/EffectiveDashboardConfiguration.cs:3-10`
|
||||||
|
- Modify: `src/ZB.MOM.WW.MxGateway.Server/Configuration/GatewayConfigurationProvider.cs:58-65`
|
||||||
|
- Modify: `src/ZB.MOM.WW.MxGateway.Server/Dashboard/Components/Pages/SettingsPage.razor`
|
||||||
|
- Test: `src/ZB.MOM.WW.MxGateway.Tests/Configuration/GatewayConfigurationProviderTests.cs` (new)
|
||||||
|
- Test: page-render test alongside the existing dashboard render tests
|
||||||
|
(`AlarmsPageTruncationBannerTests.cs` is the template)
|
||||||
|
|
||||||
|
**Spec.** Add `GroupToTag` (`IReadOnlyDictionary<string, string[]>` or matching shape)
|
||||||
|
and `UntaggedSessionVisibility` to the `EffectiveDashboardConfiguration` record; populate
|
||||||
|
in `GatewayConfigurationProvider` (`:58-65`) from `DashboardOptions.GroupToTag` (`:78`)
|
||||||
|
and `.UntaggedSessionVisibility` (`:85`). Neither is a secret — no masking. Rendering:
|
||||||
|
`GroupToTag` row next to "Dashboard role mapping" (`SettingsPage.razor:50-67`), same
|
||||||
|
`<ul><li><code>group</code> → tag1, tag2</li></ul>` idiom with the `(none configured)`
|
||||||
|
empty case; `UntaggedSessionVisibility` as a scalar row in the Dashboard cluster
|
||||||
|
(`:77-80`). Tests: provider projection test (new ground — assert both members copied,
|
||||||
|
including the empty-dictionary case); render test asserting a configured mapping and the
|
||||||
|
visibility value appear in the emitted markup (HtmlRenderer idiom, no bUnit).
|
||||||
|
|
||||||
|
**Steps:** tests first → implement → `--filter` the two new test classes → macOS build
|
||||||
|
0W/0E → commit with pathspecs. (No doc change: `docs/GatewayConfiguration.md` already
|
||||||
|
documents both options; the settings page is self-describing.)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Task 6: ApiKeysPage — `DashboardTags` in ConstraintText + create-form input
|
||||||
|
|
||||||
|
**Classification:** standard
|
||||||
|
**Estimated implement time:** ~4 min
|
||||||
|
**Parallelizable with:** Task 1, Task 3, Task 4, Task 5
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
- Modify: `src/ZB.MOM.WW.MxGateway.Server/Dashboard/Components/Pages/ApiKeysPage.razor`
|
||||||
|
- Test: new render/behavior test alongside the dashboard render tests
|
||||||
|
- Docs: `docs/Authorization.md` (dashboard API-key management section, if it describes
|
||||||
|
the create form's constraint fields)
|
||||||
|
|
||||||
|
**Spec.** Two defects, one page:
|
||||||
|
|
||||||
|
(a) `ConstraintText` (`:504-533`) never lists `DashboardTags`, so a tags-only key falls
|
||||||
|
through to `string.Join` of an empty list → `""` → `DashboardDisplay.Text` renders `-`,
|
||||||
|
while a truly unconstrained key says `unconstrained` — two spellings of one meaning,
|
||||||
|
except they're NOT the same meaning: the tags-only key IS constrained
|
||||||
|
(`ApiKeyConstraints.IsEmpty` counts tags, `ApiKeyConstraints.cs:62-71`). Fix by listing
|
||||||
|
it: `AddList(parts, "dashboard_tags", constraints.DashboardTags)` alongside the other
|
||||||
|
snake_case labels (~`:516`). `AddList` (`:535-541`) preserves order — keep that.
|
||||||
|
|
||||||
|
(b) The create form's Constraints section (`:97-133`) has no dashboard-tags input, so a
|
||||||
|
tags-only key can't be created from the dashboard at all. Add a textarea matching the
|
||||||
|
subtree/glob fields exactly: bind to a new `string DashboardTags` on `ApiKeyCreateModel`
|
||||||
|
(`:551-589`), clear it in `Reset()` (`:575-588`), split with the existing `ParseList`
|
||||||
|
(`:543-549`), and attach in `TryBuildCreateRequest` (`:415-455`) via object-initializer
|
||||||
|
on the `new ApiKeyConstraints(...)` at `:444-452` (init-only property):
|
||||||
|
`new ApiKeyConstraints(...) { DashboardTags = ParseList(CreateModel.DashboardTags) }`.
|
||||||
|
Help text: comma/newline-separated, matched case-insensitively against
|
||||||
|
`Dashboard:GroupToTag` grants; empty = untagged (visibility per
|
||||||
|
`UntaggedSessionVisibility`). Mirrors the CLI's `apikey create --dashboard-tags`.
|
||||||
|
|
||||||
|
Tests (HtmlRenderer page-render idiom): tags-only key renders `dashboard_tags: …` (not
|
||||||
|
`-`); unconstrained key still renders `unconstrained`; create-model round-trip —
|
||||||
|
`TryBuildCreateRequest` with a tags input yields constraints whose `DashboardTags`
|
||||||
|
matches (if the method is private, follow whatever access pattern the page's existing
|
||||||
|
tests use; an `internal`-for-testing hook is acceptable only if the repo already does
|
||||||
|
that elsewhere — otherwise drive through the rendered form or refactor minimally).
|
||||||
|
|
||||||
|
**Steps:** tests first → implement → `--filter` new test class → macOS build 0W/0E →
|
||||||
|
docs (only if `Authorization.md` enumerates the form fields) → commit with pathspecs.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Task 7: Wnwrap alarm-probe retry — secured-write path (windev)
|
||||||
|
|
||||||
|
**Classification:** standard (investigation; may legitimately end blocked again)
|
||||||
|
**Estimated implement time:** ~10 min wall (windev round-trips)
|
||||||
|
**Parallelizable with:** Task 2
|
||||||
|
**Blocked by:** none (but runs in Wave 2 to keep windev free for it)
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
- Modify: `docs/AlarmProbeFindings.md` (append the attempt record + findings)
|
||||||
|
- Modify (only if findings answer the questions): comment-level updates in
|
||||||
|
`src/ZB.MOM.WW.MxGateway.Worker/MxAccess/WnWrapAlarmConsumer.cs:425-435, :490-505, :655-670`
|
||||||
|
- NO probe code committed; NO `Skip=` flips committed; throwaway harness lives only in
|
||||||
|
the windev CI clone and is deleted after.
|
||||||
|
|
||||||
|
**Spec.** The 2026-08-17 attempt failed because it used plain `Write` against classified
|
||||||
|
alarm UDAs (`SecurityError detail=1008`). The worker and live harness already implement
|
||||||
|
the right verb pair end-to-end (`WorkerLiveMxAccessSmokeTests.cs:445-583` —
|
||||||
|
`AuthenticateUser` then `WriteSecured`; on this rig `AuthenticateUser("Administrator","")`
|
||||||
|
is known to resolve to user id 1, `:649`). Retry on windev (`ssh windev`, CI clone):
|
||||||
|
|
||||||
|
1. Pull the branch; build what the probe needs (worker x86 + integration tests).
|
||||||
|
2. Drive `AuthenticateUser("Administrator","")` → `WriteSecured(true)` against
|
||||||
|
`TestMachine_001.TestAlarm001` (env overrides
|
||||||
|
`MXGATEWAY_LIVE_MXACCESS_WRITE_SECURED_USER`/`_PASSWORD` exist if a real Galaxy
|
||||||
|
account is available — never echo credential values). A throwaway variant of
|
||||||
|
`WnWrapConsumerProbeTests` (`Worker.Tests/Probes/`, `Skip=null` locally only,
|
||||||
|
`GROUP` fixed to the findings run's `TestArea`, `MaxAlarmsPerFetch` droppable to 1–2)
|
||||||
|
is the vehicle.
|
||||||
|
3. If the secured write lands: answer **Q1** — GUID stability across `UNACK→ACK`
|
||||||
|
(`AlarmAckByGUID`) and across clear-then-re-raise; and **Q2** — `ALARM_RECORDS/@COUNT`
|
||||||
|
total-active vs records-in-reply under `maxAlmCnt` 1–2 with all three TestMachine
|
||||||
|
alarms active. Record both in `AlarmProbeFindings.md`; update the three
|
||||||
|
`WnWrapAlarmConsumer` comment blocks to "observed" with the answer. **Do not change
|
||||||
|
`IsTruncatedFetch` behavior in this task** — if Q2 says `@COUNT` is total-active,
|
||||||
|
record that an exact-detection follow-up is now unblocked; the heuristic change is
|
||||||
|
its own reviewed task later.
|
||||||
|
4. If still refused: append the attempt (verb used, identity resolved, status line —
|
||||||
|
no secrets), and record which unblock paths remain (flip script re-enable /
|
||||||
|
real Galaxy account / reclassification). That outcome completes this task.
|
||||||
|
|
||||||
|
**Steps:** windev session → probe → findings written → clean up throwaway files on
|
||||||
|
windev → commit (docs + any comment updates) with pathspecs from the Mac tree.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Task 8: Windev full verification
|
||||||
|
|
||||||
|
**Classification:** small (no review — verification gate)
|
||||||
|
**Estimated implement time:** ~15 min wall
|
||||||
|
**Blocked by:** Task 1, Task 2, Task 3, Task 4, Task 5, Task 6, Task 7
|
||||||
|
|
||||||
|
Pull branch into `C:\build\mxaccessgw-ci`, then: full `slnx` build 0W/0E → worker x86
|
||||||
|
tests → gateway tests → live MXAccess smoke (`MXGATEWAY_RUN_LIVE_MXACCESS_TESTS=1`,
|
||||||
|
`~WorkerLiveMxAccessSmokeTests`) → `pwsh scripts/check-codegen.ps1` all green.
|
||||||
|
Known quirk: first build after pull may fail CS2001/CS0016 on stale Contracts obj —
|
||||||
|
clear obj/bin and rebuild, not a regression. Record all counts.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Task 9: Bookkeeping — follow-ups closure + plan record
|
||||||
|
|
||||||
|
**Classification:** trivial
|
||||||
|
**Estimated implement time:** ~2 min
|
||||||
|
**Blocked by:** Task 8
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
- Modify: `docs/plans/2026-08-17-deferred-closeout.md` (follow-ups block `:419-434`):
|
||||||
|
annotate each closed item with its closing commit; REWRITE the stale Rust-guard bullet
|
||||||
|
to record that Check 3 already existed and only the reverse sweep was missing; leave
|
||||||
|
anything genuinely still open (e.g. probe questions if Task 7 ended blocked;
|
||||||
|
`IsTruncatedFetch` exactness if Q2 unblocked it) accurately stated.
|
||||||
|
- Modify: `docs/plans/2026-08-17-followup-closeout.md` (this file): as-built notes.
|
||||||
|
- Modify: `docs/plans/2026-08-17-followup-closeout.md.tasks.json`: statuses.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Execution notes for the orchestrator
|
||||||
|
|
||||||
|
- Branch `feat/followup-closeout` off `main` before Task 1.
|
||||||
|
- Opus implementers per user instruction; reviewer chain per Classification
|
||||||
|
(high-risk = spec-reviewer serial then code-reviewer; standard = parallel pair;
|
||||||
|
small = code-reviewer only; trivial = none).
|
||||||
|
- Waves: **Wave 1:** 1, 3, 4, 5, 6 (files disjoint, including docs — ownership lines in
|
||||||
|
each task are the contract) · **Wave 2:** 2 (after 1+3+4), 7 (windev) · **Wave 3:** 8 →
|
||||||
|
final integration review → 9.
|
||||||
|
- Each implementer gets its full task text + the ground rules block.
|
||||||
|
- Doc-file ownership this wave matters more than usual: `gateway.md`→Task 1,
|
||||||
|
`GatewayConfiguration.md`+`GatewayDashboardDesign.md`→Task 3 (Task 2 later adds the
|
||||||
|
payload-case row), closeout-plan follow-ups→Task 9 only.
|
||||||
|
- Task 7/8 run against windev over `ssh windev` (PowerShell); psbridge is fallback.
|
||||||
|
- Do not merge to `main` without user instruction.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## As-built notes (execution record, 2026-08-18)
|
||||||
|
|
||||||
|
All 9 tasks completed on `feat/followup-closeout`; every classification-driven review
|
||||||
|
chain resolved **Approved**. The final integration review came back *Ready with
|
||||||
|
reservations* — all of its non-blocking findings were fixed in `c3c603f`, leaving no
|
||||||
|
open review item.
|
||||||
|
|
||||||
|
Verification: macOS `NonWindows.slnx` 0W/0E; gateway filtered suites green (dashboard
|
||||||
|
276/276, alarm suites green); `scripts/check-codegen.ps1` 4/4 on macOS. **The full
|
||||||
|
five-language client matrix ran locally for the first time** — dotnet 133 passed /1
|
||||||
|
skipped, Go clean, Rust 108, Python 168 passed /1 skipped, Java 131. Windev at `90331b6`:
|
||||||
|
full `slnx` 0W/0E (one transient MSB4166 node crash, clean on retry), worker x86 523
|
||||||
|
passed / 11 skipped plus **one pre-existing deterministic failure that reproduces on
|
||||||
|
`main`** (`WorkerPipeSessionTests.RunAsync_LongInFlightCommandThatKeepsPumping_DoesNotFaultAndDeliversReply`),
|
||||||
|
gateway 1151/1151 on rerun (the known windev load flake), live MXAccess smoke 8/8. The
|
||||||
|
comment- and prose-only commits landed after `90331b6` are unverified on windev by
|
||||||
|
design; they need only a cheap tip re-build there.
|
||||||
|
|
||||||
|
- **A session-limit outage interrupted four reviewers mid-run.** All four resumed
|
||||||
|
cleanly on retry; no review was lost or silently truncated.
|
||||||
|
- **Task 2 surfaced two plan defects, both absorbed rather than deferred.** The spec
|
||||||
|
claimed the Java CLI renders alarm frames as generic JSON; it is in fact an exhaustive
|
||||||
|
`switch` that does not compile without an arm for the new case. The spec's work list
|
||||||
|
also omitted the Java generated-bindings tree.
|
||||||
|
- **A reviewer's Minor-2 was refuted, and the doc defect behind it fixed instead.** The
|
||||||
|
finding assumed alarm records coexist after a re-raise; fetch evidence from the probe
|
||||||
|
rig shows the new GUID replaces the record. The prose that implied coexistence was
|
||||||
|
corrected rather than the code.
|
||||||
|
|
||||||
|
Follow-ups recorded, not started:
|
||||||
|
|
||||||
|
- `WorkerPipeSessionTests.RunAsync_LongInFlightCommandThatKeepsPumping_DoesNotFaultAndDeliversReply`
|
||||||
|
fails deterministically on windev **and on `main`** — pre-existing, needs its own
|
||||||
|
investigation.
|
||||||
|
- `check-codegen.ps1` Check 4 is unrunnable on Windows: the `protoc-gen-go` version banner
|
||||||
|
carries a `.exe` suffix that the exact-string compare in
|
||||||
|
`clients/go/generate-proto.ps1:10,55` does not tolerate.
|
||||||
|
- Windev has `protoc-gen-go-grpc` 1.6.1 against the repo's pinned 1.6.2.
|
||||||
|
- `clients/java`'s `checkGeneratedClean` is dead under Gradle 9 (`Project.exec` was
|
||||||
|
removed); it needs `ExecOperations` injection to work again.
|
||||||
|
- `SettingsPage` renders every `EffectiveDashboardConfiguration` member except
|
||||||
|
`RecentFaultLimit` / `RecentSessionLimit` (pre-existing, predates this branch).
|
||||||
|
- The ack-leg probe stays blocked; unblock paths are in `docs/AlarmProbeFindings.md`.
|
||||||
|
- The dashboard `AlarmsPage` truncation banner is still poll-driven — it could consume
|
||||||
|
the new `snapshot_status` feed frame instead.
|
||||||
|
- **A closed code-review finding regressed, or was never applied.** Server-012
|
||||||
|
(`code-reviews/Server/findings.md:405-412`) is recorded *Resolved 2026-05-18* and claims
|
||||||
|
it corrected two scope lists to the canonical `*:*` strings — the `CLAUDE.md`
|
||||||
|
Build/Test/Run `apikey` sample and the `CLAUDE.md` Authentication-section scope list.
|
||||||
|
Neither correction was present when this branch looked; both were re-fixed here, along
|
||||||
|
with a third instance the finding never covered (`docs/Authentication.md`'s `ops.alice`
|
||||||
|
example). The bookkeeping is the follow-up: other `Server-0xx` entries marked Resolved
|
||||||
|
with documentation-only fixes should be spot-checked for the same pattern, since a
|
||||||
|
finding that reads Resolved is not otherwise re-examined.
|
||||||
|
|
||||||
|
Explicitly decided, not an omission: **`../scadaproj/CLAUDE.md` needs no update.** The
|
||||||
|
umbrella index records the *set* of `.proto` files this repo owns, and that set is
|
||||||
|
unchanged — Task 1 added a message and a field inside an existing proto, not a new
|
||||||
|
contract file.
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"planPath": "docs/plans/2026-08-17-followup-closeout.md",
|
||||||
|
"tasks": [
|
||||||
|
{"id": 1, "subject": "Task 1: Feed-level alarm-truncation signal (proto + gateway)", "status": "completed", "commits": ["fccf753", "312e072"], "review": "Spec compliant; code review Approved, proto-comment Minor fixed"},
|
||||||
|
{"id": 2, "subject": "Task 2: Five-client rollout of snapshot_status", "status": "completed", "commits": ["c748361", "4d4f443"], "review": "Spec compliant; code review Approved, Java import + Rust render-test nits fixed; full five-toolchain matrix ran locally"},
|
||||||
|
{"id": 3, "subject": "Task 3: Complete ShowTagValues coverage — alarms hub + /browse", "status": "completed", "commits": ["eff17d1", "1ea6f60", "e50ec49"], "review": "Spec compliant; code review Approved, failed-read placeholder fix re-review Approved"},
|
||||||
|
{"id": 4, "subject": "Task 4: Codegen guard — reverse-direction Check 3 + stale-note correction", "status": "completed", "commit": "711793f", "review": "Approved (code review, no issues)"},
|
||||||
|
{"id": 5, "subject": "Task 5: Settings page — GroupToTag + UntaggedSessionVisibility rows", "status": "completed", "commits": ["094f2ff", "ff16c69"], "review": "Approved; comparer-propagation fix applied and re-verified"},
|
||||||
|
{"id": 6, "subject": "Task 6: ApiKeysPage — DashboardTags in ConstraintText + create-form input", "status": "completed", "commits": ["c037d99", "fab600d"], "review": "Spec compliant; code review Approved after dedupe/help-text fix, re-review Approved"},
|
||||||
|
{"id": 7, "subject": "Task 7: Wnwrap alarm-probe retry — secured-write path (windev)", "status": "completed", "commits": ["90331b6", "540a118"], "review": "Approved after ack-comment fix; Q2 answered (@COUNT = records-in-reply, exact detection refuted), clear/re-raise GUID answered (new instance), ack leg re-blocked (accepted-but-inert)"},
|
||||||
|
{"id": 8, "subject": "Task 8: Windev full verification", "status": "completed", "verifiedAt": "90331b6", "result": "slnx 0W/0E; worker x86 523 pass + 1 pre-existing deterministic failure (reproduces on main); gateway 1151/1151 on rerun; live smoke 8/8; check-codegen 1-3 pass, Check 4 blocked by pre-existing Windows .exe pin bug (substance validated out-of-band); final comment-only tip re-check pending after bookkeeping", "residual": "pending-external: cheap windev tip re-build covering the comment/prose-only commits landed after 90331b6"},
|
||||||
|
{"id": 9, "subject": "Task 9: Bookkeeping — follow-ups closure + plan record", "status": "completed", "commits": ["a5f843c", "self (follow-up bookkeeping commit, immediately after a5f843c)"], "review": "None (trivial classification); a5f843c closes the prior plan's follow-up block, appends the as-built record, and corrects the CLAUDE.md apikey sample; the follow-up commit closes two adjacent stale scope lists (CLAUDE.md Authentication section, docs/Authentication.md ops.alice example) and records the regressed Server-012 resolution as a follow-up"}
|
||||||
|
],
|
||||||
|
"lastUpdated": "2026-08-18"
|
||||||
|
}
|
||||||
+16
-4
@@ -249,14 +249,26 @@ from broadcasting Clears for alarms it simply had no room to mention. That
|
|||||||
suppression is reported structurally rather than only in a rate-limited worker
|
suppression is reported structurally rather than only in a rate-limited worker
|
||||||
warning: the `QueryActiveAlarms` reply payload carries `snapshot_truncated`,
|
warning: the `QueryActiveAlarms` reply payload carries `snapshot_truncated`,
|
||||||
every `ActiveAlarmSnapshot` in it carries `from_truncated_snapshot`, and the
|
every `ActiveAlarmSnapshot` in it carries `from_truncated_snapshot`, and the
|
||||||
dashboard Alarms tab shows a warning banner while the flag is set. The flag
|
dashboard Alarms tab shows a warning banner while the flag is set. The live
|
||||||
|
`StreamAlarms` feed carries the same verdict at feed level as an
|
||||||
|
`AlarmSnapshotStatus` message (the `snapshot_status` oneof case), so a streaming
|
||||||
|
consumer learns it without polling `QueryActiveAlarms`. It is emitted on stream
|
||||||
|
open — after the `provider_status` frame and before the cached `active_alarm`
|
||||||
|
frames, so the caveat precedes the records it qualifies — and thereafter only on
|
||||||
|
a *change* of verdict (a status frame repeated every reconcile is one consumers
|
||||||
|
learn to ignore). The open-time frame is unconditional: an explicit
|
||||||
|
`truncated = false` is what separates a complete set from a gateway that never
|
||||||
|
sends the frame. A monitor restart drops the verdict with the cache generation it
|
||||||
|
describes, and because feed subscribers outlive the monitor's worker session that
|
||||||
|
drop is emitted as a clearing frame too. The flag
|
||||||
means "this active set may be incomplete", not "this record is unreliable" —
|
means "this active set may be incomplete", not "this record is unreliable" —
|
||||||
it is independent of the subtag-fallback `degraded` field above. It is not
|
it is independent of the subtag-fallback `degraded` field above. It is not
|
||||||
latched: the first fetch that comes back under the cap is complete, restores
|
latched: the first fetch that comes back under the cap is complete, restores
|
||||||
absence authority, and clears it. Detection remains the record-count heuristic;
|
absence authority, and clears it. Detection remains the record-count heuristic;
|
||||||
the reply's `ALARM_RECORDS/@COUNT` attribute would make the test exact only if
|
the reply's `ALARM_RECORDS/@COUNT` attribute would have made the test exact only
|
||||||
it reported the total active count rather than the records in the reply, which
|
if it reported the total active count, and the 2026-08-18 live probe observed it
|
||||||
a live probe could not discriminate (see `docs/AlarmProbeFindings.md`).
|
reporting the records in the reply instead (see `docs/AlarmProbeFindings.md`), so
|
||||||
|
there is no exact alternative.
|
||||||
|
|
||||||
Forced modes are available via `MxGateway:Alarms:Fallback:Mode`:
|
Forced modes are available via `MxGateway:Alarms:Fallback:Mode`:
|
||||||
`ForceAlarmManager` disables failover; `ForceSubtag` forces the standby
|
`ForceAlarmManager` disables failover; `ForceSubtag` forces the standby
|
||||||
|
|||||||
@@ -11,8 +11,11 @@
|
|||||||
# (which breaks the net48 worker build with CS0246 — see docs/Contracts.md).
|
# (which breaks the net48 worker build with CS0246 — see docs/Contracts.md).
|
||||||
# 3. The Rust crate's vendored protos (clients/rust/protos/*.proto — build inputs that make the
|
# 3. The Rust crate's vendored protos (clients/rust/protos/*.proto — build inputs that make the
|
||||||
# crate buildable outside the repo, CLI-02) are byte-identical to the canonical Contracts
|
# crate buildable outside the repo, CLI-02) are byte-identical to the canonical Contracts
|
||||||
# protos. A drift means a .proto was edited without refreshing the vendored copies, which would
|
# protos, and the two directories hold the same set of files. A drift means a .proto was edited
|
||||||
# publish a stale wire contract to crate consumers while the in-repo build stays correct.
|
# without refreshing the vendored copies, which would publish a stale wire contract to crate
|
||||||
|
# consumers while the in-repo build stays correct. The sweep runs both directions: a canonical
|
||||||
|
# proto with no vendored copy is just as broken (the published crate cannot build standalone),
|
||||||
|
# and it is invisible in-repo because build.rs prefers the canonical directory when it exists.
|
||||||
# 4. The committed Go and Python client bindings match a fresh regeneration (IPC-25). The two
|
# 4. The committed Go and Python client bindings match a fresh regeneration (IPC-25). The two
|
||||||
# per-client generate-proto.ps1 scripts pin their generators (protoc-gen-go v1.36.11 /
|
# per-client generate-proto.ps1 scripts pin their generators (protoc-gen-go v1.36.11 /
|
||||||
# protoc-gen-go-grpc v1.6.2 for Go; grpcio-tools 1.80.0 for Python), so a clean checkout
|
# protoc-gen-go-grpc v1.6.2 for Go; grpcio-tools 1.80.0 for Python), so a clean checkout
|
||||||
@@ -88,6 +91,16 @@ try {
|
|||||||
$failures.Add("Rust vendored proto drifted from canonical: clients/rust/protos/$($vendored.Name). Refresh it from src/ZB.MOM.WW.MxGateway.Contracts/Protos/$($vendored.Name).")
|
$failures.Add("Rust vendored proto drifted from canonical: clients/rust/protos/$($vendored.Name). Refresh it from src/ZB.MOM.WW.MxGateway.Contracts/Protos/$($vendored.Name).")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Reverse direction: a canonical proto that was never vendored passes the loop above (it only
|
||||||
|
# walks the vendored dir) but breaks a standalone crate build, because build.rs falls back to
|
||||||
|
# clients/rust/protos/ only outside the repo — in-repo it reads the canonical dir and stays green.
|
||||||
|
foreach ($canonicalProto in Get-ChildItem -Path $canonicalProtoDir -Filter '*.proto' -File) {
|
||||||
|
$vendoredCounterpart = Join-Path $vendoredProtoDir $canonicalProto.Name
|
||||||
|
if (-not (Test-Path $vendoredCounterpart)) {
|
||||||
|
$failures.Add("Canonical proto is not vendored for the Rust crate: $($canonicalProto.Name). Copy src/ZB.MOM.WW.MxGateway.Contracts/Protos/$($canonicalProto.Name) to clients/rust/protos/$($canonicalProto.Name) (and add it to build.rs's input list).")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
$failures.Add("Rust vendored proto check failed: $($_.Exception.Message)")
|
$failures.Add("Rust vendored proto check failed: $($_.Exception.Message)")
|
||||||
|
|||||||
@@ -361,173 +361,176 @@ namespace ZB.MOM.WW.MxGateway.Contracts.Proto {
|
|||||||
"cm94eRIaChJkaWFnbm9zdGljX21lc3NhZ2UYBiABKAlCCgoIX2hyZXN1bHRK",
|
"cm94eRIaChJkaWFnbm9zdGljX21lc3NhZ2UYBiABKAlCCgoIX2hyZXN1bHRK",
|
||||||
"BAgBEAJSCnNlc3Npb25faWQiUQoTU3RyZWFtQWxhcm1zUmVxdWVzdBIdChVj",
|
"BAgBEAJSCnNlc3Npb25faWQiUQoTU3RyZWFtQWxhcm1zUmVxdWVzdBIdChVj",
|
||||||
"bGllbnRfY29ycmVsYXRpb25faWQYASABKAkSGwoTYWxhcm1fZmlsdGVyX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
||||||
"TU9NLldXLk14R2F0ZXdheS5Db250cmFjdHMuUHJvdG9iBnByb3RvMw=="));
|
"QWN0aXZlQWxhcm1zEi0ubXhhY2Nlc3NfZ2F0ZXdheS52MS5RdWVyeUFjdGl2",
|
||||||
|
"ZUFsYXJtc1JlcXVlc3QaKC5teGFjY2Vzc19nYXRld2F5LnYxLkFjdGl2ZUFs",
|
||||||
|
"YXJtU25hcHNob3QwAUImqgIjWkIuTU9NLldXLk14R2F0ZXdheS5Db250cmFj",
|
||||||
|
"dHMuUHJvdG9iBnByb3RvMw=="));
|
||||||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
||||||
new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.DurationReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, },
|
new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.DurationReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, },
|
||||||
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxCommandKind), typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.AlarmProviderMode), typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxEventFamily), typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.AlarmTransitionKind), typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.AlarmConditionState), typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxStatusCategory), typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxStatusSource), typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxDataType), typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.ProtocolStatusCode), typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.SessionState), }, null, new pbr::GeneratedClrTypeInfo[] {
|
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxCommandKind), typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.AlarmProviderMode), typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxEventFamily), typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.AlarmTransitionKind), typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.AlarmConditionState), typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxStatusCategory), typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxStatusSource), typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxDataType), typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.ProtocolStatusCode), typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.SessionState), }, null, new pbr::GeneratedClrTypeInfo[] {
|
||||||
@@ -616,8 +619,9 @@ namespace ZB.MOM.WW.MxGateway.Contracts.Proto {
|
|||||||
new pbr::GeneratedClrTypeInfo(typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.AcknowledgeAlarmRequest), global::ZB.MOM.WW.MxGateway.Contracts.Proto.AcknowledgeAlarmRequest.Parser, new[]{ "ClientCorrelationId", "AlarmFullReference", "Comment", "OperatorUser" }, null, null, null, null),
|
new pbr::GeneratedClrTypeInfo(typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.AcknowledgeAlarmRequest), global::ZB.MOM.WW.MxGateway.Contracts.Proto.AcknowledgeAlarmRequest.Parser, new[]{ "ClientCorrelationId", "AlarmFullReference", "Comment", "OperatorUser" }, null, null, null, null),
|
||||||
new pbr::GeneratedClrTypeInfo(typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.AcknowledgeAlarmReply), global::ZB.MOM.WW.MxGateway.Contracts.Proto.AcknowledgeAlarmReply.Parser, new[]{ "CorrelationId", "ProtocolStatus", "Hresult", "Status", "DiagnosticMessage" }, new[]{ "Hresult" }, null, null, null),
|
new pbr::GeneratedClrTypeInfo(typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.AcknowledgeAlarmReply), global::ZB.MOM.WW.MxGateway.Contracts.Proto.AcknowledgeAlarmReply.Parser, new[]{ "CorrelationId", "ProtocolStatus", "Hresult", "Status", "DiagnosticMessage" }, new[]{ "Hresult" }, null, null, null),
|
||||||
new pbr::GeneratedClrTypeInfo(typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.StreamAlarmsRequest), global::ZB.MOM.WW.MxGateway.Contracts.Proto.StreamAlarmsRequest.Parser, new[]{ "ClientCorrelationId", "AlarmFilterPrefix" }, null, null, null, null),
|
new pbr::GeneratedClrTypeInfo(typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.StreamAlarmsRequest), global::ZB.MOM.WW.MxGateway.Contracts.Proto.StreamAlarmsRequest.Parser, new[]{ "ClientCorrelationId", "AlarmFilterPrefix" }, null, null, null, null),
|
||||||
new pbr::GeneratedClrTypeInfo(typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.AlarmFeedMessage), global::ZB.MOM.WW.MxGateway.Contracts.Proto.AlarmFeedMessage.Parser, new[]{ "ActiveAlarm", "SnapshotComplete", "Transition", "ProviderStatus" }, new[]{ "Payload" }, null, null, null),
|
new pbr::GeneratedClrTypeInfo(typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.AlarmFeedMessage), global::ZB.MOM.WW.MxGateway.Contracts.Proto.AlarmFeedMessage.Parser, new[]{ "ActiveAlarm", "SnapshotComplete", "Transition", "ProviderStatus", "SnapshotStatus" }, new[]{ "Payload" }, null, null, null),
|
||||||
new pbr::GeneratedClrTypeInfo(typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.AlarmProviderStatus), global::ZB.MOM.WW.MxGateway.Contracts.Proto.AlarmProviderStatus.Parser, new[]{ "Mode", "Degraded", "Reason", "Since" }, null, null, null, null),
|
new pbr::GeneratedClrTypeInfo(typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.AlarmProviderStatus), global::ZB.MOM.WW.MxGateway.Contracts.Proto.AlarmProviderStatus.Parser, new[]{ "Mode", "Degraded", "Reason", "Since" }, null, null, null, null),
|
||||||
|
new pbr::GeneratedClrTypeInfo(typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.AlarmSnapshotStatus), global::ZB.MOM.WW.MxGateway.Contracts.Proto.AlarmSnapshotStatus.Parser, new[]{ "Truncated" }, null, null, null, null),
|
||||||
new pbr::GeneratedClrTypeInfo(typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxStatusProxy), global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxStatusProxy.Parser, new[]{ "Success", "Category", "DetectedBy", "Detail", "RawCategory", "RawDetectedBy", "DiagnosticText" }, null, null, null, null),
|
new pbr::GeneratedClrTypeInfo(typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxStatusProxy), global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxStatusProxy.Parser, new[]{ "Success", "Category", "DetectedBy", "Detail", "RawCategory", "RawDetectedBy", "DiagnosticText" }, null, null, null, null),
|
||||||
new pbr::GeneratedClrTypeInfo(typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxValue), global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxValue.Parser, new[]{ "DataType", "VariantType", "IsNull", "RawDiagnostic", "RawDataType", "BoolValue", "Int32Value", "Int64Value", "FloatValue", "DoubleValue", "StringValue", "TimestampValue", "ArrayValue", "RawValue", "SparseArrayValue" }, new[]{ "Kind" }, null, null, null),
|
new pbr::GeneratedClrTypeInfo(typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxValue), global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxValue.Parser, new[]{ "DataType", "VariantType", "IsNull", "RawDiagnostic", "RawDataType", "BoolValue", "Int32Value", "Int64Value", "FloatValue", "DoubleValue", "StringValue", "TimestampValue", "ArrayValue", "RawValue", "SparseArrayValue" }, new[]{ "Kind" }, null, null, null),
|
||||||
new pbr::GeneratedClrTypeInfo(typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxArray), global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxArray.Parser, new[]{ "ElementDataType", "VariantType", "Dimensions", "RawDiagnostic", "RawElementDataType", "BoolValues", "Int32Values", "Int64Values", "FloatValues", "DoubleValues", "StringValues", "TimestampValues", "RawValues" }, new[]{ "Values" }, null, null, null),
|
new pbr::GeneratedClrTypeInfo(typeof(global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxArray), global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxArray.Parser, new[]{ "ElementDataType", "VariantType", "Dimensions", "RawDiagnostic", "RawElementDataType", "BoolValues", "Int32Values", "Int64Values", "FloatValues", "DoubleValues", "StringValues", "TimestampValues", "RawValues" }, new[]{ "Values" }, null, null, null),
|
||||||
@@ -28509,9 +28513,13 @@ namespace ZB.MOM.WW.MxGateway.Contracts.Proto {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// One message on the StreamAlarms feed. The stream opens with one
|
/// One message on the StreamAlarms feed. The stream opens with a
|
||||||
/// `active_alarm` per currently-active alarm, then a single
|
/// `provider_status` (the current provider mode), then a `snapshot_status`
|
||||||
/// `snapshot_complete`, then a `transition` for every subsequent change.
|
/// (whether the cached active set may be incomplete), then one `active_alarm`
|
||||||
|
/// per currently-active alarm, then a single `snapshot_complete`. After that
|
||||||
|
/// come the live frames: a `transition` for every subsequent alarm change,
|
||||||
|
/// interleaved with a further `provider_status` on each failover/failback and a
|
||||||
|
/// further `snapshot_status` on each change of the truncation verdict.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
||||||
public sealed partial class AlarmFeedMessage : pb::IMessage<AlarmFeedMessage>
|
public sealed partial class AlarmFeedMessage : pb::IMessage<AlarmFeedMessage>
|
||||||
@@ -28561,6 +28569,9 @@ namespace ZB.MOM.WW.MxGateway.Contracts.Proto {
|
|||||||
case PayloadOneofCase.ProviderStatus:
|
case PayloadOneofCase.ProviderStatus:
|
||||||
ProviderStatus = other.ProviderStatus.Clone();
|
ProviderStatus = other.ProviderStatus.Clone();
|
||||||
break;
|
break;
|
||||||
|
case PayloadOneofCase.SnapshotStatus:
|
||||||
|
SnapshotStatus = other.SnapshotStatus.Clone();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||||
@@ -28648,6 +28659,23 @@ namespace ZB.MOM.WW.MxGateway.Contracts.Proto {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>Field number for the "snapshot_status" field.</summary>
|
||||||
|
public const int SnapshotStatusFieldNumber = 5;
|
||||||
|
/// <summary>
|
||||||
|
/// Snapshot-completeness status. Emitted once on stream open and again on
|
||||||
|
/// every change of the truncation verdict, so late joiners learn whether the
|
||||||
|
/// feed's active-alarm set may be incomplete.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
public global::ZB.MOM.WW.MxGateway.Contracts.Proto.AlarmSnapshotStatus SnapshotStatus {
|
||||||
|
get { return payloadCase_ == PayloadOneofCase.SnapshotStatus ? (global::ZB.MOM.WW.MxGateway.Contracts.Proto.AlarmSnapshotStatus) payload_ : null; }
|
||||||
|
set {
|
||||||
|
payload_ = value;
|
||||||
|
payloadCase_ = value == null ? PayloadOneofCase.None : PayloadOneofCase.SnapshotStatus;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private object payload_;
|
private object payload_;
|
||||||
/// <summary>Enum of possible cases for the "payload" oneof.</summary>
|
/// <summary>Enum of possible cases for the "payload" oneof.</summary>
|
||||||
public enum PayloadOneofCase {
|
public enum PayloadOneofCase {
|
||||||
@@ -28656,6 +28684,7 @@ namespace ZB.MOM.WW.MxGateway.Contracts.Proto {
|
|||||||
SnapshotComplete = 2,
|
SnapshotComplete = 2,
|
||||||
Transition = 3,
|
Transition = 3,
|
||||||
ProviderStatus = 4,
|
ProviderStatus = 4,
|
||||||
|
SnapshotStatus = 5,
|
||||||
}
|
}
|
||||||
private PayloadOneofCase payloadCase_ = PayloadOneofCase.None;
|
private PayloadOneofCase payloadCase_ = PayloadOneofCase.None;
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
@@ -28690,6 +28719,7 @@ namespace ZB.MOM.WW.MxGateway.Contracts.Proto {
|
|||||||
if (SnapshotComplete != other.SnapshotComplete) return false;
|
if (SnapshotComplete != other.SnapshotComplete) return false;
|
||||||
if (!object.Equals(Transition, other.Transition)) return false;
|
if (!object.Equals(Transition, other.Transition)) return false;
|
||||||
if (!object.Equals(ProviderStatus, other.ProviderStatus)) return false;
|
if (!object.Equals(ProviderStatus, other.ProviderStatus)) return false;
|
||||||
|
if (!object.Equals(SnapshotStatus, other.SnapshotStatus)) return false;
|
||||||
if (PayloadCase != other.PayloadCase) return false;
|
if (PayloadCase != other.PayloadCase) return false;
|
||||||
return Equals(_unknownFields, other._unknownFields);
|
return Equals(_unknownFields, other._unknownFields);
|
||||||
}
|
}
|
||||||
@@ -28702,6 +28732,7 @@ namespace ZB.MOM.WW.MxGateway.Contracts.Proto {
|
|||||||
if (HasSnapshotComplete) hash ^= SnapshotComplete.GetHashCode();
|
if (HasSnapshotComplete) hash ^= SnapshotComplete.GetHashCode();
|
||||||
if (payloadCase_ == PayloadOneofCase.Transition) hash ^= Transition.GetHashCode();
|
if (payloadCase_ == PayloadOneofCase.Transition) hash ^= Transition.GetHashCode();
|
||||||
if (payloadCase_ == PayloadOneofCase.ProviderStatus) hash ^= ProviderStatus.GetHashCode();
|
if (payloadCase_ == PayloadOneofCase.ProviderStatus) hash ^= ProviderStatus.GetHashCode();
|
||||||
|
if (payloadCase_ == PayloadOneofCase.SnapshotStatus) hash ^= SnapshotStatus.GetHashCode();
|
||||||
hash ^= (int) payloadCase_;
|
hash ^= (int) payloadCase_;
|
||||||
if (_unknownFields != null) {
|
if (_unknownFields != null) {
|
||||||
hash ^= _unknownFields.GetHashCode();
|
hash ^= _unknownFields.GetHashCode();
|
||||||
@@ -28737,6 +28768,10 @@ namespace ZB.MOM.WW.MxGateway.Contracts.Proto {
|
|||||||
output.WriteRawTag(34);
|
output.WriteRawTag(34);
|
||||||
output.WriteMessage(ProviderStatus);
|
output.WriteMessage(ProviderStatus);
|
||||||
}
|
}
|
||||||
|
if (payloadCase_ == PayloadOneofCase.SnapshotStatus) {
|
||||||
|
output.WriteRawTag(42);
|
||||||
|
output.WriteMessage(SnapshotStatus);
|
||||||
|
}
|
||||||
if (_unknownFields != null) {
|
if (_unknownFields != null) {
|
||||||
_unknownFields.WriteTo(output);
|
_unknownFields.WriteTo(output);
|
||||||
}
|
}
|
||||||
@@ -28763,6 +28798,10 @@ namespace ZB.MOM.WW.MxGateway.Contracts.Proto {
|
|||||||
output.WriteRawTag(34);
|
output.WriteRawTag(34);
|
||||||
output.WriteMessage(ProviderStatus);
|
output.WriteMessage(ProviderStatus);
|
||||||
}
|
}
|
||||||
|
if (payloadCase_ == PayloadOneofCase.SnapshotStatus) {
|
||||||
|
output.WriteRawTag(42);
|
||||||
|
output.WriteMessage(SnapshotStatus);
|
||||||
|
}
|
||||||
if (_unknownFields != null) {
|
if (_unknownFields != null) {
|
||||||
_unknownFields.WriteTo(ref output);
|
_unknownFields.WriteTo(ref output);
|
||||||
}
|
}
|
||||||
@@ -28785,6 +28824,9 @@ namespace ZB.MOM.WW.MxGateway.Contracts.Proto {
|
|||||||
if (payloadCase_ == PayloadOneofCase.ProviderStatus) {
|
if (payloadCase_ == PayloadOneofCase.ProviderStatus) {
|
||||||
size += 1 + pb::CodedOutputStream.ComputeMessageSize(ProviderStatus);
|
size += 1 + pb::CodedOutputStream.ComputeMessageSize(ProviderStatus);
|
||||||
}
|
}
|
||||||
|
if (payloadCase_ == PayloadOneofCase.SnapshotStatus) {
|
||||||
|
size += 1 + pb::CodedOutputStream.ComputeMessageSize(SnapshotStatus);
|
||||||
|
}
|
||||||
if (_unknownFields != null) {
|
if (_unknownFields != null) {
|
||||||
size += _unknownFields.CalculateSize();
|
size += _unknownFields.CalculateSize();
|
||||||
}
|
}
|
||||||
@@ -28819,6 +28861,12 @@ namespace ZB.MOM.WW.MxGateway.Contracts.Proto {
|
|||||||
}
|
}
|
||||||
ProviderStatus.MergeFrom(other.ProviderStatus);
|
ProviderStatus.MergeFrom(other.ProviderStatus);
|
||||||
break;
|
break;
|
||||||
|
case PayloadOneofCase.SnapshotStatus:
|
||||||
|
if (SnapshotStatus == null) {
|
||||||
|
SnapshotStatus = new global::ZB.MOM.WW.MxGateway.Contracts.Proto.AlarmSnapshotStatus();
|
||||||
|
}
|
||||||
|
SnapshotStatus.MergeFrom(other.SnapshotStatus);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||||
@@ -28871,6 +28919,15 @@ namespace ZB.MOM.WW.MxGateway.Contracts.Proto {
|
|||||||
ProviderStatus = subBuilder;
|
ProviderStatus = subBuilder;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 42: {
|
||||||
|
global::ZB.MOM.WW.MxGateway.Contracts.Proto.AlarmSnapshotStatus subBuilder = new global::ZB.MOM.WW.MxGateway.Contracts.Proto.AlarmSnapshotStatus();
|
||||||
|
if (payloadCase_ == PayloadOneofCase.SnapshotStatus) {
|
||||||
|
subBuilder.MergeFrom(SnapshotStatus);
|
||||||
|
}
|
||||||
|
input.ReadMessage(subBuilder);
|
||||||
|
SnapshotStatus = subBuilder;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -28921,6 +28978,15 @@ namespace ZB.MOM.WW.MxGateway.Contracts.Proto {
|
|||||||
ProviderStatus = subBuilder;
|
ProviderStatus = subBuilder;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 42: {
|
||||||
|
global::ZB.MOM.WW.MxGateway.Contracts.Proto.AlarmSnapshotStatus subBuilder = new global::ZB.MOM.WW.MxGateway.Contracts.Proto.AlarmSnapshotStatus();
|
||||||
|
if (payloadCase_ == PayloadOneofCase.SnapshotStatus) {
|
||||||
|
subBuilder.MergeFrom(SnapshotStatus);
|
||||||
|
}
|
||||||
|
input.ReadMessage(subBuilder);
|
||||||
|
SnapshotStatus = subBuilder;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -29252,6 +29318,221 @@ namespace ZB.MOM.WW.MxGateway.Contracts.Proto {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Feed-level snapshot-completeness status. Emitted once on StreamAlarms open
|
||||||
|
/// (after the initial provider_status frame, before the cached active_alarm
|
||||||
|
/// frames) so late joiners learn the current verdict, and again on every change
|
||||||
|
/// of the truncation verdict — when a reconcile reports a different verdict, and
|
||||||
|
/// when the gateway's alarm monitor restarts and drops a truncated verdict with
|
||||||
|
/// the cache generation it described (feed subscribers outlive that monitor
|
||||||
|
/// session, so they are sent the clearing frame). Mirrors the per-record
|
||||||
|
/// ActiveAlarmSnapshot.from_truncated_snapshot caveat at feed level so live
|
||||||
|
/// consumers can reason about completeness without polling QueryActiveAlarms.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
||||||
|
public sealed partial class AlarmSnapshotStatus : pb::IMessage<AlarmSnapshotStatus>
|
||||||
|
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||||
|
, pb::IBufferMessage
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
private static readonly pb::MessageParser<AlarmSnapshotStatus> _parser = new pb::MessageParser<AlarmSnapshotStatus>(() => new AlarmSnapshotStatus());
|
||||||
|
private pb::UnknownFieldSet _unknownFields;
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
public static pb::MessageParser<AlarmSnapshotStatus> Parser { get { return _parser; } }
|
||||||
|
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
public static pbr::MessageDescriptor Descriptor {
|
||||||
|
get { return global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxaccessGatewayReflection.Descriptor.MessageTypes[87]; }
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
pbr::MessageDescriptor pb::IMessage.Descriptor {
|
||||||
|
get { return Descriptor; }
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
public AlarmSnapshotStatus() {
|
||||||
|
OnConstruction();
|
||||||
|
}
|
||||||
|
|
||||||
|
partial void OnConstruction();
|
||||||
|
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
public AlarmSnapshotStatus(AlarmSnapshotStatus other) : this() {
|
||||||
|
truncated_ = other.truncated_;
|
||||||
|
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
public AlarmSnapshotStatus Clone() {
|
||||||
|
return new AlarmSnapshotStatus(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Field number for the "truncated" field.</summary>
|
||||||
|
public const int TruncatedFieldNumber = 1;
|
||||||
|
private bool truncated_;
|
||||||
|
/// <summary>
|
||||||
|
/// True while the monitor's cached active-alarm set derives from a truncated
|
||||||
|
/// (capped) worker fetch — the set may be missing alarms. Distinct from
|
||||||
|
/// provider degradation (AlarmProviderStatus.degraded), which describes the
|
||||||
|
/// fidelity of the records rather than the completeness of the set.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
public bool Truncated {
|
||||||
|
get { return truncated_; }
|
||||||
|
set {
|
||||||
|
truncated_ = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
public override bool Equals(object other) {
|
||||||
|
return Equals(other as AlarmSnapshotStatus);
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
public bool Equals(AlarmSnapshotStatus other) {
|
||||||
|
if (ReferenceEquals(other, null)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (ReferenceEquals(other, this)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (Truncated != other.Truncated) return false;
|
||||||
|
return Equals(_unknownFields, other._unknownFields);
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
public override int GetHashCode() {
|
||||||
|
int hash = 1;
|
||||||
|
if (Truncated != false) hash ^= Truncated.GetHashCode();
|
||||||
|
if (_unknownFields != null) {
|
||||||
|
hash ^= _unknownFields.GetHashCode();
|
||||||
|
}
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
public override string ToString() {
|
||||||
|
return pb::JsonFormatter.ToDiagnosticString(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
public void WriteTo(pb::CodedOutputStream output) {
|
||||||
|
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||||
|
output.WriteRawMessage(this);
|
||||||
|
#else
|
||||||
|
if (Truncated != false) {
|
||||||
|
output.WriteRawTag(8);
|
||||||
|
output.WriteBool(Truncated);
|
||||||
|
}
|
||||||
|
if (_unknownFields != null) {
|
||||||
|
_unknownFields.WriteTo(output);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
|
||||||
|
if (Truncated != false) {
|
||||||
|
output.WriteRawTag(8);
|
||||||
|
output.WriteBool(Truncated);
|
||||||
|
}
|
||||||
|
if (_unknownFields != null) {
|
||||||
|
_unknownFields.WriteTo(ref output);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
public int CalculateSize() {
|
||||||
|
int size = 0;
|
||||||
|
if (Truncated != false) {
|
||||||
|
size += 1 + 1;
|
||||||
|
}
|
||||||
|
if (_unknownFields != null) {
|
||||||
|
size += _unknownFields.CalculateSize();
|
||||||
|
}
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
public void MergeFrom(AlarmSnapshotStatus other) {
|
||||||
|
if (other == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (other.Truncated != false) {
|
||||||
|
Truncated = other.Truncated;
|
||||||
|
}
|
||||||
|
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
public void MergeFrom(pb::CodedInputStream input) {
|
||||||
|
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||||
|
input.ReadRawMessage(this);
|
||||||
|
#else
|
||||||
|
uint tag;
|
||||||
|
while ((tag = input.ReadTag()) != 0) {
|
||||||
|
if ((tag & 7) == 4) {
|
||||||
|
// Abort on any end group tag.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
switch(tag) {
|
||||||
|
default:
|
||||||
|
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
|
||||||
|
break;
|
||||||
|
case 8: {
|
||||||
|
Truncated = input.ReadBool();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
|
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
|
||||||
|
uint tag;
|
||||||
|
while ((tag = input.ReadTag()) != 0) {
|
||||||
|
if ((tag & 7) == 4) {
|
||||||
|
// Abort on any end group tag.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
switch(tag) {
|
||||||
|
default:
|
||||||
|
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
|
||||||
|
break;
|
||||||
|
case 8: {
|
||||||
|
Truncated = input.ReadBool();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
||||||
public sealed partial class MxStatusProxy : pb::IMessage<MxStatusProxy>
|
public sealed partial class MxStatusProxy : pb::IMessage<MxStatusProxy>
|
||||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||||
@@ -29267,7 +29548,7 @@ namespace ZB.MOM.WW.MxGateway.Contracts.Proto {
|
|||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
public static pbr::MessageDescriptor Descriptor {
|
public static pbr::MessageDescriptor Descriptor {
|
||||||
get { return global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxaccessGatewayReflection.Descriptor.MessageTypes[87]; }
|
get { return global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxaccessGatewayReflection.Descriptor.MessageTypes[88]; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
@@ -29698,7 +29979,7 @@ namespace ZB.MOM.WW.MxGateway.Contracts.Proto {
|
|||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
public static pbr::MessageDescriptor Descriptor {
|
public static pbr::MessageDescriptor Descriptor {
|
||||||
get { return global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxaccessGatewayReflection.Descriptor.MessageTypes[88]; }
|
get { return global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxaccessGatewayReflection.Descriptor.MessageTypes[89]; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
@@ -30608,7 +30889,7 @@ namespace ZB.MOM.WW.MxGateway.Contracts.Proto {
|
|||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
public static pbr::MessageDescriptor Descriptor {
|
public static pbr::MessageDescriptor Descriptor {
|
||||||
get { return global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxaccessGatewayReflection.Descriptor.MessageTypes[89]; }
|
get { return global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxaccessGatewayReflection.Descriptor.MessageTypes[90]; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
@@ -31402,7 +31683,7 @@ namespace ZB.MOM.WW.MxGateway.Contracts.Proto {
|
|||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
public static pbr::MessageDescriptor Descriptor {
|
public static pbr::MessageDescriptor Descriptor {
|
||||||
get { return global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxaccessGatewayReflection.Descriptor.MessageTypes[90]; }
|
get { return global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxaccessGatewayReflection.Descriptor.MessageTypes[91]; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
@@ -31663,7 +31944,7 @@ namespace ZB.MOM.WW.MxGateway.Contracts.Proto {
|
|||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
public static pbr::MessageDescriptor Descriptor {
|
public static pbr::MessageDescriptor Descriptor {
|
||||||
get { return global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxaccessGatewayReflection.Descriptor.MessageTypes[91]; }
|
get { return global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxaccessGatewayReflection.Descriptor.MessageTypes[92]; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
@@ -31910,7 +32191,7 @@ namespace ZB.MOM.WW.MxGateway.Contracts.Proto {
|
|||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
public static pbr::MessageDescriptor Descriptor {
|
public static pbr::MessageDescriptor Descriptor {
|
||||||
get { return global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxaccessGatewayReflection.Descriptor.MessageTypes[92]; }
|
get { return global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxaccessGatewayReflection.Descriptor.MessageTypes[93]; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
@@ -32099,7 +32380,7 @@ namespace ZB.MOM.WW.MxGateway.Contracts.Proto {
|
|||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
public static pbr::MessageDescriptor Descriptor {
|
public static pbr::MessageDescriptor Descriptor {
|
||||||
get { return global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxaccessGatewayReflection.Descriptor.MessageTypes[93]; }
|
get { return global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxaccessGatewayReflection.Descriptor.MessageTypes[94]; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
@@ -32288,7 +32569,7 @@ namespace ZB.MOM.WW.MxGateway.Contracts.Proto {
|
|||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
public static pbr::MessageDescriptor Descriptor {
|
public static pbr::MessageDescriptor Descriptor {
|
||||||
get { return global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxaccessGatewayReflection.Descriptor.MessageTypes[94]; }
|
get { return global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxaccessGatewayReflection.Descriptor.MessageTypes[95]; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
@@ -32477,7 +32758,7 @@ namespace ZB.MOM.WW.MxGateway.Contracts.Proto {
|
|||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
public static pbr::MessageDescriptor Descriptor {
|
public static pbr::MessageDescriptor Descriptor {
|
||||||
get { return global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxaccessGatewayReflection.Descriptor.MessageTypes[95]; }
|
get { return global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxaccessGatewayReflection.Descriptor.MessageTypes[96]; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
@@ -32666,7 +32947,7 @@ namespace ZB.MOM.WW.MxGateway.Contracts.Proto {
|
|||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
public static pbr::MessageDescriptor Descriptor {
|
public static pbr::MessageDescriptor Descriptor {
|
||||||
get { return global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxaccessGatewayReflection.Descriptor.MessageTypes[96]; }
|
get { return global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxaccessGatewayReflection.Descriptor.MessageTypes[97]; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
@@ -32855,7 +33136,7 @@ namespace ZB.MOM.WW.MxGateway.Contracts.Proto {
|
|||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
public static pbr::MessageDescriptor Descriptor {
|
public static pbr::MessageDescriptor Descriptor {
|
||||||
get { return global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxaccessGatewayReflection.Descriptor.MessageTypes[97]; }
|
get { return global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxaccessGatewayReflection.Descriptor.MessageTypes[98]; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
@@ -33042,7 +33323,7 @@ namespace ZB.MOM.WW.MxGateway.Contracts.Proto {
|
|||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
public static pbr::MessageDescriptor Descriptor {
|
public static pbr::MessageDescriptor Descriptor {
|
||||||
get { return global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxaccessGatewayReflection.Descriptor.MessageTypes[98]; }
|
get { return global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxaccessGatewayReflection.Descriptor.MessageTypes[99]; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
@@ -33229,7 +33510,7 @@ namespace ZB.MOM.WW.MxGateway.Contracts.Proto {
|
|||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
public static pbr::MessageDescriptor Descriptor {
|
public static pbr::MessageDescriptor Descriptor {
|
||||||
get { return global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxaccessGatewayReflection.Descriptor.MessageTypes[99]; }
|
get { return global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxaccessGatewayReflection.Descriptor.MessageTypes[100]; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
@@ -33416,7 +33697,7 @@ namespace ZB.MOM.WW.MxGateway.Contracts.Proto {
|
|||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||||
public static pbr::MessageDescriptor Descriptor {
|
public static pbr::MessageDescriptor Descriptor {
|
||||||
get { return global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxaccessGatewayReflection.Descriptor.MessageTypes[100]; }
|
get { return global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxaccessGatewayReflection.Descriptor.MessageTypes[101]; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||||
|
|||||||
@@ -1003,9 +1003,13 @@ message StreamAlarmsRequest {
|
|||||||
string alarm_filter_prefix = 2;
|
string alarm_filter_prefix = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// One message on the StreamAlarms feed. The stream opens with one
|
// One message on the StreamAlarms feed. The stream opens with a
|
||||||
// `active_alarm` per currently-active alarm, then a single
|
// `provider_status` (the current provider mode), then a `snapshot_status`
|
||||||
// `snapshot_complete`, then a `transition` for every subsequent change.
|
// (whether the cached active set may be incomplete), then one `active_alarm`
|
||||||
|
// per currently-active alarm, then a single `snapshot_complete`. After that
|
||||||
|
// come the live frames: a `transition` for every subsequent alarm change,
|
||||||
|
// interleaved with a further `provider_status` on each failover/failback and a
|
||||||
|
// further `snapshot_status` on each change of the truncation verdict.
|
||||||
message AlarmFeedMessage {
|
message AlarmFeedMessage {
|
||||||
oneof payload {
|
oneof payload {
|
||||||
// Part of the initial active-alarm snapshot (ConditionRefresh).
|
// Part of the initial active-alarm snapshot (ConditionRefresh).
|
||||||
@@ -1018,6 +1022,10 @@ message AlarmFeedMessage {
|
|||||||
// Provider-mode status. Emitted once on stream open and again on every
|
// Provider-mode status. Emitted once on stream open and again on every
|
||||||
// failover/failback so late joiners learn the current mode immediately.
|
// failover/failback so late joiners learn the current mode immediately.
|
||||||
AlarmProviderStatus provider_status = 4;
|
AlarmProviderStatus provider_status = 4;
|
||||||
|
// Snapshot-completeness status. Emitted once on stream open and again on
|
||||||
|
// every change of the truncation verdict, so late joiners learn whether the
|
||||||
|
// feed's active-alarm set may be incomplete.
|
||||||
|
AlarmSnapshotStatus snapshot_status = 5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1028,6 +1036,23 @@ message AlarmProviderStatus {
|
|||||||
google.protobuf.Timestamp since = 4;
|
google.protobuf.Timestamp since = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Feed-level snapshot-completeness status. Emitted once on StreamAlarms open
|
||||||
|
// (after the initial provider_status frame, before the cached active_alarm
|
||||||
|
// frames) so late joiners learn the current verdict, and again on every change
|
||||||
|
// of the truncation verdict — when a reconcile reports a different verdict, and
|
||||||
|
// when the gateway's alarm monitor restarts and drops a truncated verdict with
|
||||||
|
// the cache generation it described (feed subscribers outlive that monitor
|
||||||
|
// session, so they are sent the clearing frame). Mirrors the per-record
|
||||||
|
// ActiveAlarmSnapshot.from_truncated_snapshot caveat at feed level so live
|
||||||
|
// consumers can reason about completeness without polling QueryActiveAlarms.
|
||||||
|
message AlarmSnapshotStatus {
|
||||||
|
// True while the monitor's cached active-alarm set derives from a truncated
|
||||||
|
// (capped) worker fetch — the set may be missing alarms. Distinct from
|
||||||
|
// provider degradation (AlarmProviderStatus.degraded), which describes the
|
||||||
|
// fidelity of the records rather than the completeness of the set.
|
||||||
|
bool truncated = 1;
|
||||||
|
}
|
||||||
|
|
||||||
message MxStatusProxy {
|
message MxStatusProxy {
|
||||||
// Mirrors the `success` member of the MXAccess MXSTATUS_PROXY struct
|
// Mirrors the `success` member of the MXAccess MXSTATUS_PROXY struct
|
||||||
// (a 16-bit signed value in the COM struct, widened to int32 on the
|
// (a 16-bit signed value in the COM struct, widened to int32 on the
|
||||||
|
|||||||
@@ -624,11 +624,13 @@ public sealed class GatewayAlarmMonitor : BackgroundService, IGatewayAlarmServic
|
|||||||
// at-least-once: consumers must still treat alarm state idempotently — apply a transition as
|
// at-least-once: consumers must still treat alarm state idempotently — apply a transition as
|
||||||
// "set the alarm to this state", never as an increment or a toggle.
|
// "set the alarm to this state", never as an increment or a toggle.
|
||||||
//
|
//
|
||||||
// Truncation (`snapshotTruncated`) needs no special handling here, and that is worth saying
|
// Truncation (`snapshotTruncated`) needs no per-alarm handling here, and that is worth saying
|
||||||
// because the obvious worry — a capped fetch reading as a wave of Clears — is answered one
|
// because the obvious worry — a capped fetch reading as a wave of Clears — is answered one
|
||||||
// level down. The worker merges rather than replaces its retained snapshot on a capped fetch,
|
// level down. The worker merges rather than replaces its retained snapshot on a capped fetch,
|
||||||
// so the set arriving here still carries the alarms the capped reply had no room to mention.
|
// so the set arriving here still carries the alarms the capped reply had no room to mention.
|
||||||
// The flag is therefore only recorded, for the operator-facing completeness caveat.
|
// The flag is set-level status, not a delta: it is recorded, and a CHANGE of verdict is pushed
|
||||||
|
// to the feed as a snapshot_status frame (SetSnapshotTruncated) so live consumers learn the
|
||||||
|
// completeness caveat without polling QueryActiveAlarms.
|
||||||
private void ApplyReconcile(IEnumerable<ActiveAlarmSnapshot> snapshots, bool snapshotTruncated)
|
private void ApplyReconcile(IEnumerable<ActiveAlarmSnapshot> snapshots, bool snapshotTruncated)
|
||||||
{
|
{
|
||||||
Dictionary<string, ActiveAlarmSnapshot> next = new(StringComparer.Ordinal);
|
Dictionary<string, ActiveAlarmSnapshot> next = new(StringComparer.Ordinal);
|
||||||
@@ -688,11 +690,30 @@ public sealed class GatewayAlarmMonitor : BackgroundService, IGatewayAlarmServic
|
|||||||
_alarms[incoming.Key] = incoming.Value;
|
_alarms[incoming.Key] = incoming.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
_snapshotTruncated = snapshotTruncated;
|
SetSnapshotTruncated(snapshotTruncated);
|
||||||
_currentAlarmsProjection = null;
|
_currentAlarmsProjection = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Caller holds _sync. Records the truncation verdict and, on a CHANGE of verdict, pushes the
|
||||||
|
// feed-level snapshot_status frame. Edge-triggered rather than per-reconcile: a status frame
|
||||||
|
// repeated every reconcile interval is one consumers learn to ignore. The verdict describes the
|
||||||
|
// whole cached set, not one alarm, so — like provider status — it goes to every subscriber
|
||||||
|
// regardless of alarm-filter prefix.
|
||||||
|
private void SetSnapshotTruncated(bool truncated)
|
||||||
|
{
|
||||||
|
if (_snapshotTruncated == truncated)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_snapshotTruncated = truncated;
|
||||||
|
BroadcastToAll(new AlarmFeedMessage
|
||||||
|
{
|
||||||
|
SnapshotStatus = new AlarmSnapshotStatus { Truncated = truncated },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Caller holds _sync. Pushes a feed message to every matching subscriber;
|
// Caller holds _sync. Pushes a feed message to every matching subscriber;
|
||||||
// a subscriber that has fallen behind is completed with an error and dropped.
|
// a subscriber that has fallen behind is completed with an error and dropped.
|
||||||
private void Broadcast(AlarmFeedMessage message, string reference)
|
private void Broadcast(AlarmFeedMessage message, string reference)
|
||||||
@@ -738,8 +759,10 @@ public sealed class GatewayAlarmMonitor : BackgroundService, IGatewayAlarmServic
|
|||||||
_alarms.Clear();
|
_alarms.Clear();
|
||||||
// The truncation verdict describes the cache generation being discarded, so it goes
|
// The truncation verdict describes the cache generation being discarded, so it goes
|
||||||
// with it. Carrying it across a monitor restart would caveat an empty set as "may be
|
// with it. Carrying it across a monitor restart would caveat an empty set as "may be
|
||||||
// incomplete" on evidence from a session that no longer exists.
|
// incomplete" on evidence from a session that no longer exists. Dropping a truncated
|
||||||
_snapshotTruncated = false;
|
// verdict IS a completeness change, and feed subscribers outlive the monitor's worker
|
||||||
|
// session, so this routes through the edge path and they see the clearing frame.
|
||||||
|
SetSnapshotTruncated(false);
|
||||||
_currentAlarmsProjection = null;
|
_currentAlarmsProjection = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -761,13 +784,16 @@ public sealed class GatewayAlarmMonitor : BackgroundService, IGatewayAlarmServic
|
|||||||
|
|
||||||
ActiveAlarmSnapshot[] snapshot;
|
ActiveAlarmSnapshot[] snapshot;
|
||||||
AlarmProviderStatus providerStatus;
|
AlarmProviderStatus providerStatus;
|
||||||
|
bool snapshotTruncated;
|
||||||
lock (_sync)
|
lock (_sync)
|
||||||
{
|
{
|
||||||
// Register before snapshotting under the same lock so neither a
|
// Register before snapshotting under the same lock so neither a
|
||||||
// transition nor a provider-mode change can slip between the snapshot
|
// transition nor a provider-mode change can slip between the snapshot
|
||||||
// and the live stream.
|
// and the live stream. The truncation verdict is read here too, so the
|
||||||
|
// caveat and the set it qualifies are a consistent pair.
|
||||||
_subscribers.Add(subscriber);
|
_subscribers.Add(subscriber);
|
||||||
providerStatus = BuildProviderStatus();
|
providerStatus = BuildProviderStatus();
|
||||||
|
snapshotTruncated = _snapshotTruncated;
|
||||||
snapshot = _alarms.Values
|
snapshot = _alarms.Values
|
||||||
.Where(alarm => prefix.Length == 0
|
.Where(alarm => prefix.Length == 0
|
||||||
|| alarm.AlarmFullReference.StartsWith(prefix, StringComparison.Ordinal))
|
|| alarm.AlarmFullReference.StartsWith(prefix, StringComparison.Ordinal))
|
||||||
@@ -781,6 +807,15 @@ public sealed class GatewayAlarmMonitor : BackgroundService, IGatewayAlarmServic
|
|||||||
// learns the mode (and whether the feed is degraded) before any alarms.
|
// learns the mode (and whether the feed is degraded) before any alarms.
|
||||||
yield return new AlarmFeedMessage { ProviderStatus = providerStatus };
|
yield return new AlarmFeedMessage { ProviderStatus = providerStatus };
|
||||||
|
|
||||||
|
// Then the completeness caveat, BEFORE the cached snapshot it qualifies: a consumer
|
||||||
|
// applying the snapshot as it streams needs to know whether the set may be missing
|
||||||
|
// alarms while it applies it, not after. Unconditional — an explicit false is what
|
||||||
|
// separates "the set is complete" from "this gateway never sends the frame".
|
||||||
|
yield return new AlarmFeedMessage
|
||||||
|
{
|
||||||
|
SnapshotStatus = new AlarmSnapshotStatus { Truncated = snapshotTruncated },
|
||||||
|
};
|
||||||
|
|
||||||
foreach (ActiveAlarmSnapshot alarm in snapshot)
|
foreach (ActiveAlarmSnapshot alarm in snapshot)
|
||||||
{
|
{
|
||||||
yield return new AlarmFeedMessage { ActiveAlarm = alarm };
|
yield return new AlarmFeedMessage { ActiveAlarm = alarm };
|
||||||
|
|||||||
@@ -55,14 +55,25 @@ public interface IGatewayAlarmService
|
|||||||
/// the intended granularity for a completeness hint; pairing them exactly
|
/// the intended granularity for a completeness hint; pairing them exactly
|
||||||
/// would need a combined accessor this seam deliberately does not have.
|
/// would need a combined accessor this seam deliberately does not have.
|
||||||
/// </para>
|
/// </para>
|
||||||
|
/// <para>
|
||||||
|
/// This is the polled read of the verdict. The same verdict is pushed to
|
||||||
|
/// the live feed as the <c>snapshot_status</c>
|
||||||
|
/// (<c>AlarmSnapshotStatus</c>) case of <see cref="AlarmFeedMessage"/> —
|
||||||
|
/// once at <see cref="StreamAsync"/> open and again on every change — so
|
||||||
|
/// a streaming consumer need not poll this property.
|
||||||
|
/// </para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool SnapshotTruncated { get; }
|
bool SnapshotTruncated { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Attaches to the central alarm feed. The returned stream yields one
|
/// Attaches to the central alarm feed. The returned stream opens with a
|
||||||
/// <see cref="AlarmFeedMessage"/> per currently-active alarm, then a
|
/// <c>provider_status</c> and a <c>snapshot_status</c>
|
||||||
/// single <c>snapshot_complete</c> sentinel, then a <c>transition</c>
|
/// <see cref="AlarmFeedMessage"/> — the current provider mode and
|
||||||
/// for every subsequent change.
|
/// completeness verdict, so the caveats precede the records they
|
||||||
|
/// qualify — then one message per currently-active alarm, then a single
|
||||||
|
/// <c>snapshot_complete</c> sentinel, then a <c>transition</c> for every
|
||||||
|
/// subsequent change (and a further status message on every provider-mode
|
||||||
|
/// or truncation-verdict change).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="alarmFilterPrefix">Optional alarm-reference prefix scoping the feed.</param>
|
/// <param name="alarmFilterPrefix">Optional alarm-reference prefix scoping the feed.</param>
|
||||||
/// <param name="cancellationToken">Token that ends the subscription.</param>
|
/// <param name="cancellationToken">Token that ends the subscription.</param>
|
||||||
|
|||||||
@@ -7,4 +7,6 @@ public sealed record EffectiveDashboardConfiguration(
|
|||||||
int RecentFaultLimit,
|
int RecentFaultLimit,
|
||||||
int RecentSessionLimit,
|
int RecentSessionLimit,
|
||||||
bool ShowTagValues,
|
bool ShowTagValues,
|
||||||
IReadOnlyDictionary<string, string> GroupToRole);
|
IReadOnlyDictionary<string, string> GroupToRole,
|
||||||
|
IReadOnlyDictionary<string, IReadOnlyList<string>> GroupToTag,
|
||||||
|
UntaggedSessionVisibility UntaggedSessionVisibility);
|
||||||
|
|||||||
@@ -62,7 +62,16 @@ public sealed class GatewayConfigurationProvider(IOptions<GatewayOptions> option
|
|||||||
RecentFaultLimit: value.Dashboard.RecentFaultLimit,
|
RecentFaultLimit: value.Dashboard.RecentFaultLimit,
|
||||||
RecentSessionLimit: value.Dashboard.RecentSessionLimit,
|
RecentSessionLimit: value.Dashboard.RecentSessionLimit,
|
||||||
ShowTagValues: value.Dashboard.ShowTagValues,
|
ShowTagValues: value.Dashboard.ShowTagValues,
|
||||||
GroupToRole: value.Dashboard.GroupToRole),
|
GroupToRole: value.Dashboard.GroupToRole,
|
||||||
|
// Rebuilt rather than passed through because the value type widens from string[]
|
||||||
|
// to IReadOnlyList<string>; the source dictionary's own comparer is carried over
|
||||||
|
// (case-insensitive by default) so the projected map still matches LDAP group
|
||||||
|
// names in whatever case the directory returns them.
|
||||||
|
GroupToTag: value.Dashboard.GroupToTag.ToDictionary(
|
||||||
|
pair => pair.Key,
|
||||||
|
pair => (IReadOnlyList<string>)pair.Value,
|
||||||
|
value.Dashboard.GroupToTag.Comparer),
|
||||||
|
UntaggedSessionVisibility: value.Dashboard.UntaggedSessionVisibility),
|
||||||
Protocol: new EffectiveProtocolConfiguration(
|
Protocol: new EffectiveProtocolConfiguration(
|
||||||
value.Protocol.WorkerProtocolVersion,
|
value.Protocol.WorkerProtocolVersion,
|
||||||
value.Protocol.MaxGrpcMessageBytes));
|
value.Protocol.MaxGrpcMessageBytes));
|
||||||
|
|||||||
@@ -115,6 +115,20 @@ else
|
|||||||
<label for="browseSubtrees" class="form-label small">Browse subtrees</label>
|
<label for="browseSubtrees" class="form-label small">Browse subtrees</label>
|
||||||
<textarea id="browseSubtrees" class="form-control form-control-sm" rows="2" @bind="CreateModel.BrowseSubtrees" @bind:event="oninput"></textarea>
|
<textarea id="browseSubtrees" class="form-control form-control-sm" rows="2" @bind="CreateModel.BrowseSubtrees" @bind:event="oninput"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="mb-2">
|
||||||
|
<label for="dashboardTags" class="form-label small">Dashboard tags</label>
|
||||||
|
<textarea id="dashboardTags" class="form-control form-control-sm" rows="2"
|
||||||
|
aria-describedby="dashboardTagsHelp"
|
||||||
|
@bind="CreateModel.DashboardTags" @bind:event="oninput"></textarea>
|
||||||
|
<div id="dashboardTagsHelp" class="form-text small">
|
||||||
|
Split on the same separators as the constraint fields above, and
|
||||||
|
de-duplicated case-insensitively — two spellings of a tag are one grant.
|
||||||
|
Matched case-insensitively against the viewer grants in
|
||||||
|
<code>Dashboard:GroupToTag</code>. Scopes dashboard event visibility only —
|
||||||
|
never what the key may read, write, or browse. Empty leaves the key's sessions
|
||||||
|
untagged, whose visibility follows <code>Dashboard:UntaggedSessionVisibility</code>.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="maxWriteClassification" class="form-label small">Max write classification</label>
|
<label for="maxWriteClassification" class="form-label small">Max write classification</label>
|
||||||
<input id="maxWriteClassification" class="form-control form-control-sm" @bind="CreateModel.MaxWriteClassification" @bind:event="oninput" />
|
<input id="maxWriteClassification" class="form-control form-control-sm" @bind="CreateModel.MaxWriteClassification" @bind:event="oninput" />
|
||||||
@@ -238,7 +252,14 @@ else
|
|||||||
GatewayScopes.Admin
|
GatewayScopes.Admin
|
||||||
];
|
];
|
||||||
|
|
||||||
private ApiKeyCreateModel CreateModel { get; } = new();
|
/// <summary>
|
||||||
|
/// Backing state for the create dialog. Internal rather than private so
|
||||||
|
/// <c>ApiKeysPageDashboardTagsTests</c> can drive the model-to-request mapping
|
||||||
|
/// directly — the assembly's established test seam (see <c>InternalsVisibleTo</c>
|
||||||
|
/// in <c>Properties/AssemblyInfo.cs</c>), because a create form behind a click is
|
||||||
|
/// unreachable from static rendering.
|
||||||
|
/// </summary>
|
||||||
|
internal ApiKeyCreateModel CreateModel { get; } = new();
|
||||||
|
|
||||||
private bool CanManageApiKeys { get; set; }
|
private bool CanManageApiKeys { get; set; }
|
||||||
|
|
||||||
@@ -399,7 +420,8 @@ else
|
|||||||
LastGeneratedApiKey = result.ApiKey;
|
LastGeneratedApiKey = result.ApiKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OpenCreateDialog()
|
/// <summary>Opens the create dialog. Internal so a render test can reach the form's markup.</summary>
|
||||||
|
internal void OpenCreateDialog()
|
||||||
{
|
{
|
||||||
IsCreateDialogOpen = true;
|
IsCreateDialogOpen = true;
|
||||||
}
|
}
|
||||||
@@ -412,7 +434,11 @@ else
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool TryBuildCreateRequest(
|
/// <summary>Maps <see cref="CreateModel"/> onto a create request, or reports why it cannot.</summary>
|
||||||
|
/// <param name="request">The built request when this returns true.</param>
|
||||||
|
/// <param name="validationMessage">The reason the model is unusable when this returns false.</param>
|
||||||
|
/// <returns>True when the model produced a request.</returns>
|
||||||
|
internal bool TryBuildCreateRequest(
|
||||||
[System.Diagnostics.CodeAnalysis.NotNullWhen(true)] out DashboardApiKeyManagementRequest? request,
|
[System.Diagnostics.CodeAnalysis.NotNullWhen(true)] out DashboardApiKeyManagementRequest? request,
|
||||||
out string? validationMessage)
|
out string? validationMessage)
|
||||||
{
|
{
|
||||||
@@ -449,7 +475,12 @@ else
|
|||||||
MaxWriteClassification: maxWriteClassification,
|
MaxWriteClassification: maxWriteClassification,
|
||||||
BrowseSubtrees: ParseList(CreateModel.BrowseSubtrees),
|
BrowseSubtrees: ParseList(CreateModel.BrowseSubtrees),
|
||||||
ReadAlarmOnly: CreateModel.ReadAlarmOnly,
|
ReadAlarmOnly: CreateModel.ReadAlarmOnly,
|
||||||
ReadHistorizedOnly: CreateModel.ReadHistorizedOnly));
|
ReadHistorizedOnly: CreateModel.ReadHistorizedOnly)
|
||||||
|
{
|
||||||
|
// Init-only rather than positional (it was bolted onto the record after the
|
||||||
|
// eight-member constructor shipped), so it is attached here instead.
|
||||||
|
DashboardTags = ParseDashboardTags(CreateModel.DashboardTags),
|
||||||
|
});
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -514,6 +545,11 @@ else
|
|||||||
AddList(parts, "read_tag_globs", constraints.ReadTagGlobs);
|
AddList(parts, "read_tag_globs", constraints.ReadTagGlobs);
|
||||||
AddList(parts, "write_tag_globs", constraints.WriteTagGlobs);
|
AddList(parts, "write_tag_globs", constraints.WriteTagGlobs);
|
||||||
AddList(parts, "browse_subtrees", constraints.BrowseSubtrees);
|
AddList(parts, "browse_subtrees", constraints.BrowseSubtrees);
|
||||||
|
|
||||||
|
// Listed like the rest even though it restricts no data path: IsEmpty counts it, so a key
|
||||||
|
// whose only policy is a dashboard tag is not "unconstrained", and omitting it here left
|
||||||
|
// that key's cell empty — rendered as "-", the same cell a key with no policy at all gets.
|
||||||
|
AddList(parts, "dashboard_tags", constraints.DashboardTags);
|
||||||
if (constraints.MaxWriteClassification is { } max)
|
if (constraints.MaxWriteClassification is { } max)
|
||||||
{
|
{
|
||||||
parts.Add($"max_write_classification={max}");
|
parts.Add($"max_write_classification={max}");
|
||||||
@@ -540,6 +576,18 @@ else
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Dashboard tags alone are de-duplicated ordinal-ignore-case, which is how the enforcement site
|
||||||
|
// compares them — two spellings are one grant, and ApiKeyAdminCommandLineParser.ParseDashboardTags
|
||||||
|
// collapses them the same way, first spelling winning. Persisting both would not change who can
|
||||||
|
// see what (GatewaySession holds its tags in a case-insensitive set) but the constraints column
|
||||||
|
// would report one grant twice, and a security grant that reads as two is the wrong kind of
|
||||||
|
// wrong on an audit surface. The other five list fields keep ParseList's verbatim behaviour:
|
||||||
|
// their globs are matched literally, so near-duplicates there are not necessarily the same rule.
|
||||||
|
private static IReadOnlyList<string> ParseDashboardTags(string? value)
|
||||||
|
{
|
||||||
|
return [.. ParseList(value).Distinct(StringComparer.OrdinalIgnoreCase)];
|
||||||
|
}
|
||||||
|
|
||||||
private static IReadOnlyList<string> ParseList(string? value)
|
private static IReadOnlyList<string> ParseList(string? value)
|
||||||
{
|
{
|
||||||
return (value ?? string.Empty)
|
return (value ?? string.Empty)
|
||||||
@@ -548,7 +596,7 @@ else
|
|||||||
.ToArray();
|
.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
private sealed class ApiKeyCreateModel
|
internal sealed class ApiKeyCreateModel
|
||||||
{
|
{
|
||||||
public string KeyId { get; set; } = string.Empty;
|
public string KeyId { get; set; } = string.Empty;
|
||||||
|
|
||||||
@@ -568,6 +616,8 @@ else
|
|||||||
|
|
||||||
public string MaxWriteClassification { get; set; } = string.Empty;
|
public string MaxWriteClassification { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string DashboardTags { get; set; } = string.Empty;
|
||||||
|
|
||||||
public bool ReadAlarmOnly { get; set; }
|
public bool ReadAlarmOnly { get; set; }
|
||||||
|
|
||||||
public bool ReadHistorizedOnly { get; set; }
|
public bool ReadHistorizedOnly { get; set; }
|
||||||
@@ -583,6 +633,7 @@ else
|
|||||||
WriteTagGlobs = string.Empty;
|
WriteTagGlobs = string.Empty;
|
||||||
BrowseSubtrees = string.Empty;
|
BrowseSubtrees = string.Empty;
|
||||||
MaxWriteClassification = string.Empty;
|
MaxWriteClassification = string.Empty;
|
||||||
|
DashboardTags = string.Empty;
|
||||||
ReadAlarmOnly = false;
|
ReadAlarmOnly = false;
|
||||||
ReadHistorizedOnly = false;
|
ReadHistorizedOnly = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,6 +65,27 @@ else
|
|||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">Dashboard tag mapping</th>
|
||||||
|
@* Group and tag NAMES are configuration, not tag values — the redaction
|
||||||
|
rule does not reach them, and an operator asking why a Viewer sees no
|
||||||
|
sessions needs this map as much as the role map above it. *@
|
||||||
|
<td>
|
||||||
|
@if (Snapshot.Configuration.Dashboard.GroupToTag.Count == 0)
|
||||||
|
{
|
||||||
|
<span class="text-muted">(none configured)</span>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<ul class="mb-0">
|
||||||
|
@foreach (KeyValuePair<string, IReadOnlyList<string>> pair in Snapshot.Configuration.Dashboard.GroupToTag)
|
||||||
|
{
|
||||||
|
<li><code>@pair.Key</code> → @string.Join(", ", pair.Value)</li>
|
||||||
|
}
|
||||||
|
</ul>
|
||||||
|
}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr><th scope="row">Worker executable</th><td><code>@Snapshot.Configuration.Worker.ExecutablePath</code></td></tr>
|
<tr><th scope="row">Worker executable</th><td><code>@Snapshot.Configuration.Worker.ExecutablePath</code></td></tr>
|
||||||
<tr><th scope="row">Worker architecture</th><td>@Snapshot.Configuration.Worker.RequiredArchitecture</td></tr>
|
<tr><th scope="row">Worker architecture</th><td>@Snapshot.Configuration.Worker.RequiredArchitecture</td></tr>
|
||||||
<tr><th scope="row">Startup timeout</th><td>@Snapshot.Configuration.Worker.StartupTimeoutSeconds seconds</td></tr>
|
<tr><th scope="row">Startup timeout</th><td>@Snapshot.Configuration.Worker.StartupTimeoutSeconds seconds</td></tr>
|
||||||
@@ -78,6 +99,7 @@ else
|
|||||||
<tr><th scope="row">Anonymous localhost</th><td>@Snapshot.Configuration.Dashboard.AllowAnonymousLocalhost</td></tr>
|
<tr><th scope="row">Anonymous localhost</th><td>@Snapshot.Configuration.Dashboard.AllowAnonymousLocalhost</td></tr>
|
||||||
<tr><th scope="row">Snapshot interval</th><td>@Snapshot.Configuration.Dashboard.SnapshotIntervalMilliseconds ms</td></tr>
|
<tr><th scope="row">Snapshot interval</th><td>@Snapshot.Configuration.Dashboard.SnapshotIntervalMilliseconds ms</td></tr>
|
||||||
<tr><th scope="row">Show tag values</th><td>@Snapshot.Configuration.Dashboard.ShowTagValues</td></tr>
|
<tr><th scope="row">Show tag values</th><td>@Snapshot.Configuration.Dashboard.ShowTagValues</td></tr>
|
||||||
|
<tr><th scope="row">Untagged session visibility</th><td>@Snapshot.Configuration.Dashboard.UntaggedSessionVisibility</td></tr>
|
||||||
<tr><th scope="row">Worker protocol</th><td>@Snapshot.Configuration.Protocol.WorkerProtocolVersion</td></tr>
|
<tr><th scope="row">Worker protocol</th><td>@Snapshot.Configuration.Protocol.WorkerProtocolVersion</td></tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
|
using Microsoft.Extensions.Options;
|
||||||
using ZB.MOM.WW.MxGateway.Contracts.Proto;
|
using ZB.MOM.WW.MxGateway.Contracts.Proto;
|
||||||
using ZB.MOM.WW.MxGateway.Server.Alarms;
|
using ZB.MOM.WW.MxGateway.Server.Alarms;
|
||||||
|
using ZB.MOM.WW.MxGateway.Server.Configuration;
|
||||||
using ZB.MOM.WW.MxGateway.Server.Sessions;
|
using ZB.MOM.WW.MxGateway.Server.Sessions;
|
||||||
|
|
||||||
namespace ZB.MOM.WW.MxGateway.Server.Dashboard;
|
namespace ZB.MOM.WW.MxGateway.Server.Dashboard;
|
||||||
@@ -11,6 +13,16 @@ namespace ZB.MOM.WW.MxGateway.Server.Dashboard;
|
|||||||
/// expires. All access is serialised through <see cref="_gate"/> so the
|
/// expires. All access is serialised through <see cref="_gate"/> so the
|
||||||
/// single backing worker only ever sees one in-flight command.
|
/// single backing worker only ever sees one in-flight command.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// This service is also where <c>MxGateway:Dashboard:ShowTagValues</c> is
|
||||||
|
/// applied to the Browse panel: with the flag false (the default) the
|
||||||
|
/// formatted value never leaves this boundary — the projected
|
||||||
|
/// <see cref="DashboardTagValue"/> carries
|
||||||
|
/// <see cref="DashboardTagValue.RedactedValueText"/> instead. Putting the
|
||||||
|
/// decision at the service rather than in the page keeps it to one place and
|
||||||
|
/// keeps a value out of the render tree entirely, rather than relying on
|
||||||
|
/// every current and future view to remember to suppress it.
|
||||||
|
/// </remarks>
|
||||||
public sealed class DashboardLiveDataService : IDashboardLiveDataService, IAsyncDisposable
|
public sealed class DashboardLiveDataService : IDashboardLiveDataService, IAsyncDisposable
|
||||||
{
|
{
|
||||||
private const string BackendName = "Galaxy";
|
private const string BackendName = "Galaxy";
|
||||||
@@ -38,6 +50,18 @@ public sealed class DashboardLiveDataService : IDashboardLiveDataService, IAsync
|
|||||||
private readonly ILogger<DashboardLiveDataService> _logger;
|
private readonly ILogger<DashboardLiveDataService> _logger;
|
||||||
private readonly SemaphoreSlim _gate = new(1, 1);
|
private readonly SemaphoreSlim _gate = new(1, 1);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <c>MxGateway:Dashboard:ShowTagValues</c>. False (the default)
|
||||||
|
/// substitutes <see cref="DashboardTagValue.RedactedValueText"/> for every
|
||||||
|
/// successfully read value this service hands the Browse panel; quality,
|
||||||
|
/// data type, source timestamp, and any error still describe the real
|
||||||
|
/// read, so the panel remains a diagnostic surface without being a
|
||||||
|
/// value-disclosure one. Failed reads keep their existing "-" placeholder:
|
||||||
|
/// there was no value to suppress, so claiming one was withheld would
|
||||||
|
/// misreport the failure.
|
||||||
|
/// </summary>
|
||||||
|
private readonly bool _showTagValues;
|
||||||
|
|
||||||
// Least-recently-read-last advise set: the list holds every currently advised
|
// Least-recently-read-last advise set: the list holds every currently advised
|
||||||
// tag ordered most- to least-recently read, the dictionary indexes into it.
|
// tag ordered most- to least-recently read, the dictionary indexes into it.
|
||||||
// Both are only ever touched under _gate, which already serialises all viewers.
|
// Both are only ever touched under _gate, which already serialises all viewers.
|
||||||
@@ -53,15 +77,19 @@ public sealed class DashboardLiveDataService : IDashboardLiveDataService, IAsync
|
|||||||
/// <summary>Initializes the live-data service.</summary>
|
/// <summary>Initializes the live-data service.</summary>
|
||||||
/// <param name="sessionManager">Gateway session manager.</param>
|
/// <param name="sessionManager">Gateway session manager.</param>
|
||||||
/// <param name="alarmService">Gateway central alarm service.</param>
|
/// <param name="alarmService">Gateway central alarm service.</param>
|
||||||
|
/// <param name="options">Gateway options supplying <c>Dashboard:ShowTagValues</c>.</param>
|
||||||
/// <param name="logger">Diagnostic logger.</param>
|
/// <param name="logger">Diagnostic logger.</param>
|
||||||
public DashboardLiveDataService(
|
public DashboardLiveDataService(
|
||||||
ISessionManager sessionManager,
|
ISessionManager sessionManager,
|
||||||
IGatewayAlarmService alarmService,
|
IGatewayAlarmService alarmService,
|
||||||
|
IOptions<GatewayOptions> options,
|
||||||
ILogger<DashboardLiveDataService> logger)
|
ILogger<DashboardLiveDataService> logger)
|
||||||
{
|
{
|
||||||
|
ArgumentNullException.ThrowIfNull(options);
|
||||||
_sessionManager = sessionManager ?? throw new ArgumentNullException(nameof(sessionManager));
|
_sessionManager = sessionManager ?? throw new ArgumentNullException(nameof(sessionManager));
|
||||||
_alarmService = alarmService ?? throw new ArgumentNullException(nameof(alarmService));
|
_alarmService = alarmService ?? throw new ArgumentNullException(nameof(alarmService));
|
||||||
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
|
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
|
||||||
|
_showTagValues = options.Value.Dashboard.ShowTagValues;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
@@ -96,8 +124,20 @@ public sealed class DashboardLiveDataService : IDashboardLiveDataService, IAsync
|
|||||||
.ReadBulkAsync(serverHandle, tagAddresses.ToArray(), ReadTimeout, cancellationToken)
|
.ReadBulkAsync(serverHandle, tagAddresses.ToArray(), ReadTimeout, cancellationToken)
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
|
|
||||||
|
// The only place the /browse live-value gate is evaluated: the page
|
||||||
|
// renders whatever ValueText it is handed, so a second check in the
|
||||||
|
// view could only ever disagree with this one.
|
||||||
|
//
|
||||||
|
// A failed read is left alone: it has no value to suppress, and its
|
||||||
|
// ValueText is already the "-" placeholder. Substituting "[redacted]"
|
||||||
|
// there would tell the operator a value was withheld when the read
|
||||||
|
// never produced one — the Error column says why it failed, and the
|
||||||
|
// two must not contradict each other.
|
||||||
DashboardTagValue[] values = results
|
DashboardTagValue[] values = results
|
||||||
.Select(DashboardTagValue.FromBulkReadResult)
|
.Select(DashboardTagValue.FromBulkReadResult)
|
||||||
|
.Select(value => _showTagValues || !value.Ok
|
||||||
|
? value
|
||||||
|
: value with { ValueText = DashboardTagValue.RedactedValueText })
|
||||||
.ToArray();
|
.ToArray();
|
||||||
return new DashboardLiveReadResult(values, null, session.SessionId, session.WorkerProcessId);
|
return new DashboardLiveReadResult(values, null, session.SessionId, session.WorkerProcessId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,17 @@ public sealed record DashboardTagValue(
|
|||||||
DateTimeOffset? SourceTimestamp,
|
DateTimeOffset? SourceTimestamp,
|
||||||
string? Error)
|
string? Error)
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Placeholder rendered in place of <see cref="ValueText"/> when
|
||||||
|
/// <c>MxGateway:Dashboard:ShowTagValues</c> is false (the default). The
|
||||||
|
/// substitution happens once, in <c>DashboardLiveDataService</c>, so the
|
||||||
|
/// Browse page renders whatever it is handed and no view has to repeat
|
||||||
|
/// the decision. Deliberately a visible marker rather than an empty
|
||||||
|
/// string: an operator must be able to tell a suppressed value from a
|
||||||
|
/// tag that read back blank.
|
||||||
|
/// </summary>
|
||||||
|
public const string RedactedValueText = "[redacted]";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Classic OPC-DA "Good" quality. MXAccess surfaces 192 for a healthy
|
/// Classic OPC-DA "Good" quality. MXAccess surfaces 192 for a healthy
|
||||||
/// advised value; anything lower is uncertain or bad.
|
/// advised value; anything lower is uncertain or bad.
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
using Microsoft.AspNetCore.SignalR;
|
using Microsoft.AspNetCore.SignalR;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
using ZB.MOM.WW.MxGateway.Contracts.Proto;
|
using ZB.MOM.WW.MxGateway.Contracts.Proto;
|
||||||
using ZB.MOM.WW.MxGateway.Server.Alarms;
|
using ZB.MOM.WW.MxGateway.Server.Alarms;
|
||||||
|
using ZB.MOM.WW.MxGateway.Server.Configuration;
|
||||||
|
|
||||||
namespace ZB.MOM.WW.MxGateway.Server.Dashboard.Hubs;
|
namespace ZB.MOM.WW.MxGateway.Server.Dashboard.Hubs;
|
||||||
|
|
||||||
@@ -11,11 +13,28 @@ namespace ZB.MOM.WW.MxGateway.Server.Dashboard.Hubs;
|
|||||||
/// client. The hub itself is session-less; clients filter / route messages
|
/// client. The hub itself is session-less; clients filter / route messages
|
||||||
/// in the browser.
|
/// in the browser.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// When <c>MxGateway:Dashboard:ShowTagValues</c> is false (the default), the
|
||||||
|
/// alarm value fields are stripped from a redacted copy before the message
|
||||||
|
/// reaches any browser client — the same rule
|
||||||
|
/// <see cref="DashboardEventBroadcaster"/> applies to the events-hub mirror, so
|
||||||
|
/// the two SignalR seams cannot disagree about whether values leave the gateway.
|
||||||
|
/// The source message is never mutated: it fans out from one feed to the gRPC
|
||||||
|
/// <c>StreamAlarms</c> subscribers and the alarms page as well, and none of
|
||||||
|
/// those audiences is subject to this dashboard-display flag.
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="alarmService">The gateway's central alarm feed.</param>
|
||||||
|
/// <param name="hubContext">Hub context used to broadcast to the alarms group.</param>
|
||||||
|
/// <param name="options">Gateway options supplying <c>Dashboard:ShowTagValues</c>.</param>
|
||||||
|
/// <param name="logger">Logger for best-effort broadcast failures.</param>
|
||||||
public sealed class AlarmsHubPublisher(
|
public sealed class AlarmsHubPublisher(
|
||||||
IGatewayAlarmService alarmService,
|
IGatewayAlarmService alarmService,
|
||||||
IHubContext<AlarmsHub> hubContext,
|
IHubContext<AlarmsHub> hubContext,
|
||||||
|
IOptions<GatewayOptions> options,
|
||||||
ILogger<AlarmsHubPublisher> logger) : BackgroundService
|
ILogger<AlarmsHubPublisher> logger) : BackgroundService
|
||||||
{
|
{
|
||||||
|
private readonly bool _showTagValues = options.Value.Dashboard.ShowTagValues;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
|
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
|
||||||
{
|
{
|
||||||
@@ -37,9 +56,10 @@ public sealed class AlarmsHubPublisher(
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
AlarmFeedMessage outbound = _showTagValues ? message : RedactValues(message);
|
||||||
await hubContext.Clients
|
await hubContext.Clients
|
||||||
.Group(AlarmsHub.AllAlarmsGroup)
|
.Group(AlarmsHub.AllAlarmsGroup)
|
||||||
.SendAsync(AlarmsHub.AlarmMessage, message, stoppingToken)
|
.SendAsync(AlarmsHub.AlarmMessage, outbound, stoppingToken)
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch (Exception ex) when (ex is not OperationCanceledException)
|
catch (Exception ex) when (ex is not OperationCanceledException)
|
||||||
@@ -66,4 +86,42 @@ public sealed class AlarmsHubPublisher(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Produces a copy of <paramref name="source"/> with the alarm value fields
|
||||||
|
/// cleared, leaving every other field — reference, severity, state, category,
|
||||||
|
/// operator, timestamps — intact so the alarms page still renders the row.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="source">The message as the alarm feed produced it.</param>
|
||||||
|
/// <returns>
|
||||||
|
/// A redacted deep clone for the two value-bearing payload arms; the source
|
||||||
|
/// instance itself for every other arm, which carries no value to strip.
|
||||||
|
/// New payload arms therefore pass through unchanged by default — the switch
|
||||||
|
/// names only the arms that have something to redact, so adding a valueless
|
||||||
|
/// arm to the contract needs no change here.
|
||||||
|
/// </returns>
|
||||||
|
private static AlarmFeedMessage RedactValues(AlarmFeedMessage source)
|
||||||
|
{
|
||||||
|
switch (source.PayloadCase)
|
||||||
|
{
|
||||||
|
case AlarmFeedMessage.PayloadOneofCase.Transition:
|
||||||
|
{
|
||||||
|
AlarmFeedMessage redacted = source.Clone();
|
||||||
|
redacted.Transition.CurrentValue = null;
|
||||||
|
redacted.Transition.LimitValue = null;
|
||||||
|
return redacted;
|
||||||
|
}
|
||||||
|
|
||||||
|
case AlarmFeedMessage.PayloadOneofCase.ActiveAlarm:
|
||||||
|
{
|
||||||
|
AlarmFeedMessage redacted = source.Clone();
|
||||||
|
redacted.ActiveAlarm.CurrentValue = null;
|
||||||
|
redacted.ActiveAlarm.LimitValue = null;
|
||||||
|
return redacted;
|
||||||
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
return source;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ namespace ZB.MOM.WW.MxGateway.Tests.Alarms;
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Carries the worker's truncated-fetch verdict across the gateway: worker
|
/// Carries the worker's truncated-fetch verdict across the gateway: worker
|
||||||
/// reply payload → <see cref="GatewayAlarmMonitor"/> → the public
|
/// reply payload → <see cref="GatewayAlarmMonitor"/> → the public
|
||||||
/// <c>QueryActiveAlarms</c> stream.
|
/// <c>QueryActiveAlarms</c> stream (per record) and the live
|
||||||
|
/// <c>StreamAlarms</c> feed (the <c>snapshot_status</c> frame).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// <para>
|
/// <para>
|
||||||
@@ -145,6 +146,302 @@ public sealed class AlarmTruncationSignalTests
|
|||||||
await monitor.StopAsync(CancellationToken.None);
|
await monitor.StopAsync(CancellationToken.None);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The feed-level edge. A reconcile that flips the verdict to truncated
|
||||||
|
/// pushes exactly one <c>snapshot_status</c> frame to every attached
|
||||||
|
/// subscriber; a following reconcile carrying the same verdict pushes
|
||||||
|
/// none. Without the edge test the frame could be emitted per reconcile —
|
||||||
|
/// a status frame every few seconds forever, which consumers would learn
|
||||||
|
/// to ignore.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||||
|
[Fact]
|
||||||
|
public async Task ReconcileFlippingToTruncated_EmitsOneSnapshotStatusFrame()
|
||||||
|
{
|
||||||
|
using GatewayMetrics metrics = new();
|
||||||
|
StubSessionManager sessions = new();
|
||||||
|
using GatewayAlarmMonitor monitor = CreateMonitor(sessions, metrics);
|
||||||
|
|
||||||
|
using CancellationTokenSource cts = new();
|
||||||
|
await monitor.StartAsync(cts.Token);
|
||||||
|
await sessions.WaitForReconcileAsync(WaitTimeout);
|
||||||
|
|
||||||
|
List<AlarmFeedMessage> received = [];
|
||||||
|
TaskCompletionSource attached = new(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||||
|
using CancellationTokenSource streamCts = new();
|
||||||
|
Task reader = ReadFeedAsync(monitor, received, attached, streamCts.Token);
|
||||||
|
await attached.Task.WaitAsync(WaitTimeout);
|
||||||
|
|
||||||
|
// The worker's next fetch comes back capped. A provider-mode event forces the reconcile
|
||||||
|
// immediately, so the test never waits on the periodic timer; each probe also broadcasts a
|
||||||
|
// provider_status frame, which is the barrier the assertions below count on.
|
||||||
|
sessions.SnapshotTruncated = true;
|
||||||
|
sessions.EmitEvent(ProviderModeProbe(1));
|
||||||
|
|
||||||
|
// A second, identical reconcile: same verdict, so no second frame. The third probe is only
|
||||||
|
// a barrier — the monitor handles provider-mode events one at a time and awaits the
|
||||||
|
// reconcile inside each, so its provider_status proves probe 2's reconcile has completed.
|
||||||
|
sessions.EmitEvent(ProviderModeProbe(2));
|
||||||
|
sessions.EmitEvent(ProviderModeProbe(3));
|
||||||
|
await WaitUntilAsync(() => CountOf(received, AlarmFeedMessage.PayloadOneofCase.ProviderStatus) >= 4, WaitTimeout);
|
||||||
|
|
||||||
|
lock (received)
|
||||||
|
{
|
||||||
|
bool[] verdicts = received
|
||||||
|
.Where(m => m.PayloadCase == AlarmFeedMessage.PayloadOneofCase.SnapshotStatus)
|
||||||
|
.Select(m => m.SnapshotStatus.Truncated)
|
||||||
|
.ToArray();
|
||||||
|
|
||||||
|
// The first is this subscriber's open-time baseline; the second is the edge.
|
||||||
|
Assert.Equal([false, true], verdicts);
|
||||||
|
}
|
||||||
|
|
||||||
|
await streamCts.CancelAsync();
|
||||||
|
await reader;
|
||||||
|
await cts.CancelAsync();
|
||||||
|
await monitor.StopAsync(CancellationToken.None);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The clearing edge. A fetch that comes back under the cap restores
|
||||||
|
/// absence authority, and the feed says so — otherwise a consumer that
|
||||||
|
/// saw the truncated frame would caveat its alarm set forever.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||||
|
[Fact]
|
||||||
|
public async Task ReconcileClearingTruncation_EmitsTheClearingFrame()
|
||||||
|
{
|
||||||
|
using GatewayMetrics metrics = new();
|
||||||
|
StubSessionManager sessions = new() { SnapshotTruncated = true };
|
||||||
|
using GatewayAlarmMonitor monitor = CreateMonitor(sessions, metrics);
|
||||||
|
|
||||||
|
using CancellationTokenSource cts = new();
|
||||||
|
await monitor.StartAsync(cts.Token);
|
||||||
|
await sessions.WaitForReconcileAsync(WaitTimeout);
|
||||||
|
await WaitUntilAsync(() => monitor.SnapshotTruncated, WaitTimeout);
|
||||||
|
|
||||||
|
List<AlarmFeedMessage> received = [];
|
||||||
|
TaskCompletionSource attached = new(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||||
|
using CancellationTokenSource streamCts = new();
|
||||||
|
Task reader = ReadFeedAsync(monitor, received, attached, streamCts.Token);
|
||||||
|
await attached.Task.WaitAsync(WaitTimeout);
|
||||||
|
|
||||||
|
sessions.SnapshotTruncated = false;
|
||||||
|
sessions.EmitEvent(ProviderModeProbe(1));
|
||||||
|
|
||||||
|
await WaitUntilAsync(
|
||||||
|
() => CountOf(received, AlarmFeedMessage.PayloadOneofCase.SnapshotStatus) >= 2,
|
||||||
|
WaitTimeout);
|
||||||
|
|
||||||
|
lock (received)
|
||||||
|
{
|
||||||
|
bool[] verdicts = received
|
||||||
|
.Where(m => m.PayloadCase == AlarmFeedMessage.PayloadOneofCase.SnapshotStatus)
|
||||||
|
.Select(m => m.SnapshotStatus.Truncated)
|
||||||
|
.ToArray();
|
||||||
|
Assert.Equal([true, false], verdicts);
|
||||||
|
}
|
||||||
|
|
||||||
|
await streamCts.CancelAsync();
|
||||||
|
await reader;
|
||||||
|
await cts.CancelAsync();
|
||||||
|
await monitor.StopAsync(CancellationToken.None);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Late-joiner priming while the verdict is truncated. The frame must
|
||||||
|
/// arrive after <c>provider_status</c> and before the cached
|
||||||
|
/// <c>active_alarm</c> frames: a consumer that applies the snapshot as it
|
||||||
|
/// streams needs the completeness caveat in hand before the records it
|
||||||
|
/// qualifies, not after.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||||
|
[Fact]
|
||||||
|
public async Task SubscriberAttachingWhileTruncated_IsPrimedBeforeTheCachedSnapshot()
|
||||||
|
{
|
||||||
|
using GatewayMetrics metrics = new();
|
||||||
|
StubSessionManager sessions = new()
|
||||||
|
{
|
||||||
|
SnapshotTruncated = true,
|
||||||
|
Snapshots = [NewSnapshot("Galaxy!Area.Tank01.Level.HiHi", fromTruncatedSnapshot: true)],
|
||||||
|
};
|
||||||
|
using GatewayAlarmMonitor monitor = CreateMonitor(sessions, metrics);
|
||||||
|
|
||||||
|
using CancellationTokenSource cts = new();
|
||||||
|
await monitor.StartAsync(cts.Token);
|
||||||
|
await sessions.WaitForReconcileAsync(WaitTimeout);
|
||||||
|
await WaitUntilAsync(() => monitor.SnapshotTruncated && monitor.CurrentAlarms.Count == 1, WaitTimeout);
|
||||||
|
|
||||||
|
AlarmFeedMessage[] preamble = await ReadPreambleAsync(monitor);
|
||||||
|
|
||||||
|
Assert.Equal(
|
||||||
|
[
|
||||||
|
AlarmFeedMessage.PayloadOneofCase.ProviderStatus,
|
||||||
|
AlarmFeedMessage.PayloadOneofCase.SnapshotStatus,
|
||||||
|
AlarmFeedMessage.PayloadOneofCase.ActiveAlarm,
|
||||||
|
AlarmFeedMessage.PayloadOneofCase.SnapshotComplete,
|
||||||
|
],
|
||||||
|
preamble.Select(m => m.PayloadCase).ToArray());
|
||||||
|
Assert.True(preamble[1].SnapshotStatus.Truncated);
|
||||||
|
|
||||||
|
await cts.CancelAsync();
|
||||||
|
await monitor.StopAsync(CancellationToken.None);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The control for the priming frame: it is unconditional, so a
|
||||||
|
/// subscriber attaching to a complete feed is told so explicitly rather
|
||||||
|
/// than having to infer "no frame means not truncated" — an inference
|
||||||
|
/// that is indistinguishable from a gateway that never sends the frame.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||||
|
[Fact]
|
||||||
|
public async Task SubscriberAttachingWhileComplete_IsPrimedWithTheFalseVerdict()
|
||||||
|
{
|
||||||
|
using GatewayMetrics metrics = new();
|
||||||
|
StubSessionManager sessions = new();
|
||||||
|
using GatewayAlarmMonitor monitor = CreateMonitor(sessions, metrics);
|
||||||
|
|
||||||
|
using CancellationTokenSource cts = new();
|
||||||
|
await monitor.StartAsync(cts.Token);
|
||||||
|
await sessions.WaitForReconcileAsync(WaitTimeout);
|
||||||
|
|
||||||
|
AlarmFeedMessage[] preamble = await ReadPreambleAsync(monitor);
|
||||||
|
|
||||||
|
Assert.Equal(
|
||||||
|
[
|
||||||
|
AlarmFeedMessage.PayloadOneofCase.ProviderStatus,
|
||||||
|
AlarmFeedMessage.PayloadOneofCase.SnapshotStatus,
|
||||||
|
AlarmFeedMessage.PayloadOneofCase.SnapshotComplete,
|
||||||
|
],
|
||||||
|
preamble.Select(m => m.PayloadCase).ToArray());
|
||||||
|
Assert.False(preamble[1].SnapshotStatus.Truncated);
|
||||||
|
|
||||||
|
await cts.CancelAsync();
|
||||||
|
await monitor.StopAsync(CancellationToken.None);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A monitor restart drops the truncation verdict with the cache
|
||||||
|
/// generation it describes. That drop is a completeness change like any
|
||||||
|
/// other, so subscribers — which outlive the monitor's worker session —
|
||||||
|
/// must see the clearing frame; otherwise a feed that silently re-seeds
|
||||||
|
/// leaves them caveating a set that is no longer truncated.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||||
|
[Fact]
|
||||||
|
public async Task MonitorRestartClearingTruncation_EmitsTheClearingFrame()
|
||||||
|
{
|
||||||
|
using GatewayMetrics metrics = new();
|
||||||
|
StubSessionManager sessions = new() { SnapshotTruncated = true };
|
||||||
|
using GatewayAlarmMonitor monitor = CreateMonitor(sessions, metrics);
|
||||||
|
|
||||||
|
using CancellationTokenSource cts = new();
|
||||||
|
await monitor.StartAsync(cts.Token);
|
||||||
|
await sessions.WaitForReconcileAsync(WaitTimeout);
|
||||||
|
await WaitUntilAsync(() => monitor.SnapshotTruncated, WaitTimeout);
|
||||||
|
|
||||||
|
List<AlarmFeedMessage> received = [];
|
||||||
|
TaskCompletionSource attached = new(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||||
|
using CancellationTokenSource streamCts = new();
|
||||||
|
Task reader = ReadFeedAsync(monitor, received, attached, streamCts.Token);
|
||||||
|
await attached.Task.WaitAsync(WaitTimeout);
|
||||||
|
|
||||||
|
// Ending the worker event stream faults the monitor lifecycle, which clears the cache.
|
||||||
|
sessions.EndWorkerEventStream();
|
||||||
|
|
||||||
|
await WaitUntilAsync(
|
||||||
|
() => CountOf(received, AlarmFeedMessage.PayloadOneofCase.SnapshotStatus) >= 2,
|
||||||
|
WaitTimeout);
|
||||||
|
|
||||||
|
lock (received)
|
||||||
|
{
|
||||||
|
// Only the first two: the supervisor re-opens the session after its backoff, and that
|
||||||
|
// second lifecycle legitimately re-reports the truncated verdict.
|
||||||
|
bool[] verdicts = received
|
||||||
|
.Where(m => m.PayloadCase == AlarmFeedMessage.PayloadOneofCase.SnapshotStatus)
|
||||||
|
.Select(m => m.SnapshotStatus.Truncated)
|
||||||
|
.Take(2)
|
||||||
|
.ToArray();
|
||||||
|
Assert.Equal([true, false], verdicts);
|
||||||
|
}
|
||||||
|
|
||||||
|
await streamCts.CancelAsync();
|
||||||
|
await reader;
|
||||||
|
await cts.CancelAsync();
|
||||||
|
await monitor.StopAsync(CancellationToken.None);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static int CountOf(List<AlarmFeedMessage> received, AlarmFeedMessage.PayloadOneofCase payloadCase)
|
||||||
|
{
|
||||||
|
lock (received)
|
||||||
|
{
|
||||||
|
return received.Count(m => m.PayloadCase == payloadCase);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Drains the monitor's feed into received (every frame, preamble included), signalling gate
|
||||||
|
// once the subscriber is registered — that is, on its first frame.
|
||||||
|
private static Task ReadFeedAsync(
|
||||||
|
GatewayAlarmMonitor monitor,
|
||||||
|
List<AlarmFeedMessage> received,
|
||||||
|
TaskCompletionSource gate,
|
||||||
|
CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
return Task.Run(
|
||||||
|
async () =>
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
await foreach (AlarmFeedMessage message in monitor.StreamAsync(null, cancellationToken))
|
||||||
|
{
|
||||||
|
lock (received)
|
||||||
|
{
|
||||||
|
received.Add(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
gate.TrySetResult();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (OperationCanceledException)
|
||||||
|
{
|
||||||
|
// Expected when the test cancels the stream.
|
||||||
|
}
|
||||||
|
},
|
||||||
|
CancellationToken.None);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reads one subscriber's open-time preamble: everything up to and including snapshot_complete.
|
||||||
|
private static async Task<AlarmFeedMessage[]> ReadPreambleAsync(GatewayAlarmMonitor monitor)
|
||||||
|
{
|
||||||
|
List<AlarmFeedMessage> preamble = [];
|
||||||
|
using CancellationTokenSource streamCts = new(WaitTimeout);
|
||||||
|
await foreach (AlarmFeedMessage message in monitor.StreamAsync(null, streamCts.Token))
|
||||||
|
{
|
||||||
|
preamble.Add(message);
|
||||||
|
if (message.PayloadCase == AlarmFeedMessage.PayloadOneofCase.SnapshotComplete)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return [.. preamble];
|
||||||
|
}
|
||||||
|
|
||||||
|
// A no-op provider-mode event. The monitor forces an immediate reconcile after every one,
|
||||||
|
// which is how these tests drive a reconcile pass without waiting on the periodic timer.
|
||||||
|
private static MxEvent ProviderModeProbe(ulong sequence) => new()
|
||||||
|
{
|
||||||
|
Family = MxEventFamily.OnAlarmProviderModeChanged,
|
||||||
|
WorkerSequence = sequence,
|
||||||
|
OnAlarmProviderModeChanged = new OnAlarmProviderModeChangedEvent
|
||||||
|
{
|
||||||
|
Mode = AlarmProviderMode.Alarmmgr,
|
||||||
|
Reason = "probe",
|
||||||
|
At = Google.Protobuf.WellKnownTypes.Timestamp.FromDateTimeOffset(DateTimeOffset.UtcNow),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
private static ActiveAlarmSnapshot NewSnapshot(string reference, bool fromTruncatedSnapshot)
|
private static ActiveAlarmSnapshot NewSnapshot(string reference, bool fromTruncatedSnapshot)
|
||||||
{
|
{
|
||||||
return new ActiveAlarmSnapshot
|
return new ActiveAlarmSnapshot
|
||||||
@@ -226,18 +523,43 @@ public sealed class AlarmTruncationSignalTests
|
|||||||
private readonly Channel<WorkerEvent> _events = Channel.CreateUnbounded<WorkerEvent>();
|
private readonly Channel<WorkerEvent> _events = Channel.CreateUnbounded<WorkerEvent>();
|
||||||
private readonly TaskCompletionSource _reconciled =
|
private readonly TaskCompletionSource _reconciled =
|
||||||
new(TaskCreationOptions.RunContinuationsAsynchronously);
|
new(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||||
|
private readonly object _sync = new();
|
||||||
|
private bool _snapshotTruncated;
|
||||||
|
private IReadOnlyList<ActiveAlarmSnapshot> _snapshots = [];
|
||||||
|
|
||||||
/// <summary>Gets or sets the truncation verdict the scripted reply carries.</summary>
|
/// <summary>
|
||||||
public bool SnapshotTruncated { get; init; }
|
/// Gets or sets the truncation verdict the scripted reply carries. Settable mid-test so
|
||||||
|
/// a suite can drive the verdict across reconciles and observe the feed-level edge.
|
||||||
|
/// </summary>
|
||||||
|
public bool SnapshotTruncated
|
||||||
|
{
|
||||||
|
get { lock (_sync) { return _snapshotTruncated; } }
|
||||||
|
set { lock (_sync) { _snapshotTruncated = value; } }
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>Gets or sets the snapshots the scripted reply carries.</summary>
|
/// <summary>Gets or sets the snapshots the scripted reply carries.</summary>
|
||||||
public IReadOnlyList<ActiveAlarmSnapshot> Snapshots { get; init; } = [];
|
public IReadOnlyList<ActiveAlarmSnapshot> Snapshots
|
||||||
|
{
|
||||||
|
get { lock (_sync) { return _snapshots; } }
|
||||||
|
set { lock (_sync) { _snapshots = value; } }
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>Completes once the monitor has issued its first QueryActiveAlarms.</summary>
|
/// <summary>Completes once the monitor has issued its first QueryActiveAlarms.</summary>
|
||||||
/// <param name="timeout">The maximum time to wait.</param>
|
/// <param name="timeout">The maximum time to wait.</param>
|
||||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||||
public Task WaitForReconcileAsync(TimeSpan timeout) => _reconciled.Task.WaitAsync(timeout);
|
public Task WaitForReconcileAsync(TimeSpan timeout) => _reconciled.Task.WaitAsync(timeout);
|
||||||
|
|
||||||
|
/// <summary>Pushes a worker event into the session's distributor pump.</summary>
|
||||||
|
/// <param name="mxEvent">The event to push.</param>
|
||||||
|
public void EmitEvent(MxEvent mxEvent) =>
|
||||||
|
_events.Writer.TryWrite(new WorkerEvent { Event = mxEvent });
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Ends the worker event stream, which faults the monitor's lifecycle exactly as a
|
||||||
|
/// worker exit would and takes it through its cache-clearing teardown.
|
||||||
|
/// </summary>
|
||||||
|
public void EndWorkerEventStream() => _events.Writer.TryComplete();
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public Task<GatewaySession> OpenSessionAsync(
|
public Task<GatewaySession> OpenSessionAsync(
|
||||||
SessionOpenRequest request,
|
SessionOpenRequest request,
|
||||||
@@ -275,8 +597,13 @@ public sealed class AlarmTruncationSignalTests
|
|||||||
|
|
||||||
if (command.Command?.Kind == MxCommandKind.QueryActiveAlarms)
|
if (command.Command?.Kind == MxCommandKind.QueryActiveAlarms)
|
||||||
{
|
{
|
||||||
QueryActiveAlarmsReplyPayload payload = new() { SnapshotTruncated = SnapshotTruncated };
|
QueryActiveAlarmsReplyPayload payload = new();
|
||||||
payload.Snapshots.AddRange(Snapshots.Select(snapshot => snapshot.Clone()));
|
lock (_sync)
|
||||||
|
{
|
||||||
|
payload.SnapshotTruncated = _snapshotTruncated;
|
||||||
|
payload.Snapshots.AddRange(_snapshots.Select(snapshot => snapshot.Clone()));
|
||||||
|
}
|
||||||
|
|
||||||
reply.QueryActiveAlarms = payload;
|
reply.QueryActiveAlarms = payload;
|
||||||
_reconciled.TrySetResult();
|
_reconciled.TrySetResult();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,164 @@
|
|||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
using ZB.MOM.WW.MxGateway.Server.Configuration;
|
||||||
|
|
||||||
|
namespace ZB.MOM.WW.MxGateway.Tests.Configuration;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Covers the projection <see cref="GatewayConfigurationProvider"/> makes from bound
|
||||||
|
/// <see cref="GatewayOptions"/> onto the effective-configuration record the dashboard renders.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// The projection is hand-written member by member, so an option that exists and validates can
|
||||||
|
/// still be invisible on the settings page — which is exactly what happened to the two SEC-25
|
||||||
|
/// dashboard-ACL options. These tests pin the dashboard-tag members to the options they come
|
||||||
|
/// from; the redaction assertions pin the opposite invariant, that the two secret-bearing members
|
||||||
|
/// are the only ones masked.
|
||||||
|
/// </remarks>
|
||||||
|
public sealed class GatewayConfigurationProviderTests
|
||||||
|
{
|
||||||
|
/// <summary>The group → tag map reaches the projection with its groups, tags and ordering intact.</summary>
|
||||||
|
[Fact]
|
||||||
|
public void GetEffectiveConfiguration_CopiesGroupToTagMapping()
|
||||||
|
{
|
||||||
|
GatewayOptions options = new()
|
||||||
|
{
|
||||||
|
Dashboard = new DashboardOptions
|
||||||
|
{
|
||||||
|
GroupToTag = new Dictionary<string, string[]>(StringComparer.OrdinalIgnoreCase)
|
||||||
|
{
|
||||||
|
// A multi-tag group is the interesting case: a projection that flattened the
|
||||||
|
// array to its first element, or to a joined string, would still satisfy a
|
||||||
|
// single-tag fixture.
|
||||||
|
["GwOps"] = ["team-a", "team-b"],
|
||||||
|
["GwViewers"] = ["team-a"],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
EffectiveDashboardConfiguration dashboard = Project(options).Dashboard;
|
||||||
|
|
||||||
|
Assert.Equal(2, dashboard.GroupToTag.Count);
|
||||||
|
Assert.Equal(["team-a", "team-b"], dashboard.GroupToTag["GwOps"]);
|
||||||
|
Assert.Equal(["team-a"], dashboard.GroupToTag["GwViewers"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The map's case-insensitive lookup survives the projection. LDAP group names arrive in
|
||||||
|
/// whatever case the directory returns them, so a projection that rebuilt the dictionary with
|
||||||
|
/// the default ordinal comparer would silently stop matching.
|
||||||
|
/// </summary>
|
||||||
|
[Fact]
|
||||||
|
public void GetEffectiveConfiguration_KeepsGroupToTagLookupCaseInsensitive()
|
||||||
|
{
|
||||||
|
GatewayOptions options = new()
|
||||||
|
{
|
||||||
|
Dashboard = new DashboardOptions
|
||||||
|
{
|
||||||
|
GroupToTag = new Dictionary<string, string[]>(StringComparer.OrdinalIgnoreCase)
|
||||||
|
{
|
||||||
|
["GwOps"] = ["team-a"],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
EffectiveDashboardConfiguration dashboard = Project(options).Dashboard;
|
||||||
|
|
||||||
|
Assert.True(dashboard.GroupToTag.ContainsKey("gwops"));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// An unconfigured map projects as empty rather than null — the settings page renders the row
|
||||||
|
/// either way, and "none configured" is the operationally interesting answer.
|
||||||
|
/// </summary>
|
||||||
|
[Fact]
|
||||||
|
public void GetEffectiveConfiguration_WhenNoTagsConfigured_ProjectsEmptyMapping()
|
||||||
|
{
|
||||||
|
EffectiveDashboardConfiguration dashboard = Project(new GatewayOptions()).Dashboard;
|
||||||
|
|
||||||
|
Assert.Empty(dashboard.GroupToTag);
|
||||||
|
Assert.Empty(dashboard.GroupToRole);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>The untagged-session visibility policy is projected, defaulting to the fail-closed value.</summary>
|
||||||
|
[Fact]
|
||||||
|
public void GetEffectiveConfiguration_CopiesUntaggedSessionVisibility()
|
||||||
|
{
|
||||||
|
Assert.Equal(
|
||||||
|
UntaggedSessionVisibility.AdminOnly,
|
||||||
|
Project(new GatewayOptions()).Dashboard.UntaggedSessionVisibility);
|
||||||
|
|
||||||
|
GatewayOptions widened = new()
|
||||||
|
{
|
||||||
|
Dashboard = new DashboardOptions
|
||||||
|
{
|
||||||
|
UntaggedSessionVisibility = UntaggedSessionVisibility.AllViewers,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
Assert.Equal(
|
||||||
|
UntaggedSessionVisibility.AllViewers,
|
||||||
|
Project(widened).Dashboard.UntaggedSessionVisibility);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>The pre-existing dashboard members keep coming from the options they always did.</summary>
|
||||||
|
[Fact]
|
||||||
|
public void GetEffectiveConfiguration_CopiesTheOtherDashboardMembers()
|
||||||
|
{
|
||||||
|
GatewayOptions options = new()
|
||||||
|
{
|
||||||
|
Dashboard = new DashboardOptions
|
||||||
|
{
|
||||||
|
Enabled = false,
|
||||||
|
AllowAnonymousLocalhost = false,
|
||||||
|
SnapshotIntervalMilliseconds = 2_500,
|
||||||
|
RecentFaultLimit = 7,
|
||||||
|
RecentSessionLimit = 11,
|
||||||
|
ShowTagValues = true,
|
||||||
|
GroupToRole = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
|
||||||
|
{
|
||||||
|
["GwAdmins"] = "Administrator",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
EffectiveDashboardConfiguration dashboard = Project(options).Dashboard;
|
||||||
|
|
||||||
|
Assert.False(dashboard.Enabled);
|
||||||
|
Assert.False(dashboard.AllowAnonymousLocalhost);
|
||||||
|
Assert.Equal(2_500, dashboard.SnapshotIntervalMilliseconds);
|
||||||
|
Assert.Equal(7, dashboard.RecentFaultLimit);
|
||||||
|
Assert.Equal(11, dashboard.RecentSessionLimit);
|
||||||
|
Assert.True(dashboard.ShowTagValues);
|
||||||
|
Assert.Equal("Administrator", dashboard.GroupToRole["GwAdmins"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The masking boundary. Only the pepper name and the LDAP bind password are redacted; the
|
||||||
|
/// tag mapping is configuration, not a secret, so masking it would hide the very thing the
|
||||||
|
/// settings page was extended to show.
|
||||||
|
/// </summary>
|
||||||
|
[Fact]
|
||||||
|
public void GetEffectiveConfiguration_RedactsOnlyTheSecretBearingMembers()
|
||||||
|
{
|
||||||
|
GatewayOptions options = new()
|
||||||
|
{
|
||||||
|
Ldap = new LdapOptions { ServiceAccountPassword = "bind-password" },
|
||||||
|
Dashboard = new DashboardOptions
|
||||||
|
{
|
||||||
|
GroupToTag = new Dictionary<string, string[]>(StringComparer.OrdinalIgnoreCase)
|
||||||
|
{
|
||||||
|
["GwOps"] = ["team-a"],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
EffectiveGatewayConfiguration configuration = Project(options);
|
||||||
|
|
||||||
|
Assert.Equal(GatewayConfigurationProvider.RedactedValue, configuration.Authentication.PepperSecretName);
|
||||||
|
Assert.Equal(GatewayConfigurationProvider.RedactedValue, configuration.Ldap.ServiceAccountPassword);
|
||||||
|
Assert.Equal(["team-a"], configuration.Dashboard.GroupToTag["GwOps"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static EffectiveGatewayConfiguration Project(GatewayOptions options) =>
|
||||||
|
new GatewayConfigurationProvider(Options.Create(options)).GetEffectiveConfiguration();
|
||||||
|
}
|
||||||
@@ -0,0 +1,358 @@
|
|||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Security.Claims;
|
||||||
|
using Microsoft.AspNetCore.Components;
|
||||||
|
using Microsoft.AspNetCore.Components.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Components.HtmlRendering.Infrastructure;
|
||||||
|
using Microsoft.AspNetCore.Components.Web.HtmlRendering;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using ZB.MOM.WW.MxGateway.Server.Dashboard;
|
||||||
|
using ZB.MOM.WW.MxGateway.Server.Dashboard.Components.Pages;
|
||||||
|
using ZB.MOM.WW.MxGateway.Server.Security.Authentication;
|
||||||
|
|
||||||
|
namespace ZB.MOM.WW.MxGateway.Tests.Dashboard;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Covers <c>dashboard_tags</c> on the dashboard API Keys page: the constraints
|
||||||
|
/// column must name it, and the create form must be able to set it.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// <para>
|
||||||
|
/// The column mattered first. <c>ApiKeyConstraints.IsEmpty</c> counts
|
||||||
|
/// <c>DashboardTags</c>, so a key whose only per-key policy is a dashboard tag is
|
||||||
|
/// <em>not</em> unconstrained — but the page's summary enumerated only the eight
|
||||||
|
/// positional members, produced an empty string, and rendered it as <c>-</c>. An
|
||||||
|
/// operator auditing keys saw the same cell for "no policy recorded" and "scoped to
|
||||||
|
/// team-a", which is the reading a tag grant can least afford.
|
||||||
|
/// </para>
|
||||||
|
/// <para>
|
||||||
|
/// Rendered through the framework's static rendering infrastructure, the idiom
|
||||||
|
/// <c>AlarmsPageTruncationBannerTests</c> and <c>SessionDetailsPageEventAclTests</c>
|
||||||
|
/// use — the assertions are about emitted markup, so no component-testing package is
|
||||||
|
/// warranted.
|
||||||
|
/// </para>
|
||||||
|
/// </remarks>
|
||||||
|
public sealed class ApiKeysPageDashboardTagsTests
|
||||||
|
{
|
||||||
|
// Deliberately free of the words the assertions search for: a key id containing
|
||||||
|
// "unconstrained" would be counted as a summary and mask a regression in the cell.
|
||||||
|
private const string TagsOnlyKeyId = "key-tagged";
|
||||||
|
private const string UnconstrainedKeyId = "key-plain";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A key whose only constraint is a dashboard tag names the tags in its constraints
|
||||||
|
/// cell. Before the fix this cell read <c>-</c>.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||||
|
[Fact]
|
||||||
|
public async Task ApiKeysPage_WhenKeyOnlyHasDashboardTags_NamesThemInTheConstraintsColumn()
|
||||||
|
{
|
||||||
|
string html = await RenderAsync(openCreateDialog: false);
|
||||||
|
|
||||||
|
Assert.Contains("dashboard_tags=[team-a, team-b]", html, StringComparison.Ordinal);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The control for the assertion above: a key with genuinely no constraints must still
|
||||||
|
/// read <c>unconstrained</c>, and only that key may. Without this, a summary that
|
||||||
|
/// labelled every key would satisfy the positive case while erasing the distinction the
|
||||||
|
/// column exists to draw.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||||
|
[Fact]
|
||||||
|
public async Task ApiKeysPage_WhenKeyHasNoConstraints_StillReadsUnconstrained()
|
||||||
|
{
|
||||||
|
string html = await RenderAsync(openCreateDialog: false);
|
||||||
|
|
||||||
|
Assert.Contains(UnconstrainedKeyId, html, StringComparison.Ordinal);
|
||||||
|
Assert.Contains("unconstrained", html, StringComparison.Ordinal);
|
||||||
|
|
||||||
|
// Exactly one row may claim it — the tags-only key is constrained, by IsEmpty's own reckoning.
|
||||||
|
Assert.Equal(1, CountOccurrences(html, "unconstrained"));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The create form offers a dashboard-tags field, so a tagged key can be minted from the
|
||||||
|
/// dashboard rather than only from the <c>apikey</c> CLI.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||||
|
[Fact]
|
||||||
|
public async Task ApiKeysPage_CreateForm_OffersADashboardTagsField()
|
||||||
|
{
|
||||||
|
string html = await RenderAsync(openCreateDialog: true);
|
||||||
|
|
||||||
|
// The sibling constraint field is the control: it proves the form rendered at all, so a
|
||||||
|
// dialog that failed to open could not pass this by rendering nothing.
|
||||||
|
Assert.Contains("id=\"readSubtrees\"", html, StringComparison.Ordinal);
|
||||||
|
Assert.Contains("id=\"dashboardTags\"", html, StringComparison.Ordinal);
|
||||||
|
Assert.Contains("Dashboard tags", html, StringComparison.Ordinal);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The field is wired through to the request, not merely displayed: the CLI's comma
|
||||||
|
/// separation is honoured and each tag is trimmed.
|
||||||
|
/// </summary>
|
||||||
|
[Fact]
|
||||||
|
public void TryBuildCreateRequest_CarriesTheDashboardTagsField()
|
||||||
|
{
|
||||||
|
ApiKeysPage page = new();
|
||||||
|
page.CreateModel.DashboardTags = "team-a, team-b";
|
||||||
|
|
||||||
|
bool built = page.TryBuildCreateRequest(out DashboardApiKeyManagementRequest? request, out string? error);
|
||||||
|
|
||||||
|
Assert.True(built, error);
|
||||||
|
Assert.NotNull(request);
|
||||||
|
Assert.Equal(["team-a", "team-b"], request.Constraints.DashboardTags);
|
||||||
|
|
||||||
|
// Nothing else may be inferred from a tags-only form: dashboard tags are a visibility
|
||||||
|
// grant, and turning one into a data-access constraint would be a silent policy change.
|
||||||
|
Assert.False(request.Constraints.IsEmpty);
|
||||||
|
Assert.False(request.Constraints.HasReadConstraints);
|
||||||
|
Assert.False(request.Constraints.HasWriteConstraints);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Two spellings of one tag persist as one grant, matching how
|
||||||
|
/// <c>ApiKeyAdminCommandLineParser.ParseDashboardTags</c> collapses them and how the
|
||||||
|
/// enforcement site compares them.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Enforcement would survive the duplicate — a session holds its tags in a
|
||||||
|
/// case-insensitive set — but the API Keys page's constraints column would render
|
||||||
|
/// <c>dashboard_tags=[team-a, TEAM-A]</c> and report one grant as two, which is the
|
||||||
|
/// reading an audit surface can least afford.
|
||||||
|
/// </remarks>
|
||||||
|
[Fact]
|
||||||
|
public void TryBuildCreateRequest_DeduplicatesDashboardTagsIgnoringCase()
|
||||||
|
{
|
||||||
|
ApiKeysPage page = new();
|
||||||
|
page.CreateModel.DashboardTags = "team-a, TEAM-A, team-a";
|
||||||
|
|
||||||
|
bool built = page.TryBuildCreateRequest(out DashboardApiKeyManagementRequest? request, out string? error);
|
||||||
|
|
||||||
|
Assert.True(built, error);
|
||||||
|
Assert.NotNull(request);
|
||||||
|
|
||||||
|
// First spelling typed wins, so what the operator wrote is what the audit surface shows.
|
||||||
|
Assert.Equal(["team-a"], request.Constraints.DashboardTags);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A dedupe that spanned fields would be a bug of its own: the five glob lists are matched
|
||||||
|
/// literally, so near-duplicates there are not necessarily the same rule and must survive
|
||||||
|
/// verbatim.
|
||||||
|
/// </summary>
|
||||||
|
[Fact]
|
||||||
|
public void TryBuildCreateRequest_DoesNotDeduplicateTheOtherConstraintLists()
|
||||||
|
{
|
||||||
|
ApiKeysPage page = new();
|
||||||
|
page.CreateModel.ReadSubtrees = "Area1, AREA1";
|
||||||
|
|
||||||
|
bool built = page.TryBuildCreateRequest(out DashboardApiKeyManagementRequest? request, out string? error);
|
||||||
|
|
||||||
|
Assert.True(built, error);
|
||||||
|
Assert.NotNull(request);
|
||||||
|
Assert.Equal(["Area1", "AREA1"], request.Constraints.ReadSubtrees);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <c>Reset</c> clears the new field, so the next key minted in the same dialog does not
|
||||||
|
/// inherit the previous key's tag grant.
|
||||||
|
/// </summary>
|
||||||
|
[Fact]
|
||||||
|
public void Reset_ClearsDashboardTagsAlongsideTheOtherConstraintFields()
|
||||||
|
{
|
||||||
|
ApiKeysPage page = new();
|
||||||
|
page.CreateModel.DashboardTags = "team-a";
|
||||||
|
|
||||||
|
// A sibling field pins the assertion to Reset itself: were Reset a no-op, both would
|
||||||
|
// survive and the failure would name the method rather than the one line.
|
||||||
|
page.CreateModel.ReadSubtrees = "Area1";
|
||||||
|
page.CreateModel.KeyId = "leftover";
|
||||||
|
|
||||||
|
page.CreateModel.Reset();
|
||||||
|
|
||||||
|
Assert.Equal(string.Empty, page.CreateModel.DashboardTags);
|
||||||
|
Assert.Equal(string.Empty, page.CreateModel.ReadSubtrees);
|
||||||
|
Assert.Equal(string.Empty, page.CreateModel.KeyId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>An empty field leaves the key untagged rather than inventing a tag.</summary>
|
||||||
|
[Fact]
|
||||||
|
public void TryBuildCreateRequest_WhenDashboardTagsIsBlank_LeavesTheKeyUntagged()
|
||||||
|
{
|
||||||
|
ApiKeysPage page = new();
|
||||||
|
|
||||||
|
bool built = page.TryBuildCreateRequest(out DashboardApiKeyManagementRequest? request, out string? error);
|
||||||
|
|
||||||
|
Assert.True(built, error);
|
||||||
|
Assert.NotNull(request);
|
||||||
|
Assert.Empty(request.Constraints.DashboardTags);
|
||||||
|
Assert.True(request.Constraints.IsEmpty);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static int CountOccurrences(string haystack, string needle)
|
||||||
|
{
|
||||||
|
int count = 0;
|
||||||
|
int index = haystack.IndexOf(needle, StringComparison.Ordinal);
|
||||||
|
while (index >= 0)
|
||||||
|
{
|
||||||
|
count++;
|
||||||
|
index = haystack.IndexOf(needle, index + needle.Length, StringComparison.Ordinal);
|
||||||
|
}
|
||||||
|
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static async Task<string> RenderAsync(bool openCreateDialog)
|
||||||
|
{
|
||||||
|
ServiceCollection services = new();
|
||||||
|
services.AddLogging();
|
||||||
|
services.AddSingleton<IDashboardSnapshotService>(new StubSnapshotService());
|
||||||
|
services.AddSingleton<IDashboardSnapshotFeed>(new IdleSnapshotFeed());
|
||||||
|
services.AddSingleton<IDashboardApiKeyManagementService>(new ManagingApiKeyService());
|
||||||
|
services.AddSingleton<AuthenticationStateProvider>(new StubAuthenticationStateProvider());
|
||||||
|
|
||||||
|
await using ServiceProvider provider = services.BuildServiceProvider();
|
||||||
|
await using InstanceMountingHtmlRenderer renderer = new(
|
||||||
|
provider,
|
||||||
|
provider.GetRequiredService<ILoggerFactory>());
|
||||||
|
|
||||||
|
return await renderer.Dispatcher.InvokeAsync(async () =>
|
||||||
|
{
|
||||||
|
ApiKeysPage page = renderer.CreateComponent<ApiKeysPage>();
|
||||||
|
if (openCreateDialog)
|
||||||
|
{
|
||||||
|
page.OpenCreateDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
HtmlRootComponent output = renderer.BeginRenderingComponent(page, ParameterView.Empty);
|
||||||
|
await output.QuiescenceTask;
|
||||||
|
|
||||||
|
return output.ToHtmlString();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// The create form lives behind a click, and static rendering has no way to dispatch one, so
|
||||||
|
// the dialog is opened on the instance before it is handed to the renderer. Reaching a
|
||||||
|
// pre-built instance needs Renderer.InstantiateComponent (which is what performs [Inject]
|
||||||
|
// property injection); the sealed HtmlRenderer used by the sibling tests exposes no such seam,
|
||||||
|
// so this subclasses the same static-rendering infrastructure HtmlRenderer itself wraps.
|
||||||
|
//
|
||||||
|
// BL0006 warns that RenderTree types are not for use outside the Blazor framework. Suppressed
|
||||||
|
// here and only here, exactly as SessionDetailsPageEventAclTests does: this is test-only
|
||||||
|
// scaffolding that never ships, and the cost of the warning coming true is a compile break in
|
||||||
|
// one test file on an SDK bump. Production code must keep honouring BL0006.
|
||||||
|
#pragma warning disable BL0006
|
||||||
|
private sealed class InstanceMountingHtmlRenderer(IServiceProvider services, ILoggerFactory loggerFactory)
|
||||||
|
: StaticHtmlRenderer(services, loggerFactory)
|
||||||
|
{
|
||||||
|
/// <summary>Instantiates a component with its <c>[Inject]</c> properties resolved.</summary>
|
||||||
|
/// <typeparam name="TComponent">Component type to create.</typeparam>
|
||||||
|
/// <returns>The component instance, not yet attached to the renderer.</returns>
|
||||||
|
public TComponent CreateComponent<TComponent>()
|
||||||
|
where TComponent : IComponent =>
|
||||||
|
(TComponent)InstantiateComponent(typeof(TComponent));
|
||||||
|
}
|
||||||
|
#pragma warning restore BL0006
|
||||||
|
|
||||||
|
private sealed class StubSnapshotService : IDashboardSnapshotService
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public DashboardSnapshot GetSnapshot() => new(
|
||||||
|
GeneratedAt: DateTimeOffset.UnixEpoch,
|
||||||
|
GatewayStartedAt: DateTimeOffset.UnixEpoch,
|
||||||
|
GatewayUptime: TimeSpan.Zero,
|
||||||
|
GatewayStatus: "Healthy",
|
||||||
|
GatewayVersion: "test",
|
||||||
|
Sessions: [],
|
||||||
|
Workers: [],
|
||||||
|
Metrics: [],
|
||||||
|
Faults: [],
|
||||||
|
ApiKeys:
|
||||||
|
[
|
||||||
|
new DashboardApiKeySummary(
|
||||||
|
KeyId: TagsOnlyKeyId,
|
||||||
|
DisplayName: "Tags only",
|
||||||
|
Scopes: new HashSet<string>(StringComparer.Ordinal),
|
||||||
|
Constraints: ApiKeyConstraints.Empty with { DashboardTags = ["team-a", "team-b"] },
|
||||||
|
CreatedUtc: DateTimeOffset.UnixEpoch,
|
||||||
|
LastUsedUtc: null,
|
||||||
|
RevokedUtc: null),
|
||||||
|
new DashboardApiKeySummary(
|
||||||
|
KeyId: UnconstrainedKeyId,
|
||||||
|
DisplayName: "Unconstrained",
|
||||||
|
Scopes: new HashSet<string>(StringComparer.Ordinal),
|
||||||
|
Constraints: ApiKeyConstraints.Empty,
|
||||||
|
CreatedUtc: DateTimeOffset.UnixEpoch,
|
||||||
|
LastUsedUtc: null,
|
||||||
|
RevokedUtc: null),
|
||||||
|
],
|
||||||
|
Configuration: null!,
|
||||||
|
Galaxy: null!);
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public IAsyncEnumerable<DashboardSnapshot> WatchSnapshotsAsync(CancellationToken cancellationToken) =>
|
||||||
|
new IdleSnapshotFeed().WatchAsync(cancellationToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Parks until the page is disposed, so the base page's watch loop neither spins nor pushes a
|
||||||
|
// second snapshot mid-render.
|
||||||
|
private sealed class IdleSnapshotFeed : IDashboardSnapshotFeed
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public async IAsyncEnumerable<DashboardSnapshot> WatchAsync(
|
||||||
|
[EnumeratorCancellation] CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
await Task.Delay(Timeout.Infinite, cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
|
yield break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Grants management so the create dialog is reachable; no test here exercises a mutation.
|
||||||
|
private sealed class ManagingApiKeyService : IDashboardApiKeyManagementService
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public bool CanManage(ClaimsPrincipal user) => true;
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public Task<DashboardApiKeyManagementResult> CreateAsync(
|
||||||
|
ClaimsPrincipal user,
|
||||||
|
DashboardApiKeyManagementRequest request,
|
||||||
|
CancellationToken cancellationToken) =>
|
||||||
|
Task.FromResult(DashboardApiKeyManagementResult.Fail("not exercised"));
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public Task<DashboardApiKeyManagementResult> RevokeAsync(
|
||||||
|
ClaimsPrincipal user,
|
||||||
|
string keyId,
|
||||||
|
CancellationToken cancellationToken) =>
|
||||||
|
Task.FromResult(DashboardApiKeyManagementResult.Fail("not exercised"));
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public Task<DashboardApiKeyManagementResult> RotateAsync(
|
||||||
|
ClaimsPrincipal user,
|
||||||
|
string keyId,
|
||||||
|
CancellationToken cancellationToken) =>
|
||||||
|
Task.FromResult(DashboardApiKeyManagementResult.Fail("not exercised"));
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public Task<DashboardApiKeyManagementResult> DeleteAsync(
|
||||||
|
ClaimsPrincipal user,
|
||||||
|
string keyId,
|
||||||
|
CancellationToken cancellationToken) =>
|
||||||
|
Task.FromResult(DashboardApiKeyManagementResult.Fail("not exercised"));
|
||||||
|
}
|
||||||
|
|
||||||
|
private sealed class StubAuthenticationStateProvider : AuthenticationStateProvider
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override Task<AuthenticationState> GetAuthenticationStateAsync() =>
|
||||||
|
Task.FromResult(new AuthenticationState(new ClaimsPrincipal(new ClaimsIdentity(
|
||||||
|
[new Claim(ClaimTypes.Name, "admin-user"), new Claim(ClaimTypes.Role, DashboardRoles.Admin)],
|
||||||
|
authenticationType: "test",
|
||||||
|
nameType: ClaimTypes.Name,
|
||||||
|
roleType: ClaimTypes.Role))));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,136 @@
|
|||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using Microsoft.AspNetCore.Components.Web.HtmlRendering;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
using ZB.MOM.WW.MxGateway.Server.Configuration;
|
||||||
|
using ZB.MOM.WW.MxGateway.Server.Dashboard;
|
||||||
|
using ZB.MOM.WW.MxGateway.Server.Dashboard.Components.Pages;
|
||||||
|
using HtmlRenderer = Microsoft.AspNetCore.Components.Web.HtmlRenderer;
|
||||||
|
|
||||||
|
namespace ZB.MOM.WW.MxGateway.Tests.Dashboard;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Renders <see cref="SettingsPage"/> and asserts the two SEC-25 dashboard-ACL options —
|
||||||
|
/// <c>Dashboard:GroupToTag</c> and <c>Dashboard:UntaggedSessionVisibility</c> — reach the page.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// <para>
|
||||||
|
/// The provider tests one folder over prove the projection carries the values; they would stay
|
||||||
|
/// green with no row on the page at all. An operator debugging why a Viewer sees no sessions
|
||||||
|
/// reads the settings page, not the record, so the markup is where the evidence has to be.
|
||||||
|
/// </para>
|
||||||
|
/// <para>
|
||||||
|
/// Tag NAMES are configuration, like the group → role mapping rendered beside them. No tag VALUE
|
||||||
|
/// is involved, so nothing here is subject to the value-redaction rule.
|
||||||
|
/// </para>
|
||||||
|
/// <para>
|
||||||
|
/// Static rendering via the framework's <see cref="HtmlRenderer"/>, the idiom used by
|
||||||
|
/// <c>SecretsNavRenderTests</c> and <c>AlarmsPageTruncationBannerTests</c> — the assertion is
|
||||||
|
/// about markup the server emits, so no component-testing dependency is warranted.
|
||||||
|
/// </para>
|
||||||
|
/// </remarks>
|
||||||
|
public sealed class SettingsPageTagVisibilityRenderTests
|
||||||
|
{
|
||||||
|
private const string EmptyMarker = "(none configured)";
|
||||||
|
|
||||||
|
/// <summary>A configured mapping renders its group and every tag, plus the visibility policy.</summary>
|
||||||
|
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||||
|
[Fact]
|
||||||
|
public async Task SettingsPage_WhenTagsConfigured_RendersGroupsTagsAndVisibility()
|
||||||
|
{
|
||||||
|
string html = await RenderAsync(new DashboardOptions
|
||||||
|
{
|
||||||
|
GroupToTag = new Dictionary<string, string[]>(StringComparer.OrdinalIgnoreCase)
|
||||||
|
{
|
||||||
|
["GwOps"] = ["team-a", "team-b"],
|
||||||
|
},
|
||||||
|
UntaggedSessionVisibility = UntaggedSessionVisibility.AllViewers,
|
||||||
|
});
|
||||||
|
|
||||||
|
Assert.Contains("GwOps", html, StringComparison.Ordinal);
|
||||||
|
// Both tags, not just the first: a row that rendered only the head of the array would be
|
||||||
|
// actively misleading about which sessions a group can observe.
|
||||||
|
Assert.Contains("team-a", html, StringComparison.Ordinal);
|
||||||
|
Assert.Contains("team-b", html, StringComparison.Ordinal);
|
||||||
|
Assert.Contains(nameof(UntaggedSessionVisibility.AllViewers), html, StringComparison.Ordinal);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The unconfigured deployment — the common one, and the one whose Viewers see nothing. The
|
||||||
|
/// row must still render, saying so, and the fail-closed default must be on the page. The
|
||||||
|
/// role-mapping heading is the control that keeps this from passing over a blank page.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||||
|
[Fact]
|
||||||
|
public async Task SettingsPage_WhenNoTagsConfigured_RendersTheEmptyStateAndDefaultVisibility()
|
||||||
|
{
|
||||||
|
string html = await RenderAsync(new DashboardOptions());
|
||||||
|
|
||||||
|
Assert.Contains("Dashboard tag mapping", html, StringComparison.Ordinal);
|
||||||
|
Assert.Contains(EmptyMarker, html, StringComparison.Ordinal);
|
||||||
|
Assert.Contains(nameof(UntaggedSessionVisibility.AdminOnly), html, StringComparison.Ordinal);
|
||||||
|
Assert.Contains("Dashboard role mapping", html, StringComparison.Ordinal);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static async Task<string> RenderAsync(DashboardOptions dashboard)
|
||||||
|
{
|
||||||
|
EffectiveGatewayConfiguration configuration =
|
||||||
|
new GatewayConfigurationProvider(Options.Create(new GatewayOptions { Dashboard = dashboard }))
|
||||||
|
.GetEffectiveConfiguration();
|
||||||
|
|
||||||
|
ServiceCollection services = new();
|
||||||
|
services.AddLogging();
|
||||||
|
services.AddSingleton<IDashboardSnapshotService>(new StubSnapshotService(configuration));
|
||||||
|
services.AddSingleton<IDashboardSnapshotFeed>(new IdleSnapshotFeed());
|
||||||
|
|
||||||
|
await using ServiceProvider provider = services.BuildServiceProvider();
|
||||||
|
await using HtmlRenderer renderer = new(
|
||||||
|
provider,
|
||||||
|
provider.GetRequiredService<ILoggerFactory>());
|
||||||
|
|
||||||
|
return await renderer.Dispatcher.InvokeAsync(async () =>
|
||||||
|
{
|
||||||
|
HtmlRootComponent output = await renderer.RenderComponentAsync<SettingsPage>();
|
||||||
|
return output.ToHtmlString();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Seeds the page's first (and only) render. Everything except Configuration is inert here.
|
||||||
|
private sealed class StubSnapshotService(EffectiveGatewayConfiguration configuration)
|
||||||
|
: IDashboardSnapshotService
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public DashboardSnapshot GetSnapshot() => new(
|
||||||
|
GeneratedAt: DateTimeOffset.UnixEpoch,
|
||||||
|
GatewayStartedAt: DateTimeOffset.UnixEpoch,
|
||||||
|
GatewayUptime: TimeSpan.Zero,
|
||||||
|
GatewayStatus: "Healthy",
|
||||||
|
GatewayVersion: "test",
|
||||||
|
Sessions: [],
|
||||||
|
Workers: [],
|
||||||
|
Metrics: [],
|
||||||
|
Faults: [],
|
||||||
|
ApiKeys: [],
|
||||||
|
Configuration: configuration,
|
||||||
|
Galaxy: null!);
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public IAsyncEnumerable<DashboardSnapshot> WatchSnapshotsAsync(CancellationToken cancellationToken) =>
|
||||||
|
new IdleSnapshotFeed().WatchAsync(cancellationToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Parks until the page is disposed, so the base page's watch loop neither spins nor pushes a
|
||||||
|
// second snapshot mid-assertion.
|
||||||
|
private sealed class IdleSnapshotFeed : IDashboardSnapshotFeed
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public async IAsyncEnumerable<DashboardSnapshot> WatchAsync(
|
||||||
|
[EnumeratorCancellation] CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
await Task.Delay(Timeout.Infinite, cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
|
yield break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,351 @@
|
|||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using Microsoft.AspNetCore.SignalR;
|
||||||
|
using Microsoft.Extensions.Logging.Abstractions;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
using ZB.MOM.WW.MxGateway.Contracts.Proto;
|
||||||
|
using ZB.MOM.WW.MxGateway.Server.Alarms;
|
||||||
|
using ZB.MOM.WW.MxGateway.Server.Configuration;
|
||||||
|
using ZB.MOM.WW.MxGateway.Server.Dashboard.Hubs;
|
||||||
|
|
||||||
|
namespace ZB.MOM.WW.MxGateway.Tests.Gateway.Dashboard;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Verifies that <see cref="AlarmsHubPublisher"/> honours
|
||||||
|
/// <c>MxGateway:Dashboard:ShowTagValues</c> (TST-16): the alarm value fields of
|
||||||
|
/// both value-bearing payload arms are stripped from the copy broadcast to
|
||||||
|
/// browser clients when the flag is off, present when it is on, and the source
|
||||||
|
/// <see cref="AlarmFeedMessage"/> — shared with the gRPC <c>StreamAlarms</c>
|
||||||
|
/// subscribers and the alarms page — is never mutated.
|
||||||
|
/// </summary>
|
||||||
|
public sealed class AlarmsHubPublisherTests
|
||||||
|
{
|
||||||
|
private static readonly TimeSpan TestTimeout = TimeSpan.FromSeconds(5);
|
||||||
|
|
||||||
|
/// <summary>Both value-bearing arms lose their values when the flag is off; metadata survives.</summary>
|
||||||
|
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||||
|
[Fact]
|
||||||
|
public async Task ExecuteAsync_WhenShowTagValuesFalse_RedactsBothArmsButKeepsMetadata()
|
||||||
|
{
|
||||||
|
AlarmFeedMessage transition = BuildTransition();
|
||||||
|
AlarmFeedMessage activeAlarm = BuildActiveAlarm();
|
||||||
|
CapturingHubContext hubContext = await RunPublisherAsync(
|
||||||
|
showTagValues: false,
|
||||||
|
transition,
|
||||||
|
activeAlarm);
|
||||||
|
|
||||||
|
Assert.Equal(2, hubContext.Sent.Count);
|
||||||
|
|
||||||
|
AlarmFeedMessage sentTransition = hubContext.Sent[0];
|
||||||
|
Assert.Null(sentTransition.Transition.CurrentValue);
|
||||||
|
Assert.Null(sentTransition.Transition.LimitValue);
|
||||||
|
Assert.Equal("Tank01.Level.HiHi", sentTransition.Transition.AlarmFullReference);
|
||||||
|
Assert.Equal("Tank01", sentTransition.Transition.SourceObjectReference);
|
||||||
|
Assert.Equal(AlarmTransitionKind.Raise, sentTransition.Transition.TransitionKind);
|
||||||
|
Assert.Equal(800, sentTransition.Transition.Severity);
|
||||||
|
Assert.Equal("Process", sentTransition.Transition.Category);
|
||||||
|
|
||||||
|
AlarmFeedMessage sentActive = hubContext.Sent[1];
|
||||||
|
Assert.Null(sentActive.ActiveAlarm.CurrentValue);
|
||||||
|
Assert.Null(sentActive.ActiveAlarm.LimitValue);
|
||||||
|
Assert.Equal("Tank02.Level.Lo", sentActive.ActiveAlarm.AlarmFullReference);
|
||||||
|
Assert.Equal(AlarmConditionState.Active, sentActive.ActiveAlarm.CurrentState);
|
||||||
|
Assert.Equal(500, sentActive.ActiveAlarm.Severity);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Redaction applies to a clone: the source message fans out to gRPC
|
||||||
|
/// <c>StreamAlarms</c> subscribers and the alarms page, so it must keep its
|
||||||
|
/// values.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||||
|
[Fact]
|
||||||
|
public async Task ExecuteAsync_WhenShowTagValuesFalse_DoesNotMutateSourceMessage()
|
||||||
|
{
|
||||||
|
AlarmFeedMessage transition = BuildTransition();
|
||||||
|
AlarmFeedMessage activeAlarm = BuildActiveAlarm();
|
||||||
|
CapturingHubContext hubContext = await RunPublisherAsync(
|
||||||
|
showTagValues: false,
|
||||||
|
transition,
|
||||||
|
activeAlarm);
|
||||||
|
|
||||||
|
Assert.NotNull(transition.Transition.CurrentValue);
|
||||||
|
Assert.Equal(88.0, transition.Transition.CurrentValue.DoubleValue);
|
||||||
|
Assert.NotNull(transition.Transition.LimitValue);
|
||||||
|
Assert.NotNull(activeAlarm.ActiveAlarm.CurrentValue);
|
||||||
|
Assert.Equal(12.5, activeAlarm.ActiveAlarm.CurrentValue.DoubleValue);
|
||||||
|
Assert.NotNull(activeAlarm.ActiveAlarm.LimitValue);
|
||||||
|
|
||||||
|
Assert.NotSame(transition, hubContext.Sent[0]);
|
||||||
|
Assert.NotSame(activeAlarm, hubContext.Sent[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Values pass through unredacted — and uncloned — when the flag is on.</summary>
|
||||||
|
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||||
|
[Fact]
|
||||||
|
public async Task ExecuteAsync_WhenShowTagValuesTrue_KeepsValues()
|
||||||
|
{
|
||||||
|
AlarmFeedMessage transition = BuildTransition();
|
||||||
|
AlarmFeedMessage activeAlarm = BuildActiveAlarm();
|
||||||
|
CapturingHubContext hubContext = await RunPublisherAsync(
|
||||||
|
showTagValues: true,
|
||||||
|
transition,
|
||||||
|
activeAlarm);
|
||||||
|
|
||||||
|
Assert.Same(transition, hubContext.Sent[0]);
|
||||||
|
Assert.Same(activeAlarm, hubContext.Sent[1]);
|
||||||
|
Assert.Equal(88.0, hubContext.Sent[0].Transition.CurrentValue.DoubleValue);
|
||||||
|
Assert.Equal(90.0, hubContext.Sent[0].Transition.LimitValue.DoubleValue);
|
||||||
|
Assert.Equal(12.5, hubContext.Sent[1].ActiveAlarm.CurrentValue.DoubleValue);
|
||||||
|
Assert.Equal(10.0, hubContext.Sent[1].ActiveAlarm.LimitValue.DoubleValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A payload arm that carries no value is forwarded as-is — the same
|
||||||
|
/// instance, no clone. This is also the contract for arms added later: the
|
||||||
|
/// switch names only the value-bearing arms, so a new arm passes through.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||||
|
[Fact]
|
||||||
|
public async Task ExecuteAsync_WithValuelessPayloads_ForwardsThemUntouched()
|
||||||
|
{
|
||||||
|
AlarmFeedMessage snapshotComplete = new() { SnapshotComplete = true };
|
||||||
|
AlarmFeedMessage providerStatus = new()
|
||||||
|
{
|
||||||
|
ProviderStatus = new AlarmProviderStatus
|
||||||
|
{
|
||||||
|
Mode = AlarmProviderMode.Subtag,
|
||||||
|
Degraded = true,
|
||||||
|
Reason = "alarmmgr unavailable",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
AlarmFeedMessage snapshotStatus = new()
|
||||||
|
{
|
||||||
|
SnapshotStatus = new AlarmSnapshotStatus { Truncated = true },
|
||||||
|
};
|
||||||
|
|
||||||
|
CapturingHubContext hubContext = await RunPublisherAsync(
|
||||||
|
showTagValues: false,
|
||||||
|
snapshotComplete,
|
||||||
|
providerStatus,
|
||||||
|
snapshotStatus);
|
||||||
|
|
||||||
|
Assert.Same(snapshotComplete, hubContext.Sent[0]);
|
||||||
|
Assert.Same(providerStatus, hubContext.Sent[1]);
|
||||||
|
Assert.Same(snapshotStatus, hubContext.Sent[2]);
|
||||||
|
Assert.True(hubContext.Sent[2].SnapshotStatus.Truncated);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Starts the publisher over a scripted feed, waits until every scripted
|
||||||
|
/// message has been broadcast, and stops it.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="showTagValues">The <c>Dashboard:ShowTagValues</c> value under test.</param>
|
||||||
|
/// <param name="messages">The messages the fake alarm feed yields, in order.</param>
|
||||||
|
/// <returns>The hub context holding everything the publisher sent.</returns>
|
||||||
|
private static async Task<CapturingHubContext> RunPublisherAsync(
|
||||||
|
bool showTagValues,
|
||||||
|
params AlarmFeedMessage[] messages)
|
||||||
|
{
|
||||||
|
ScriptedAlarmService alarmService = new(messages);
|
||||||
|
CapturingHubContext hubContext = new();
|
||||||
|
GatewayOptions gatewayOptions = new()
|
||||||
|
{
|
||||||
|
Dashboard = new DashboardOptions { ShowTagValues = showTagValues },
|
||||||
|
};
|
||||||
|
|
||||||
|
AlarmsHubPublisher publisher = new(
|
||||||
|
alarmService,
|
||||||
|
hubContext,
|
||||||
|
Options.Create(gatewayOptions),
|
||||||
|
NullLogger<AlarmsHubPublisher>.Instance);
|
||||||
|
|
||||||
|
using CancellationTokenSource cts = new();
|
||||||
|
await publisher.StartAsync(cts.Token).WaitAsync(TestTimeout);
|
||||||
|
await WaitUntilAsync(() => hubContext.Sent.Count >= messages.Length);
|
||||||
|
await cts.CancelAsync();
|
||||||
|
await publisher.StopAsync(CancellationToken.None);
|
||||||
|
|
||||||
|
return hubContext;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static async Task WaitUntilAsync(Func<bool> predicate)
|
||||||
|
{
|
||||||
|
using CancellationTokenSource cancellationTokenSource = new(TestTimeout);
|
||||||
|
while (!predicate())
|
||||||
|
{
|
||||||
|
await Task.Delay(TimeSpan.FromMilliseconds(5), cancellationTokenSource.Token);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Builds a value-bearing <c>transition</c> feed message.</summary>
|
||||||
|
/// <returns>The message.</returns>
|
||||||
|
private static AlarmFeedMessage BuildTransition()
|
||||||
|
{
|
||||||
|
return new AlarmFeedMessage
|
||||||
|
{
|
||||||
|
Transition = new OnAlarmTransitionEvent
|
||||||
|
{
|
||||||
|
AlarmFullReference = "Tank01.Level.HiHi",
|
||||||
|
SourceObjectReference = "Tank01",
|
||||||
|
AlarmTypeName = "AnalogLimitAlarm.HiHi",
|
||||||
|
TransitionKind = AlarmTransitionKind.Raise,
|
||||||
|
Severity = 800,
|
||||||
|
Category = "Process",
|
||||||
|
Description = "Level high-high",
|
||||||
|
CurrentValue = new MxValue { DataType = MxDataType.Double, DoubleValue = 88.0 },
|
||||||
|
LimitValue = new MxValue { DataType = MxDataType.Double, DoubleValue = 90.0 },
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Builds a value-bearing <c>active_alarm</c> feed message.</summary>
|
||||||
|
/// <returns>The message.</returns>
|
||||||
|
private static AlarmFeedMessage BuildActiveAlarm()
|
||||||
|
{
|
||||||
|
return new AlarmFeedMessage
|
||||||
|
{
|
||||||
|
ActiveAlarm = new ActiveAlarmSnapshot
|
||||||
|
{
|
||||||
|
AlarmFullReference = "Tank02.Level.Lo",
|
||||||
|
SourceObjectReference = "Tank02",
|
||||||
|
AlarmTypeName = "AnalogLimitAlarm.Lo",
|
||||||
|
CurrentState = AlarmConditionState.Active,
|
||||||
|
Severity = 500,
|
||||||
|
Category = "Process",
|
||||||
|
Description = "Level low",
|
||||||
|
CurrentValue = new MxValue { DataType = MxDataType.Double, DoubleValue = 12.5 },
|
||||||
|
LimitValue = new MxValue { DataType = MxDataType.Double, DoubleValue = 10.0 },
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Yields a scripted message list once and then stays open until cancelled,
|
||||||
|
/// so the publisher's reconnect loop never re-subscribes mid-test.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="messages">The messages to yield, in order.</param>
|
||||||
|
private sealed class ScriptedAlarmService(IReadOnlyList<AlarmFeedMessage> messages) : IGatewayAlarmService
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public GatewayAlarmMonitorState State => GatewayAlarmMonitorState.Monitoring;
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public string? LastError => null;
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public int? WorkerProcessId => null;
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public IReadOnlyList<ActiveAlarmSnapshot> CurrentAlarms => [];
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public bool SnapshotTruncated => false;
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public async IAsyncEnumerable<AlarmFeedMessage> StreamAsync(
|
||||||
|
string? alarmFilterPrefix,
|
||||||
|
[EnumeratorCancellation] CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
foreach (AlarmFeedMessage message in messages)
|
||||||
|
{
|
||||||
|
yield return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
await Task.Delay(Timeout.InfiniteTimeSpan, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
catch (OperationCanceledException)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public Task<AcknowledgeAlarmReply> AcknowledgeAsync(
|
||||||
|
AcknowledgeAlarmRequest request,
|
||||||
|
CancellationToken cancellationToken) => throw new NotSupportedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
private sealed class CapturingHubContext : IHubContext<AlarmsHub>
|
||||||
|
{
|
||||||
|
private readonly CapturingHubClients _clients = new();
|
||||||
|
|
||||||
|
/// <summary>Gets the hub clients.</summary>
|
||||||
|
public IHubClients Clients => _clients;
|
||||||
|
|
||||||
|
/// <summary>Gets the group manager.</summary>
|
||||||
|
public IGroupManager Groups { get; } = new NoopGroupManager();
|
||||||
|
|
||||||
|
/// <summary>Gets every message the publisher broadcast, in order.</summary>
|
||||||
|
public IReadOnlyList<AlarmFeedMessage> Sent => _clients.GroupProxy.Sent;
|
||||||
|
}
|
||||||
|
|
||||||
|
private sealed class CapturingHubClients : IHubClients
|
||||||
|
{
|
||||||
|
/// <summary>Gets the capturing client proxy shared by this fake.</summary>
|
||||||
|
public CapturingClientProxy GroupProxy { get; } = new();
|
||||||
|
|
||||||
|
public IClientProxy All => GroupProxy;
|
||||||
|
|
||||||
|
public IClientProxy AllExcept(IReadOnlyList<string> excludedConnectionIds) => GroupProxy;
|
||||||
|
|
||||||
|
public IClientProxy Client(string connectionId) => GroupProxy;
|
||||||
|
|
||||||
|
public IClientProxy Clients(IReadOnlyList<string> connectionIds) => GroupProxy;
|
||||||
|
|
||||||
|
public IClientProxy Group(string groupName) => GroupProxy;
|
||||||
|
|
||||||
|
public IClientProxy GroupExcept(string groupName, IReadOnlyList<string> excludedConnectionIds) => GroupProxy;
|
||||||
|
|
||||||
|
public IClientProxy Groups(IReadOnlyList<string> groupNames) => GroupProxy;
|
||||||
|
|
||||||
|
public IClientProxy User(string userId) => GroupProxy;
|
||||||
|
|
||||||
|
public IClientProxy Users(IReadOnlyList<string> userIds) => GroupProxy;
|
||||||
|
}
|
||||||
|
|
||||||
|
private sealed class CapturingClientProxy : IClientProxy
|
||||||
|
{
|
||||||
|
private readonly List<AlarmFeedMessage> _sent = [];
|
||||||
|
|
||||||
|
/// <summary>Gets every alarm message sent through this proxy, in order.</summary>
|
||||||
|
public IReadOnlyList<AlarmFeedMessage> Sent
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
lock (_sent)
|
||||||
|
{
|
||||||
|
return [.. _sent];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Records the broadcast message and completes synchronously.</summary>
|
||||||
|
/// <param name="method">The SignalR method name.</param>
|
||||||
|
/// <param name="args">The method arguments.</param>
|
||||||
|
/// <param name="cancellationToken">Token to observe for cancellation.</param>
|
||||||
|
/// <returns>A completed task.</returns>
|
||||||
|
public Task SendCoreAsync(string method, object?[] args, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
if (args.Length > 0 && args[0] is AlarmFeedMessage message)
|
||||||
|
{
|
||||||
|
lock (_sent)
|
||||||
|
{
|
||||||
|
_sent.Add(message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return Task.CompletedTask;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private sealed class NoopGroupManager : IGroupManager
|
||||||
|
{
|
||||||
|
public Task AddToGroupAsync(string connectionId, string groupName, CancellationToken cancellationToken = default)
|
||||||
|
=> Task.CompletedTask;
|
||||||
|
|
||||||
|
public Task RemoveFromGroupAsync(string connectionId, string groupName, CancellationToken cancellationToken = default)
|
||||||
|
=> Task.CompletedTask;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using Microsoft.Extensions.Logging.Abstractions;
|
using Microsoft.Extensions.Logging.Abstractions;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
using ZB.MOM.WW.MxGateway.Contracts.Proto;
|
using ZB.MOM.WW.MxGateway.Contracts.Proto;
|
||||||
|
using ZB.MOM.WW.MxGateway.Server.Configuration;
|
||||||
using ZB.MOM.WW.MxGateway.Server.Dashboard;
|
using ZB.MOM.WW.MxGateway.Server.Dashboard;
|
||||||
using ZB.MOM.WW.MxGateway.Server.Sessions;
|
using ZB.MOM.WW.MxGateway.Server.Sessions;
|
||||||
using ZB.MOM.WW.MxGateway.Server.Workers;
|
using ZB.MOM.WW.MxGateway.Server.Workers;
|
||||||
@@ -186,11 +188,100 @@ public sealed class DashboardLiveDataServiceTests
|
|||||||
Assert.Equal(filler[0], worker.SubscribedTags[^1]);
|
Assert.Equal(filler[0], worker.SubscribedTags[^1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static DashboardLiveDataService CreateService(ISessionManager sessionManager)
|
/// <summary>
|
||||||
|
/// Verifies the <c>/browse</c> live-value seam honours
|
||||||
|
/// <c>MxGateway:Dashboard:ShowTagValues</c> (TST-16): with the flag off — the
|
||||||
|
/// default — the value text the page renders is the redaction placeholder,
|
||||||
|
/// never the formatted tag value.
|
||||||
|
/// </summary>
|
||||||
|
[Fact]
|
||||||
|
public async Task ReadAsync_WhenShowTagValuesFalse_RedactsValueTextButKeepsMetadata()
|
||||||
{
|
{
|
||||||
|
RecordingWorkerClient worker = new()
|
||||||
|
{
|
||||||
|
ReadValue = new MxValue { DataType = MxDataType.Double, DoubleValue = 42.5 },
|
||||||
|
};
|
||||||
|
await using FakeSessionManager sessionManager = new(worker);
|
||||||
|
await using DashboardLiveDataService service = CreateService(sessionManager, showTagValues: false);
|
||||||
|
|
||||||
|
DashboardLiveReadResult result = await service.ReadAsync(["Tank_001.PV"], CancellationToken.None);
|
||||||
|
|
||||||
|
DashboardTagValue value = Assert.Single(result.Values);
|
||||||
|
Assert.Equal(DashboardTagValue.RedactedValueText, value.ValueText);
|
||||||
|
Assert.DoesNotContain("42.5", value.ValueText, StringComparison.Ordinal);
|
||||||
|
|
||||||
|
// Everything that is not the value still renders: the panel stays useful.
|
||||||
|
Assert.Equal("Tank_001.PV", value.TagAddress);
|
||||||
|
Assert.True(value.Ok);
|
||||||
|
Assert.Equal("Double", value.DataType);
|
||||||
|
Assert.Equal(192, value.Quality);
|
||||||
|
Assert.True(value.QualityGood);
|
||||||
|
Assert.Null(value.Error);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>Verifies the formatted value is served when the flag is on.</summary>
|
||||||
|
[Fact]
|
||||||
|
public async Task ReadAsync_WhenShowTagValuesTrue_ServesFormattedValue()
|
||||||
|
{
|
||||||
|
RecordingWorkerClient worker = new()
|
||||||
|
{
|
||||||
|
ReadValue = new MxValue { DataType = MxDataType.Double, DoubleValue = 42.5 },
|
||||||
|
};
|
||||||
|
await using FakeSessionManager sessionManager = new(worker);
|
||||||
|
await using DashboardLiveDataService service = CreateService(sessionManager, showTagValues: true);
|
||||||
|
|
||||||
|
DashboardLiveReadResult result = await service.ReadAsync(["Tank_001.PV"], CancellationToken.None);
|
||||||
|
|
||||||
|
DashboardTagValue value = Assert.Single(result.Values);
|
||||||
|
Assert.Equal("42.5", value.ValueText);
|
||||||
|
Assert.Equal("Double", value.DataType);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Verifies redaction is scoped to reads that actually produced a value: a
|
||||||
|
/// failed read keeps the "-" placeholder rather than claiming a value was
|
||||||
|
/// withheld, and its diagnostic still reaches the panel. Redacting it would
|
||||||
|
/// contradict the error the same row displays.
|
||||||
|
/// </summary>
|
||||||
|
[Fact]
|
||||||
|
public async Task ReadAsync_WhenReadFailedAndShowTagValuesFalse_LeavesPlaceholderUnredacted()
|
||||||
|
{
|
||||||
|
RecordingWorkerClient worker = new()
|
||||||
|
{
|
||||||
|
ReadValue = new MxValue { DataType = MxDataType.Double, DoubleValue = 42.5 },
|
||||||
|
};
|
||||||
|
worker.FailReadFor.Add("Bad.PV");
|
||||||
|
await using FakeSessionManager sessionManager = new(worker);
|
||||||
|
await using DashboardLiveDataService service = CreateService(sessionManager, showTagValues: false);
|
||||||
|
|
||||||
|
DashboardLiveReadResult result = await service.ReadAsync(
|
||||||
|
["Bad.PV", "Tank_001.PV"],
|
||||||
|
CancellationToken.None);
|
||||||
|
|
||||||
|
DashboardTagValue failed = result.Values.Single(value => value.TagAddress == "Bad.PV");
|
||||||
|
Assert.False(failed.Ok);
|
||||||
|
Assert.Equal("-", failed.ValueText);
|
||||||
|
Assert.Equal("Simulated read failure.", failed.Error);
|
||||||
|
Assert.False(failed.QualityGood);
|
||||||
|
|
||||||
|
// The successful row in the same read is still redacted.
|
||||||
|
DashboardTagValue succeeded = result.Values.Single(value => value.TagAddress == "Tank_001.PV");
|
||||||
|
Assert.Equal(DashboardTagValue.RedactedValueText, succeeded.ValueText);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static DashboardLiveDataService CreateService(
|
||||||
|
ISessionManager sessionManager,
|
||||||
|
bool showTagValues = false)
|
||||||
|
{
|
||||||
|
GatewayOptions gatewayOptions = new()
|
||||||
|
{
|
||||||
|
Dashboard = new DashboardOptions { ShowTagValues = showTagValues },
|
||||||
|
};
|
||||||
|
|
||||||
return new DashboardLiveDataService(
|
return new DashboardLiveDataService(
|
||||||
sessionManager,
|
sessionManager,
|
||||||
new FakeGatewayAlarmService(),
|
new FakeGatewayAlarmService(),
|
||||||
|
Options.Create(gatewayOptions),
|
||||||
NullLogger<DashboardLiveDataService>.Instance);
|
NullLogger<DashboardLiveDataService>.Instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -322,6 +413,15 @@ public sealed class DashboardLiveDataServiceTests
|
|||||||
/// <summary>Gets or sets a value indicating whether unsubscribe commands throw.</summary>
|
/// <summary>Gets or sets a value indicating whether unsubscribe commands throw.</summary>
|
||||||
public bool FailUnsubscribe { get; set; }
|
public bool FailUnsubscribe { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the value every bulk read returns. Null (the default) leaves
|
||||||
|
/// the read results value-less, which is all the advise-set tests need.
|
||||||
|
/// </summary>
|
||||||
|
public MxValue? ReadValue { get; set; }
|
||||||
|
|
||||||
|
/// <summary>Gets the tag addresses whose bulk read comes back unsuccessful.</summary>
|
||||||
|
public HashSet<string> FailReadFor { get; } = new(StringComparer.OrdinalIgnoreCase);
|
||||||
|
|
||||||
/// <summary>Gets the item handle bound for a previously subscribed tag.</summary>
|
/// <summary>Gets the item handle bound for a previously subscribed tag.</summary>
|
||||||
/// <param name="tagAddress">Tag address to look up.</param>
|
/// <param name="tagAddress">Tag address to look up.</param>
|
||||||
/// <returns>The bound item handle.</returns>
|
/// <returns>The bound item handle.</returns>
|
||||||
@@ -434,14 +534,35 @@ public sealed class DashboardLiveDataServiceTests
|
|||||||
BulkReadReply readReply = new();
|
BulkReadReply readReply = new();
|
||||||
foreach (string tagAddress in tagAddresses)
|
foreach (string tagAddress in tagAddresses)
|
||||||
{
|
{
|
||||||
readReply.Results.Add(new BulkReadResult
|
if (FailReadFor.Contains(tagAddress))
|
||||||
|
{
|
||||||
|
readReply.Results.Add(new BulkReadResult
|
||||||
|
{
|
||||||
|
ServerHandle = RegisteredServerHandle,
|
||||||
|
TagAddress = tagAddress,
|
||||||
|
ItemHandle = _itemHandles.TryGetValue(tagAddress, out int failedHandle) ? failedHandle : 0,
|
||||||
|
WasSuccessful = false,
|
||||||
|
Quality = 0,
|
||||||
|
ErrorMessage = "Simulated read failure.",
|
||||||
|
});
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
BulkReadResult readResult = new()
|
||||||
{
|
{
|
||||||
ServerHandle = RegisteredServerHandle,
|
ServerHandle = RegisteredServerHandle,
|
||||||
TagAddress = tagAddress,
|
TagAddress = tagAddress,
|
||||||
ItemHandle = _itemHandles.TryGetValue(tagAddress, out int itemHandle) ? itemHandle : 0,
|
ItemHandle = _itemHandles.TryGetValue(tagAddress, out int itemHandle) ? itemHandle : 0,
|
||||||
WasSuccessful = true,
|
WasSuccessful = true,
|
||||||
Quality = 192,
|
Quality = 192,
|
||||||
});
|
};
|
||||||
|
|
||||||
|
if (ReadValue is not null)
|
||||||
|
{
|
||||||
|
readResult.Value = ReadValue.Clone();
|
||||||
|
}
|
||||||
|
|
||||||
|
readReply.Results.Add(readResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
return readReply;
|
return readReply;
|
||||||
|
|||||||
@@ -194,11 +194,13 @@ public sealed class WnWrapAlarmConsumer : IMxAccessAlarmConsumer
|
|||||||
?? throw new ObjectDisposedException(nameof(WnWrapAlarmConsumer));
|
?? throw new ObjectDisposedException(nameof(WnWrapAlarmConsumer));
|
||||||
|
|
||||||
// Use the IwwAlarmConsumer (v1) prefix-named methods for the
|
// Use the IwwAlarmConsumer (v1) prefix-named methods for the
|
||||||
// lifecycle. Empirically (live dev-rig 2026-05-01) this is the
|
// lifecycle. Empirically (live dev-rig 2026-05-01, reconfirmed
|
||||||
// only path that lets AlarmAckByName succeed afterwards. The
|
// 2026-08-18) this is the only path that lets AlarmAckByName
|
||||||
// v2 Initialize/Register/Subscribe methods on the class
|
// return rc=0 afterwards. The v2 Initialize/Register/Subscribe
|
||||||
// succeed (return 0) but acks against that consumer state
|
// methods on the class succeed (return 0) but acks against that
|
||||||
// return -55.
|
// consumer state return -55. Note rc=0 means the call was
|
||||||
|
// accepted, not that an acknowledgement was applied — see
|
||||||
|
// AcknowledgeByName below and docs/AlarmProbeFindings.md.
|
||||||
int init = com.IwwAlarmConsumer_InitializeConsumer(DefaultApplicationName);
|
int init = com.IwwAlarmConsumer_InitializeConsumer(DefaultApplicationName);
|
||||||
if (init != 0)
|
if (init != 0)
|
||||||
{
|
{
|
||||||
@@ -343,13 +345,28 @@ public sealed class WnWrapAlarmConsumer : IMxAccessAlarmConsumer
|
|||||||
?? throw new InvalidOperationException(
|
?? throw new InvalidOperationException(
|
||||||
"Cannot acknowledge: WnWrapAlarmConsumer was disposed or has not been subscribed yet.");
|
"Cannot acknowledge: WnWrapAlarmConsumer was disposed or has not been subscribed yet.");
|
||||||
|
|
||||||
// Empirically (live dev-rig 2026-05-01): the IwwAlarmConsumer2
|
// The original observation (live dev-rig 2026-05-01) was narrower than
|
||||||
// 8-arg AlarmAckByName returns -55 on this AVEVA build (looks like
|
// it read: the IwwAlarmConsumer2 8-arg AlarmAckByName returned -55
|
||||||
// a stub). The legacy 6-arg IwwAlarmConsumer.AlarmAckByName works
|
// "and looked like a stub" while the legacy 6-arg
|
||||||
// and reaches the alarm-history path correctly. Operator-domain
|
// IwwAlarmConsumer.AlarmAckByName returned 0, which is how the 6-arg
|
||||||
// and operator-full-name fields are accepted by the proto contract
|
// overload came to be the one called here. The 2026-08-18 probe
|
||||||
// for forward-compat but are not propagated to AVEVA today —
|
// corrected both halves. The -55 tracks the *consumer*, not the
|
||||||
// wrapped in the 6-arg call so domain/full-name go to the
|
// overload: both overloads return -55 against a
|
||||||
|
// SetXmlAlarmQuery-applied consumer and 0 against the ack-only one
|
||||||
|
// used above. And a zero return is NOT evidence the acknowledgement
|
||||||
|
// was applied — the probe acked a real, freshly raised alarm six ways
|
||||||
|
// and watched the snapshot stay UNACK_ALM, OPERATOR_NAME stay empty,
|
||||||
|
// and the alarm extension's own .Acked attribute stay False for 16 s
|
||||||
|
// after each call. On that rig the ack is accepted and then inert, so
|
||||||
|
// whether any wnwrap ack reaches the alarm-history path is
|
||||||
|
// unverified; see docs/AlarmProbeFindings.md and the 2026-08-18
|
||||||
|
// correction in docs/AlarmClientDiscovery.md. The 6-arg call site
|
||||||
|
// below therefore stays as-is for MXAccess parity — the choice is no
|
||||||
|
// longer justified by the rc, and rc semantics are per the probe.
|
||||||
|
//
|
||||||
|
// Operator-domain and operator-full-name fields are accepted by the
|
||||||
|
// proto contract for forward-compat but are not propagated to AVEVA
|
||||||
|
// today — wrapped in the 6-arg call so domain/full-name go to the
|
||||||
// alarm-history operator-name field via the szOprName parameter.
|
// alarm-history operator-name field via the szOprName parameter.
|
||||||
// Suppress unused-warning explicitly:
|
// Suppress unused-warning explicitly:
|
||||||
_ = ackOperatorDomain;
|
_ = ackOperatorDomain;
|
||||||
@@ -429,10 +446,12 @@ public sealed class WnWrapAlarmConsumer : IMxAccessAlarmConsumer
|
|||||||
// have exactly that many active alarms. Treat the ambiguous case as
|
// have exactly that many active alarms. Treat the ambiguous case as
|
||||||
// truncated: the false-positive cost is a snapshot that stays stale for
|
// truncated: the false-positive cost is a snapshot that stays stale for
|
||||||
// one poll, the false-negative cost is every alarm past the cap reading
|
// one poll, the false-negative cost is every alarm past the cap reading
|
||||||
// as cleared. (The reply's ALARM_RECORDS/@COUNT attribute is a
|
// as cleared. (The reply's ALARM_RECORDS/@COUNT attribute was the
|
||||||
// candidate exact signal, but only if it reports the total rather than
|
// candidate exact signal; the 2026-08-18 live probe settled it — with
|
||||||
// the records in the reply — untested on a live rig, see
|
// three alarms active, @COUNT read 3, 1, and 2 at caps 1024, 1, and 2,
|
||||||
// docs/AlarmProbeFindings.md.)
|
// matching the records in the reply every time. It reports the reply,
|
||||||
|
// not the total, so it cannot tell a capped fetch from a complete one.
|
||||||
|
// See docs/AlarmProbeFindings.md.)
|
||||||
bool truncated = IsTruncatedFetch(fetchedRecordCount, maxAlarmsPerFetch);
|
bool truncated = IsTruncatedFetch(fetchedRecordCount, maxAlarmsPerFetch);
|
||||||
|
|
||||||
IReadOnlyList<MxAlarmTransitionEvent> transitions =
|
IReadOnlyList<MxAlarmTransitionEvent> transitions =
|
||||||
@@ -491,12 +510,14 @@ public sealed class WnWrapAlarmConsumer : IMxAccessAlarmConsumer
|
|||||||
/// offers no confirmed "more available" flag, so a reply at exactly the
|
/// offers no confirmed "more available" flag, so a reply at exactly the
|
||||||
/// cap is indistinguishable from a galaxy that happens to hold exactly
|
/// cap is indistinguishable from a galaxy that happens to hold exactly
|
||||||
/// that many active alarms; both are treated as truncated. The reply
|
/// that many active alarms; both are treated as truncated. The reply
|
||||||
/// root carries an <c>ALARM_RECORDS/@COUNT</c> attribute that would make
|
/// root carries an <c>ALARM_RECORDS/@COUNT</c> attribute that would have
|
||||||
/// the test exact if it reported the total active count rather than the
|
/// made the test exact had it reported the total active count; the
|
||||||
/// records in this reply; a live probe could not discriminate the two
|
/// 2026-08-18 live probe observed it tracking the records in the reply
|
||||||
/// (see <c>docs/AlarmProbeFindings.md</c>), so the count is deliberately
|
/// instead (three alarms active returned @COUNT 1 at cap 1 and 2 at cap
|
||||||
/// not trusted here. Exposed as <c>internal static</c> so the rule is
|
/// 2), so it carries no "more available" information and is deliberately
|
||||||
/// unit-testable without the wnwrapConsumer COM object.
|
/// not trusted here (see <c>docs/AlarmProbeFindings.md</c>). Exposed as
|
||||||
|
/// <c>internal static</c> so the rule is unit-testable without the
|
||||||
|
/// wnwrapConsumer COM object.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="fetchedRecordCount">ALARM records the reply carried.</param>
|
/// <param name="fetchedRecordCount">ALARM records the reply carried.</param>
|
||||||
/// <param name="maxAlarmsPerFetch">The cap that was passed to the fetch.</param>
|
/// <param name="maxAlarmsPerFetch">The cap that was passed to the fetch.</param>
|
||||||
@@ -660,10 +681,17 @@ public sealed class WnWrapAlarmConsumer : IMxAccessAlarmConsumer
|
|||||||
/// <em>instance</em> rather than the state it is in: a re-minted
|
/// <em>instance</em> rather than the state it is in: a re-minted
|
||||||
/// GUID would read as the old alarm vanishing and a new one
|
/// GUID would read as the old alarm vanishing and a new one
|
||||||
/// appearing, i.e. a spurious Clear plus a spurious Raise. Live
|
/// appearing, i.e. a spurious Clear plus a spurious Raise. Live
|
||||||
/// capture confirms stability across the active→returned leg only
|
/// capture confirms stability across the active→returned leg
|
||||||
/// (<c>docs/AlarmClientDiscovery.md</c>); the acknowledge leg and
|
/// (<c>docs/AlarmClientDiscovery.md</c>, reconfirmed 2026-08-18).
|
||||||
/// re-raise-after-clear are assumed, not observed, because the dev
|
/// Re-raise-after-clear was observed on 2026-08-18 and does
|
||||||
/// rig's alarm attributes reject unauthenticated writes — see
|
/// <em>not</em> reuse the GUID: clearing left the returned record in
|
||||||
|
/// place under its original GUID and the re-raise replaced it with a
|
||||||
|
/// freshly minted one. That is the intended reading — the old
|
||||||
|
/// instance ended and a new one began — so the diff emits a Clear
|
||||||
|
/// plus a Raise, which is what happened. The acknowledge leg remains
|
||||||
|
/// assumed rather than observed: on the dev rig every ack surface is
|
||||||
|
/// inert (<c>AlarmAckByName</c> returns 0 and nothing moves), so no
|
||||||
|
/// record can be driven into an acknowledged state — see
|
||||||
/// <c>docs/AlarmProbeFindings.md</c>.
|
/// <c>docs/AlarmProbeFindings.md</c>.
|
||||||
/// </para>
|
/// </para>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
|
|||||||
Reference in New Issue
Block a user