Reconcile derived role assignments
What It Does
Derived access belongs to its source. Eligibility reconciliation computes outside the transaction and then synchronizes the decided assignments under derivation-key locks.
The Flow
The diagram separates the relevant success, alternative and failure paths. The numbered hop rows retain the detailed authority checks, delegated work and retry limits.
When Something Fails
Expiry is the fail-safe for eligibility-bound renewals. The shared function accepts source-owned validity, so the design does not assert a universal lifetime for appointment-derived rows. Newly eligible subjects are not discovered by the existing-row nightly scan.
Source synchronization uses binding/contact or appointment/rule derivation keys and unique live rows. An unchanged desired set converges. Nightly submission uses workspace and UTC day to deduplicate repeated scheduling; redelivered queue work reconciles again.
Derivation-key locks serialize synchronization for the same subject. Eligibility evaluation runs outside the write transaction; the desired set commits together afterward. Nightly scans cover contacts already holding derived rows, rather than discovering every newly eligible contact.
Open Design Questions
The recorded findings retain any stronger planning expectation, missing writer or unproved recovery path. Observed behavior does not approve those outstanding product choices.