Problem
onFailure retry N otherwise "X" exists today (NodeBuilderTest.kt:70, wired via RetryBuilder.kt:27 → FailureTransition). Stochastic parallel agents can tie on first attempt and resolve on retry. Extend
the same DSL form to onNoConsensus.
Investigation (do first)
onNoConsensus transition type. Determine whether it constructs a FailureTransition (shared HensuState.retryCount → cross-corruption with execution failures) or its own transition with an isolated
counter. Source: hensu-dsl/.../ParallelNodeBuilder.kt. If alias → must split before adding retry.
FailureTransition.evaluate side-effect (FailureTransition.java:16 increments inside evaluate). Decide: fix purity first, or scope-document and move on.
Implementation
- Distinct
NoConsensusTransition (or split from FailureTransition) with its own counter (consensusRetryCount on HensuState).
- DSL:
onNoConsensus retry 3 otherwise "fallback".
- Increment counter in executor /
TransitionPostProcessor, not inside evaluate.
Tests
- Stochastic stub agents tie on attempt 1, break tie on attempt 2 → success.
- Retry budget exhausted → routes to
otherwise target.
- Execution failure on a parallel node does NOT consume
consensusRetryCount, and vice versa.
Out of scope
onReject retry N (rejected: deterministic reviewer → infinite loop; same input across retries provides no value).
- Arbitrator/judge node pattern.
- General
evaluate() purity refactor across other transition types.
Problem
onFailure retry N otherwise "X"exists today (NodeBuilderTest.kt:70, wired viaRetryBuilder.kt:27→FailureTransition). Stochastic parallel agents can tie on first attempt and resolve on retry. Extendthe same DSL form to
onNoConsensus.Investigation (do first)
onNoConsensustransition type. Determine whether it constructs aFailureTransition(sharedHensuState.retryCount→ cross-corruption with execution failures) or its own transition with an isolatedcounter. Source:
hensu-dsl/.../ParallelNodeBuilder.kt. If alias → must split before adding retry.FailureTransition.evaluateside-effect (FailureTransition.java:16increments insideevaluate). Decide: fix purity first, or scope-document and move on.Implementation
NoConsensusTransition(or split fromFailureTransition) with its own counter (consensusRetryCountonHensuState).onNoConsensus retry 3 otherwise "fallback".TransitionPostProcessor, not insideevaluate.Tests
otherwisetarget.consensusRetryCount, and vice versa.Out of scope
onReject retry N(rejected: deterministic reviewer → infinite loop; same input across retries provides no value).evaluate()purity refactor across other transition types.