Skip to content

Commit

Permalink
feat: add note that not all context variants might be available
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Reining <[email protected]>
  • Loading branch information
lukas-reining committed Jan 14, 2024
1 parent 797ba0e commit d3d4b1e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion specification/sections/03-evaluation-context.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,12 @@ See [setting a provider](./01-flag-evaluation.md#setting-a-provider) for details

#### Requirement 3.2.3

> [!NOTE]
> This describes the precedence of all `evaluation context` variants. Depending on the `paradigm`, not all variants might be available in an `SDK` implementation.
> Evaluation context **MUST** be merged in the order: API (global; lowest precedence) -> transaction -> client -> invocation -> before hooks (highest precedence), with duplicate values being overwritten.
Any fields defined in the client `evaluation context` will overwrite duplicate fields defined globally, and fields defined in the invocation `evaluation context` will overwrite duplicate fields defined globally or on the client. Any resulting `evaluation context` from a [before hook](./04-hooks.md#requirement-434) will overwrite duplicate fields defined globally, on the client, or in the invocation.
Any fields defined in the transaction `evaluation context` will overwrite duplicate fields defined in the global `evaluation context`, any fields defined in the client `evaluation context` will overwrite duplicate fields defined in the transaction `evaluation context`, and fields defined in the invocation `evaluation context` will overwrite duplicate fields defined globally or on the client. Any resulting `evaluation context` from a [before hook](./04-hooks.md#requirement-434) will overwrite duplicate fields defined globally, on the client, or in the invocation.

```mermaid
flowchart LR
Expand Down

0 comments on commit d3d4b1e

Please sign in to comment.