AccessFactServerOverrideBehavior
How a fact's server answer combines with the one the client worked out for itself.
The server's answer always replicates -- that part is not configurable, because a client that silently never hears is the failure nobody can debug. What a fact chooses is what the client should do with it, and there are only four sensible answers, so they are named rather than left to a predicate somebody has to read.
Properties
DEFAULT
AccessFactServerOverrideBehavior.DEFAULT: stringThe behavior a fact gets when it does not choose one.
Functions
isBehavior
AccessFactServerOverrideBehavior.isBehavior(value: any) → booleancombine
AccessFactServerOverrideBehavior.combine(localValue: boolean?,--
what this realm worked out
serverValue: boolean?,--
what the server replicated
replicationState: string,--
see AccessReplicationState
behavior: string?) → boolean?Combines the two answers. Pure, and the only place the rule lives.
Two rules come before the behavior, and both matter more than it does:
-
Unless the server has actually said something -- AccessReplicationState.hasAnswer -- nothing is
overridden.
NOT_YET_ARRIVEDandABSTAINEDboth leave the local answer alone, and taking the state rather than inspecting a value is what keeps "has not arrived" from being confused with "arrived saying no". - If this realm has no answer of its own, the server's simply is the answer. A behavior governs overriding a local answer; with none to override there is nothing to protect. Without this a fact the client cannot compute -- a receipt in a server-only DataStore -- would sit unresolved forever under the default, and every feature reading it would never settle. That is not a wrong answer on screen, it is a screen that never fills in.