Skip to content

fix: Add unbounded context kind to segment type#39

Open
keelerm84 wants to merge 1 commit intomainfrom
mk/sdk-2132/unbounded-context-kind
Open

fix: Add unbounded context kind to segment type#39
keelerm84 wants to merge 1 commit intomainfrom
mk/sdk-2132/unbounded-context-kind

Conversation

@keelerm84
Copy link
Copy Markdown
Member

@keelerm84 keelerm84 commented Apr 3, 2026

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> to Segment to deserialize the unboundedContextKind property for unbounded/big segments.

Adds unit tests to verify unboundedContextKind is parsed for both custom kinds (e.g. "org") and "user", and defaults to None when 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.

@keelerm84 keelerm84 requested a review from a team as a code owner April 3, 2026 21:29
@keelerm84 keelerm84 force-pushed the mk/sdk-2132/unbounded-context-kind branch from 0aa217f to eb06c29 Compare April 3, 2026 21:31
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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>,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit eb06c29. Configure here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be used elsewhere.

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