Skip to content

fix(streaming): satisfy checkpoint state analyzer - #11227

Merged
ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:rb-fix-stream-checkpoint-ca1815
Sep 10, 2026
Merged

ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:rb-fix-stream-checkpoint-ca1815

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

Problem

The daily dotnet-orleans pipeline failed during the build/package stage because the new public StreamCheckpointStoreState readonly 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-restore
  • API regeneration and Release net8.0 build passed.
  • Focused equality test passed with the existing obsolete API warnings allowed.

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

Copilot AI lite review requested due to automatic review settings September 10, 2026 05:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 ==/!= for StreamCheckpointStoreState based on Checkpoint and Version.
  • Added a focused regression test validating value equality and operator behavior.
  • Regenerated the Orleans.Streaming public 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.

@ReubenBond
ReubenBond merged commit fc46efa into dotnet:main Sep 10, 2026
15 of 129 checks passed
@ReubenBond
ReubenBond deleted the rb-fix-stream-checkpoint-ca1815 branch September 10, 2026 15:16
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(streaming): resolve CA1815 analyzer failure in StreamCheckpointStoreState

2 participants