Class StepEvaluator

java.lang.Object
cloud.opencode.base.flow.internal.StepEvaluator

public final class StepEvaluator extends Object
Evaluates whether a given Step has reached its terminal state given the current set of Tasks and VoteRecords in the repository. 基于当前 Task / VoteRecord 状态,判定给定 Step 是否 已达到终态(通过 / 驳回 / 仍在进行)。

Strategy semantics implemented (v4 §8.3):

  • APPROVE / sequential: every PENDING-or-DONE task must be DONE and every outcome must be APPROVED ⇒ APPROVED; any REJECTED ⇒ REJECTED.
  • APPROVE / one_of_n: any APPROVED ⇒ APPROVED; all DONE with no APPROVED ⇒ REJECTED.
  • VOTE / all: all DONE and all votes AGREE ⇒ APPROVED; any DISAGREE confirmed ⇒ REJECTED.
  • VOTE / any: any AGREE ⇒ APPROVED; all DONE with no AGREE ⇒ REJECTED.
  • VOTE / majority: all DONE then majority AGREE ⇒ APPROVED, else REJECTED.
  • VOTE / veto: any DISAGREE ⇒ immediately REJECTED; otherwise follow majority when all DONE.
Since:
JDK 25, opencode-base-flow V1.0.5
Author:
Leon Soo