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
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found during the A4 live gate root-cause (F1; branch
a4-code).ProjectedConditionRegistry.RemoveConditionscollects the refresh targets before unwiring (deviation 6), butQueueRefreshRequireddecides per item withImportedVisibleTo→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 fromCurrent, 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-codenow holds conditions across a deploy (commit1b7c69c6), 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).
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.