Skip to content

fix: Include the big segments status on evaluation reasons for failed evaluations - #292

Merged
keelerm84 merged 1 commit into
mainfrom
mk/SDK-3519/big-segments-error-status
Nov 10, 2026
Merged

keelerm84 merged 1 commit into
mainfrom
mk/SDK-3519/big-segments-error-status

Conversation

@keelerm84

@keelerm84 keelerm84 commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Summary

When a flag evaluation fails after it has queried a big segment, the evaluation reason now includes the big segments status. Before, the error reason dropped the status. For example, a later rule could reference a circular segment, or a segment lookup could throw.

The status is applied the same way as on successful evaluations. On an unexpected exception the reason keeps the exception. This matches the Go SDK, and the spec allows bigSegmentsStatus on any reason kind.


Note

Overview
When flag evaluation fails after a big-segment lookup (e.g. a later rule hits a circular segment or a missing segment throws), the returned EvaluationReason now keeps bigSegmentsEvaluationStatus from evaluator state instead of dropping it.

Error and unexpected-exception paths in Evaluator::evaluate() route reasons through a new withBigSegmentsStatus helper, mirroring successful evaluations and the Go SDK. Two tests assert STALE remains on the reason for malformed-flag and lookup-throw scenarios.

Reviewed by Cursor Bugbot for commit 79dfe2f. Bugbot is set up for automated code reviews on this repo. Configure here.

… evaluations

An error that occurs after a big segment query no longer drops the big segments status from the reason.
@keelerm84
keelerm84 marked this pull request as ready for review November 9, 2026 18:16
@keelerm84
keelerm84 requested a review from a team as a code owner November 9, 2026 18:16
@keelerm84
keelerm84 requested a review from kinyoklion November 9, 2026 20:33
@keelerm84
keelerm84 merged commit 2f2b1fe into main Nov 10, 2026
14 checks passed
@keelerm84
keelerm84 deleted the mk/SDK-3519/big-segments-error-status branch November 10, 2026 15:47
keelerm84 pushed a commit that referenced this pull request Nov 10, 2026
🤖 I have created a release *beep* *boop*
---


##
[6.12.1](6.12.0...6.12.1)
(2026-11-10)


### Bug Fixes

* Include the big segments status on evaluation reasons for failed
evaluations
([#292](#292))
([2f2b1fe](2f2b1fe))
* Include the HTTP status in exceptions on evaluation reasons
([#291](#291))
([52d3303](52d3303))
* Make TestData valueForAll return its value when targeting is off
([#288](#288))
([b8a9522](b8a9522))
* Prevent allFlagsState from throwing when retrieving flags fails
([#294](#294))
([2b65bf2](2b65bf2))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants