Skip to content

Conversation

@keisar
Copy link
Contributor

@keisar keisar commented Oct 27, 2025

No description provided.

@keisar keisar requested review from Copilot and somdoron October 27, 2025 08:54
@keisar keisar self-assigned this Oct 27, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR converts the StateMachine trait from using zio.prelude.State to zio.prelude.fx.ZPure, adding a new type parameter W for write accumulation. The change updates the trait signature and propagates the type parameter throughout the codebase.

  • Adds a W type parameter to StateMachine trait and all implementations
  • Changes the return type of apply method from State[S, command.Response] to ZPure[W, S, S, Any, Nothing, command.Response]
  • Updates all type signatures in test files and the main Raft implementation to include the new W parameter

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
raft/src/main/scala/zio/raft/StateMachine.scala Updates trait definition to add W type parameter and changes return type to ZPure
raft/src/main/scala/zio/raft/Raft.scala Adds W type parameter to Raft class and factory methods
raft/src/test/scala/zio/raft/TestStateMachine.scala Updates test implementation to use ZPure with Any for W parameter
raft/src/test/scala/zio/raft/RaftSpec.scala Updates all test helper method signatures to include W type parameter
raft/src/test/scala/zio/raft/RaftIntegrationSpec.scala Updates integration test method signatures with new type parameter
kvstore/src/main/scala/zio/kvstore/App.scala Updates KV store implementation to use ZPure with Any for W parameter

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@keisar keisar requested a review from Copilot October 27, 2025 09:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@keisar keisar merged commit d489068 into main Oct 27, 2025
3 checks passed
@keisar keisar deleted the statemachine-zpure branch October 27, 2025 09:05
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