Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
__pycache__
.idea
2 changes: 1 addition & 1 deletion specification.json
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
{
"id": "Requirement 2.2.5",
"machine_id": "requirement_2_2_5",
"content": "The `provider` SHOULD populate the `resolution details` structure's `reason` field with `\"DEFAULT\",` `\"TARGETING_MATCH\"`, `\"SPLIT\"`, `\"DISABLED\"`, `\"UNKNOWN\"`, `\"ERROR\"` or some other string indicating the semantic reason for the returned flag value.",
"content": "The `provider` SHOULD populate the `resolution details` structure's `reason` field with `\"STATIC\"`, `\"DEFAULT\",` `\"TARGETING_MATCH\"`, `\"SPLIT\"`, `\"CACHED\"`, `\"DISABLED\"`, `\"UNKNOWN\"`, `\"ERROR\"` or some other string indicating the semantic reason for the returned flag value.",
"RFC 2119 keyword": "SHOULD",
"children": []
},
Expand Down
2 changes: 1 addition & 1 deletion specification/sections/02-providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ The value of the variant field might only be meaningful in the context of the fl

##### Requirement 2.2.5

> The `provider` **SHOULD** populate the `resolution details` structure's `reason` field with `"DEFAULT",` `"TARGETING_MATCH"`, `"SPLIT"`, `"DISABLED"`, `"UNKNOWN"`, `"ERROR"` or some other string indicating the semantic reason for the returned flag value.
> The `provider` **SHOULD** populate the `resolution details` structure's `reason` field with `"STATIC"`, `"DEFAULT",` `"TARGETING_MATCH"`, `"SPLIT"`, `"CACHED"`, `"DISABLED"`, `"UNKNOWN"`, `"ERROR"` or some other string indicating the semantic reason for the returned flag value.

As indicated in the definition of the [`resolution details`](../types.md#resolution-details) structure, the `reason` should be a string. This allows providers to reflect accurately why a flag was resolved to a particular value.

Expand Down
6 changes: 4 additions & 2 deletions specification/types.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,12 @@ A structure which contains a subset of the fields defined in the `evaluation det
A set of pre-defined reasons is enumerated below:

| Reason | Explanation |
| --------------- | ----------------------------------------------------------------------------------------------------- |
| DEFAULT | The resolved value was configured statically, or otherwise fell back to a pre-configured value. |
| --------------- |-------------------------------------------------------------------------------------------------------|
| STATIC | The resolved value is static (no dynamic evaluation). |
| DEFAULT | The resolved value fell back to a pre-configured value (dynamic evaluation yielded no result). |
| TARGETING_MATCH | The resolved value was the result of a dynamic evaluation, such as a rule or specific user-targeting. |
| SPLIT | The resolved value was the result of pseudorandom assignment. |
| CACHED | The resolved value was retrieved from cache. |
| DISABLED | The resolved value was the result of the flag being disabled in the management system. |
| UNKNOWN | The reason for the resolved value could not be determined. |
| ERROR | The resolved value was the result of an error. |
Expand Down