Repository navigation
feat(engine): evaluate conditional edges independently - #55
Merged
Merged
Conversation
Replace the N-choose-1 route selection with per-edge allow/deny: onRoute
now receives one conditional edge per call (RouteRequest carries the step,
condition and upstream window) and answers with RouteDecision.allow/deny
for that edge. Unconditional edges always run and bypass the callback, so
mixed-edge steps no longer risk swallowing an unconditional successor;
allowed conditional edges activate in parallel with them.
Routing failures are normalized per edge: synchronous throws, null
futures, null decisions and timeouts all become edge-identifiable
failures ("onRoute failed for edge <src> -> <tgt>") that preserve the
original cause, invoke every remaining conditional callback first, and
suppress all successors. Workflow validation now rejects duplicate
outgoing targets, null edges and blank targets. The route_decision event
is emitted once per edge after the whole routing phase succeeds.
Signed-off-by: Zhoujie628 <zhoujie628@users.noreply.github.com>
Record the breaking routing change in the changelog (single-edge RouteRequest, allow/deny RouteDecision, removed nextStep/candidates, new graph validation rules, per-edge route_decision events) and align the bilingual API reference, callback contract, design, developer and integration guides with the implemented semantics. Signed-off-by: Zhoujie628 <zhoujie628@users.noreply.github.com>
Expand the wildcard imports (model, client, java.util, java.util.concurrent and static Assertions) that the IDE auto-collapsed back into explicit single-class imports across the seven touched files. No code change. Signed-off-by: Zhoujie628 <zhoujie628@users.noreply.github.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #54
Summary
RouteDecision.allow()/deny()answers that edge, and unconditional edges always run — fixing mixed-edge steps where an unconditional successor could previously be outvoted.RouteDecision.nextStepandRouteRequest.candidatesare removed (breaking, recorded in the changelog).route_decisiononce per edge after the routing phase succeeds.Test plan
mvn -B clean verify: 321/321 green (engine 205, starter 21, samples 95)reviews/