aglinxinyuan opened a new pull request, #4738: URL: https://github.com/apache/texera/pull/4738
### What changes were proposed in this PR? Add `StateManagerSpec` covering the full public surface of `StateManager` (`amber/src/main/scala/org/apache/texera/amber/engine/common/statetransition/StateManager.scala`): - `getCurrentState` reports the initial state - `transitTo` advances on a valid edge, is a no-op on self-transition, throws `InvalidTransitionException` for non-successor targets, and throws for states absent from the graph keys - `assertState` (single + varargs) returns normally on match and throws `InvalidStateException` on mismatch - `confirmState` (single + varargs) reports membership without side effects - `conditionalTransitTo` runs the callback only when the precondition holds, does nothing otherwise, and still validates the transition edge ### Any related issues, documentation, discussions? Closes #4737 ### How was this PR tested? `sbt "WorkflowExecutionService/testOnly org.apache.texera.amber.engine.common.statetransition.StateManagerSpec"` — 13/13 tests pass. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 4.7) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
