Repository navigation
fix(streaming): satisfy checkpoint state analyzer - #11227
Merged
ReubenBond merged 1 commit intoSep 10, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The equality implementation is correct and null-safe (constructor guards), the API surface is updated accordingly, and a focused regression test covers the new behavior.
Review tier: Lite
Findings: None
What changed in this PR
Fixes a build/analyzer failure in Orleans.Streaming by adding CA1815-compliant value equality to the public StreamCheckpointStoreState struct, ensuring the streaming package can build and pack cleanly.
Changes:
- Implemented
IEquatable<StreamCheckpointStoreState>,Equals,GetHashCode, and==/!=forStreamCheckpointStoreStatebased onCheckpointandVersion. - Added a focused regression test validating value equality and operator behavior.
- Regenerated the
Orleans.Streamingpublic API surface to reflect the new members.
| File | Description |
|---|---|
| test/Orleans.Streaming.Tests/Checkpointers/ReusableStreamQueueCheckpointerTests.cs | Adds a targeted test asserting StreamCheckpointStoreState uses value equality and supports ==/!=. |
| src/Orleans.Streaming/Checkpointers/StreamCheckpointStoreState.cs | Implements value equality members required by CA1815 for the public readonly struct. |
| src/api/Orleans.Streaming/Orleans.Streaming.cs | Updates generated API surface to include the new equality members and interface implementation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The daily
dotnet-orleanspipeline failed during the build/package stage because the new publicStreamCheckpointStoreStatereadonly struct triggered CA1815.Solution
Implement value equality (
IEquatable<T>,Equals,GetHashCode, and==/!=) using the checkpoint and backend version, and add a focused regression test. Regenerate the Orleans.Streaming API surface.Closes #11226
Evidence
Targeted validation
dotnet build src\Orleans.Streaming\Orleans.Streaming.csproj --framework net10.0 --no-restorenet8.0build passed.The full streaming test project still emits pre-existing obsolete API diagnostics in
EncodedOffsetPooledQueueCacheTests; those are unrelated to this analyzer fix.Microsoft Reviewers: Open in CodeFlow