Imported conditions: the removal RefreshRequired is gated by the CURRENT mapping set, so a mapping/connection removed by a deploy never tells its holders #936

Closed
opened 2026-11-25 03:09:58 -05:00 by dohertj2 · 1 comment
Owner

Found during the A4 live gate root-cause (F1; branch a4-code).

ProjectedConditionRegistry.RemoveConditions collects the refresh targets before unwiring (deviation 6), but QueueRefreshRequired decides per item with ImportedVisibleTo → IProjectedConditionAccess.CanSee, which gates on the mapping in _mappings.Current. When the removal is CAUSED by the mapping (or its connection) leaving the deployed set, that mapping is already gone from Current, so no item passes and §5.2's "removal + RefreshRequired" is never delivered — the clients keep a retained condition the server no longer has until they refresh on their own.

This is what made F1 silent ("no RefreshRequired"): every deploy's undecided empty mapping set removed every imported condition. a4-code now holds conditions across a deploy (commit 1b7c69c6), so a deploy no longer removes; the gap remains for a genuine mapping/connection removal (and for the demand-linger removal only if no mapping is current).

Options: decide visibility for removal RefreshRequired against the generation/verdict cached at the time the item was admitted, or send the content-free RefreshRequired to the collected targets without the visibility re-check (it carries no condition data).

Found during the A4 live gate root-cause (F1; branch `a4-code`). `ProjectedConditionRegistry.RemoveConditions` collects the refresh targets before unwiring (deviation 6), but `QueueRefreshRequired` decides per item with `ImportedVisibleTo` → `IProjectedConditionAccess.CanSee`, which gates on the mapping in `_mappings.Current`. When the removal is CAUSED by the mapping (or its connection) leaving the deployed set, that mapping is already gone from `Current`, so no item passes and §5.2's "removal + RefreshRequired" is never delivered — the clients keep a retained condition the server no longer has until they refresh on their own. This is what made F1 silent ("no RefreshRequired"): every deploy's undecided empty mapping set removed every imported condition. `a4-code` now holds conditions across a deploy (commit `1b7c69c6`), so a deploy no longer removes; the gap remains for a genuine mapping/connection removal (and for the demand-linger removal only if no mapping is current). Options: decide visibility for removal RefreshRequired against the generation/verdict cached at the time the item was admitted, or send the content-free RefreshRequired to the collected targets without the visibility re-check (it carries no condition data).
dohertj2 added the type:followuppriority:p3 labels 2026-11-25 03:09:58 -05:00
Author
Owner

Fixed on master: each imported condition records which credentials (principal + API key id — stable across ActivateSession, which rebuilds the identity object per SDK 2.0.1) were admitted; a removal sends the content-free RefreshRequired to collected items whose credential was admitted or that pass the current gate. Record is lazily allocated, ≤1024 per condition, cleared after the removal. A session that never saw the condition is not told (A05 unchanged). Residual: other sessions on the same key may also get the content-free event.

Fixed on master: each imported condition records which credentials (principal + API key id — stable across ActivateSession, which rebuilds the identity object per SDK 2.0.1) were admitted; a removal sends the content-free RefreshRequired to collected items whose credential was admitted or that pass the current gate. Record is lazily allocated, ≤1024 per condition, cleared after the removal. A session that never saw the condition is not told (A05 unchanged). Residual: other sessions on the same key may also get the content-free event.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/lmxopcua#936