Skip to content

Commit d0a87da

Browse files
authored
chore: clarify eval details funcs/structs (#209)
Signed-off-by: Todd Baert <[email protected]>
1 parent e2eb2b4 commit d0a87da

File tree

5 files changed

+21
-3
lines changed

5 files changed

+21
-3
lines changed

.markdownlint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ MD024:
88
siblings_only: true
99
MD025:
1010
front_matter_title: ""
11+
MD028: false # no blank lines in block quote - disabling b/c it fires on 2 consecutive block quotes :/
12+

specification/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,5 @@ Put simply:
7575

7676
> These features are stable and battle-hardened.
7777
78-
NOTE: No explicit status = `Experimental`
78+
> [!NOTE]
79+
> No explicit status = `Experimental`

specification/sections/01-flag-evaluation.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,13 @@ See [types](../types.md) for details.
232232

233233
[![hardening](https://img.shields.io/static/v1?label=Status&message=hardening&color=yellow)](https://github.com/open-feature/spec/tree/main/specification#hardening)
234234

235+
The _detailed evaluation_ functions behave similarly to the standard flag evaluation functions, but provide additional metadata useful for telemetry, troubleshooting, debugging, and advanced integrations.
236+
237+
> [!NOTE]
238+
> Metadata included in the `evaluation details` should be considered "best effort", since not all providers will be able to provide these details (such as the reason a flag resolved to a particular value).
239+
240+
see: [evaluation details](../types.md#evaluation-details) type
241+
235242
#### Condition 1.4.1
236243

237244
> The implementation uses the dynamic-context paradigm.

specification/sections/03-evaluation-context.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ The context might contain information about the end-user, the application, the h
1616

1717
### 3.1 Fields
1818

19-
NOTE: Field casing is not specified, and should be chosen in accordance with language idioms.
19+
> [!NOTE]
20+
> Field casing is not specified, and should be chosen in accordance with language idioms.
2021
2122
see: [types](../types.md)
2223

specification/types.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ A structure representing the result of the [flag evaluation process](./glossary.
4242
- variant (string, optional)
4343
- flag metadata ([flag metadata](#flag-metadata))
4444

45+
> [!NOTE]
46+
> Some type systems feature useful constraints that can enhance the ergonomics of the `evaluation details` structure.
47+
> For example, in the case of an unsuccessful evaluation, `error code`, `reason`, and `error message` will be set, and variant will not.
48+
> If the type system of the implementation supports the expression of such constraints, consider defining them.
49+
4550
### Resolution Details
4651

4752
A structure which contains a subset of the fields defined in the `evaluation details`, representing the result of the provider's [flag resolution process](./glossary.md#resolving-flag-values), including:
@@ -67,7 +72,9 @@ A set of pre-defined reasons is enumerated below:
6772
| STALE | The resolved value is non-authoritative or possibly out of date |
6873
| ERROR | The resolved value was the result of an error. |
6974

70-
> NOTE: The `resolution details` structure is not exposed to the Application Author. It defines the data which Provider Authors must return when resolving the value of flags.
75+
> [!NOTE]
76+
> The `resolution details` structure is not exposed to the Application Author.
77+
> It defines the data which Provider Authors must return when resolving the value of flags.
7178
7279
### Error Code
7380

0 commit comments

Comments
 (0)