From d3d4b1e27ebc18be8c70f69a4c450d61cebbd38e Mon Sep 17 00:00:00 2001 From: Lukas Reining Date: Sun, 14 Jan 2024 15:45:14 +0100 Subject: [PATCH] feat: add note that not all context variants might be available Signed-off-by: Lukas Reining --- specification/sections/03-evaluation-context.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/specification/sections/03-evaluation-context.md b/specification/sections/03-evaluation-context.md index 12858443..30dda330 100644 --- a/specification/sections/03-evaluation-context.md +++ b/specification/sections/03-evaluation-context.md @@ -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