Skip to content

fix: IfMatchContext/AndMatchContext utilize context kind.#225

Open
kinyoklion wants to merge 3 commits intomainfrom
rlamb/sdk-1888/context-kind-matching
Open

fix: IfMatchContext/AndMatchContext utilize context kind.#225
kinyoklion wants to merge 3 commits intomainfrom
rlamb/sdk-1888/context-kind-matching

Conversation

@kinyoklion
Copy link
Member

@kinyoklion kinyoklion commented Feb 13, 2026

Fixes: #224


Note

Low Risk
Change is limited to TestData’s in-memory flag construction for tests plus new test coverage; it should not affect production data sources, with low regression risk outside test helpers.

Overview
Fixes TestData rule-building so clauses created via IfMatchContext/AndMatchContext (and the negated variants) actually store and emit the specified ContextKind into the SDK data model (Internal.Model.Clause), while treating ContextKind.Default as null for consistency.

Adds comprehensive unit and integration tests verifying correct clause serialization and end-to-end evaluation for single- and multi-context scenarios, mixed default/user vs custom kinds, and negated clauses.

Written by Cursor Bugbot for commit 39692cf. This will update automatically on new commits. Configure here.

}

[Fact]
public void AndMatchContext_TwoCustomContextKindsOnSameAttribute_StoresCorrectContextKinds()
Copy link
Member Author

Choose a reason for hiding this comment

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

Replication of github issue.

}

[Fact]
public void AndMatchContext_TwoCustomContextKindsOnSameAttribute_EvaluatesCorrectly()
Copy link
Member Author

Choose a reason for hiding this comment

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

Also customer replication.

@kinyoklion
Copy link
Member Author

bugbot review

Copy link

@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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

@kinyoklion kinyoklion marked this pull request as ready for review February 13, 2026 23:02
@kinyoklion kinyoklion requested a review from a team as a code owner February 13, 2026 23:02
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.

TestData.IfMatchContext and AndMatchContext ignore the contextKind parameter

2 participants