Skip to content

Commit

Permalink
fix: preserve allocation evaluation details when ASSIGNMENT_ERROR
Browse files Browse the repository at this point in the history
ASSIGNMENT_ERROR later in the evaluation process should not revert the
previously-done evaluation and definitely should not list
unmatched/matched allocations as "unevaluated."
  • Loading branch information
rasendubi committed Jul 29, 2024
1 parent 439c7a5 commit 364ea92
Showing 1 changed file with 23 additions and 25 deletions.
48 changes: 23 additions & 25 deletions ufc/tests/test-case-invalid-value-flag.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,22 @@
"flagEvaluationDescription": "Variation (pi) is configured for type INTEGER, but is set to incompatible value (3.1415926)",
"banditKey": null,
"banditAction": null,
"variationKey": null,
"variationValue": null,
"variationKey": "pi",
"variationValue": 3.1415926,
"matchedRule": null,
"matchedAllocation": null,
"unmatchedAllocations": [],
"unevaluatedAllocations": [
"matchedAllocation": {
"key": "invalid",
"allocationEvaluationCode": "MATCH",
"orderPosition": 2
},
"unmatchedAllocations": [
{
"key": "valid",
"allocationEvaluationCode": "UNEVALUATED",
"allocationEvaluationCode": "FAILING_RULE",
"orderPosition": 1
},
{
"key": "invalid",
"allocationEvaluationCode": "UNEVALUATED",
"orderPosition": 2
}
]
],
"unevaluatedAllocations": []
}
},
{
Expand Down Expand Up @@ -88,24 +87,23 @@
"flagEvaluationDescription": "Variation (pi) is configured for type INTEGER, but is set to incompatible value (3.1415926)",
"banditKey": null,
"banditAction": null,
"variationKey": null,
"variationValue": null,
"variationKey": "pi",
"variationValue": 3.1415926,
"matchedRule": null,
"matchedAllocation": null,
"unmatchedAllocations": [],
"unevaluatedAllocations": [
"matchedAllocation": {
"key": "invalid",
"allocationEvaluationCode": "MATCH",
"orderPosition": 2
},
"unmatchedAllocations": [
{
"key": "valid",
"allocationEvaluationCode": "UNEVALUATED",
"allocationEvaluationCode": "FAILING_RULE",
"orderPosition": 1
},
{
"key": "invalid",
"allocationEvaluationCode": "UNEVALUATED",
"orderPosition": 2
}
]
],
"unevaluatedAllocations": []
}
}
]
}
}

0 comments on commit 364ea92

Please sign in to comment.