fix: Add unbounded context kind to segment type#39
Conversation
0aa217f to
eb06c29
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit eb06c29. Configure here.
| #[serde(default)] | ||
| pub unbounded: bool, | ||
| #[serde(default)] | ||
| unbounded_context_kind: Option<Kind>, |
There was a problem hiding this comment.
New field is deserialized but never read
Low Severity
The unbounded_context_kind field is deserialized from JSON but never read in any production code. Unlike the similarly private generation field (which is consumed by unbounded_segment_id()), unbounded_context_kind has no accessor method and no internal usage. It's also not pub, so external crate consumers (e.g., big segment evaluation logic in the SDK layer) cannot access it either.
Reviewed by Cursor Bugbot for commit eb06c29. Configure here.


Note
Low Risk
Low risk: adds an optional, defaulted field and tests, with no evaluation logic changes; primary risk is minor compatibility/serialization behavior changes for segment JSON.
Overview
Adds an optional
unbounded_context_kind: Option<Kind>toSegmentto deserialize theunboundedContextKindproperty for unbounded/big segments.Adds unit tests to verify
unboundedContextKindis parsed for both custom kinds (e.g."org") and"user", and defaults toNonewhen omitted; updates test segment construction accordingly.Reviewed by Cursor Bugbot for commit eb06c29. Bugbot is set up for automated code reviews on this repo. Configure here.