diff --git a/docs/AlarmTracking.md b/docs/AlarmTracking.md
index 8904ae7b1..3bbdd4920 100644
--- a/docs/AlarmTracking.md
+++ b/docs/AlarmTracking.md
@@ -867,7 +867,10 @@ This section is what an OPC UA client of the **consumer** sees. Code: `OpcUaServ
`MaxUnknownHold`). Removal emits **no** `NodeDeleted` model change. For a removal, "may see" means "its identity was
admitted by the gate to that condition instance" (a delivery, a refresh replay or a Read/Browse of it), recorded per
instance — not the current mapping set, which no longer admits anybody once the removal was caused by the mapping
- leaving it (#936). The event carries no condition field (`SourceNode = Server`, `Message = "RefreshRequired"`), and a
+ leaving it (#936) — or "passes the current gate". The record is keyed on the credential (principal + API key id), not
+ the SDK identity object, because the SDK installs a new identity object on every ActivateSession: a session re-activated
+ on a new channel, or a transferred subscription, is still told. It is allocated on first admission, holds one entry per
+ credential (capped at 1024 per condition), and is dropped with the condition. The event carries no condition field (`SourceNode = Server`, `Message = "RefreshRequired"`), and a
session never admitted to the condition is not sent one;
- a resync leaves retained EventIds un-re-bindable (see EventIds below).
- **Before the first barrier, a refresh returns nothing imported**, because nothing is materialised yet. Conditions appear
diff --git a/docs/DataConnections.md b/docs/DataConnections.md
index d38a6b63c..07fc7c2db 100644
--- a/docs/DataConnections.md
+++ b/docs/DataConnections.md
@@ -461,6 +461,15 @@ refresh, EventIds) is documented in [Alarm tracking § Imported conditions](Alar
(new EventIds). The hold cannot be narrowed to "mappings whose scope could list the key": an origin deploy can move a
condition's placements into the unknown mapping's root, so the consumer cannot prove it. 20 min outlasts the transient
retry cycle (snapshot timeout × 8) and the first two re-checks of a definitive refusal (`LongRetryDelay` 5 min, then 10).
+ - **A mapping's own keys are not bounded while it is only transiently unknown** (review r1 S1). A key the unknown mapping
+ itself listed when it was last known (its previous stream, or before a capacity reset) is held with no bound while that
+ mapping is `Pending` / `Unavailable` / retrying — its origin may well still list it, exactly as when the connection's
+ stream never opens at all (held stale indefinitely). Its clock starts only when that mapping's refusal is
+ **definitive** (`Denied` / `NotFound` / `Unsupported` / `ConditionCapacity`); that verdict is remembered across its
+ retries and stream ends until it completes a snapshot, so a durably denied mapping's retries do not restart the bound.
+ - **The clock runs only while a stream is past its barrier** (review r1 S2): it pauses when that stream ends and resumes
+ at the next barrier, so a connection outage never counts and a merely slow snapshot after one removes nothing.
+ - `MaxUnknownHold` must be positive (the access refuses zero or negative at construction).
7. **Known state (T2 invariant).** *The consumer never retires or clears an alarm that is active at the origin.*
- A record with `state_known = false` never changes the consumer's last state.
- A condition first seen unknown is materialised with `Quality = UncertainInitialValue` until a known record arrives.
@@ -639,7 +648,7 @@ status and diagnostic), and each snapshot barrier (per-mapping status, record co
| `ConditionCapacity` | The listing's `total` against the mapping's or export's `MaxConditions`, and the host caps. Narrow the remote root or raise the limits. |
| Conditions `Uncertain` | The origin has not established their state: a scripted alarm has not completed an evaluation; a native driver has not signalled (see `…conditions.unsignalled`). |
| Conditions `BadNoCommunication` | Stream down longer than `ConditionStaleTimeoutMilliseconds`, or the mapping was incomplete at the last barrier. |
-| A retired condition stays `BadNoCommunication` while another mapping of the connection is `Unavailable` / `Denied` | Expected for up to `MaxUnknownHold` (20 min, #933): the unknown mapping might still list it, so it is held (T2). After that it is removed with `RefreshRequired` (logged Warning "held past MaxUnknownHold", naming the unknown mappings). Fix the unknown mapping (its refusal is on the AdminUI mappings line) to settle it sooner. |
+| A retired condition stays `BadNoCommunication` while another mapping of the connection is `Unavailable` / `Denied` | Expected for up to `MaxUnknownHold` (20 min, #933) of live-stream time (an outage does not count): the unknown mapping might still list it, so it is held (T2). A key the unknown mapping listed itself is held with no bound until that mapping is refused definitively (Denied / NotFound / Unsupported / capacity). After that it is removed with `RefreshRequired` (logged Warning "held past MaxUnknownHold", naming the unknown mappings). Fix the unknown mapping (its refusal is on the AdminUI mappings line) to settle it sooner. |
| Ack answers `BadEventIdUnknown` | The client holds an old EventId (superseded occurrence, or an origin restart that re-announced a different time). ConditionRefresh and ack with the new EventId. |
| Ack answers "OutcomeUnknown" | Check the origin's audit log (`ZB.MOM.WW.OtOpcUa.DataConnections.Audit`) for the operation and watch the condition's events. Never replay blindly. |
| All `ConditionId`s changed | `ConditionKeySecret` was rotated or differs between the origin pair members, or the connection was re-created under a new id. |
diff --git a/src/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer/ProjectedConditionRegistry.cs b/src/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer/ProjectedConditionRegistry.cs
index 4a3d7fd06..bfe7290fb 100644
--- a/src/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer/ProjectedConditionRegistry.cs
+++ b/src/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer/ProjectedConditionRegistry.cs
@@ -1,5 +1,4 @@
using System.Collections.Concurrent;
-using System.Runtime.CompilerServices;
using Microsoft.Extensions.Logging;
using Opc.Ua;
using Opc.Ua.Server;
@@ -57,15 +56,48 @@ internal sealed class ImportedCondition(AlarmConditionState alarm, string connec
public bool IsNative { get; init; }
///
- /// #936: every identity that passed the §5.4 gate for THIS condition instance (each delivery, refresh replay and
- /// Read/Browse of it is gated, so any client that may hold it is here). Weak keys: a closed session's identity is
- /// collected with it. Lets the removal RefreshRequired reach the holders even after the mapping that admitted them
- /// left the deployed set — the current gate then admits nobody.
+ /// #936: the credentials (: principal + key id) that passed the §5.4
+ /// gate for THIS condition instance — each delivery, refresh replay and Read/Browse of it is gated, so any client that
+ /// may hold it is here. Lets the removal RefreshRequired reach the holders even after the mapping that admitted them
+ /// left the deployed set (the current gate then admits nobody).
+ /// Review r1 S3: keyed on the credential, not the identity OBJECT — the SDK installs a new identity object on every
+ /// ActivateSession (verified: Session.UpdateUserIdentity assigns EffectiveIdentity, and
+ /// MonitoredItem.EffectiveIdentity reads it through the subscription's CURRENT session), so a re-activated or
+ /// transferred session would otherwise be forgotten.
+ /// Review r1 S4: allocated on the first admission only (most conditions are never admitted to anyone), a plain locked
+ /// set of strings shared with the identity — no finalizable containers, no dependent handles. Bounded: one entry per
+ /// distinct credential admitted (≤ deployed API keys + anonymous; NOT per session — a Server-object ConditionRefresh by
+ /// S sessions of K keys adds ≤ C × K entries), capped at ; past the cap a holder
+ /// falls back to the current gate at removal. Dropped when the condition is removed.
///
- private readonly ConditionalWeakTable