fix(galaxy): an ack does not supersede a re-read entry; a stream reopen discards the re-read (#925 review r1)

- Only full-state live messages (snapshot entry, Raise, Retrigger, Clear) supersede a
  QueryActiveAlarms entry; an Acknowledge merges (Active => ActiveAcked) instead of
  skipping it and then signalling a cold condition known.
- Stream epoch bumped before StreamOpened; a changed epoch at replay drops the replay
  and the signal (an alarm cleared in the gap is absent, never touched); no re-read
  before the current stream's sentinel.
- Lows: dispose race returns false; teardown token on the RPC and the retry wait;
  an unexpected failure keeps a queued follow-up.
This commit is contained in:
Joseph Doherty
2026-11-28 09:34:24 -05:00
parent b4c27bd5b8
commit 14ca1b7168
6 changed files with 181 additions and 30 deletions
@@ -224,6 +224,17 @@ Heidenhain legs are **blocked**: Galaxy needs the VPN and mxaccessgw, and Heiden
(5 red), no supersede check, no handle check at the signal, Unimplemented retried, no re-read at a mismatched sentinel,
no coalescing. The F5 re-arm for deploy-added refs was already in place (`RearmConditionSignalsAfterReindex`, review
round 1). **Not live-gated:** no Galaxy or mxaccessgw is reachable (wonder-box hold).
**#925 review round 1:**
- *Ack-only supersede:* a live `Acknowledge` no longer supersedes an entry. It is merged instead (Active ⇒ ActiveAcked).
Test `An_acknowledge_during_the_reread_merges_into_its_entry_instead_of_superseding_it`. Red on the original code, and
on either mutation: ack counted as full state, or no merge.
- *Reopen during the query:* a stream epoch is bumped before `StreamOpened`. A changed epoch at replay time drops the
re-read and its signal. No re-read starts before the current stream's sentinel. Test
`A_stream_reopen_during_the_reread_drops_its_replay_and_its_signal`. Red on the original code (phantom Tank2
Retrigger plus a second signal), and with the epoch check removed.
- *Lows:* a dispose race returns false instead of throwing `ObjectDisposedException`. The retry wait and the RPC observe
a teardown token, which every runtime teardown cancels. An unexpected failure no longer discards a queued follow-up.
- Galaxy.Tests: 645 passed, 13 skipped. The 13 alarm-signal tests passed 15 runs out of 15.
- **OpcUaClient: no signal suppression on an SDK-reported sequence gap during a refresh.** Plan G2 says such a `RefreshEnd`
"does not signal".
- The SDK 2.0.1 surface the driver sees (the per-item `Notification` callback) exposes no per-message gap or republish