ash-project / ash-project/reactor

Step `max_retries` defaults differ between DSL and Builder APIs

Closed
#338 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Elixir
Stars
203
Forks
28
Avg merge
6d 9h
Merged PRs (30d)
7

Description

## Problem

In Reactor 1.0.6, equivalent steps receive different retry limits depending on how they are constructed:

- `Reactor.Dsl.Step` defaults `max_retries` to `:infinity`.
- `%Reactor.Step{}` also defaults it to `:infinity`.
- `Reactor.Builder.Step.add_step/5` defaults it to `100`, with a test explicitly asserting that behaviour.
- The concepts guide currently says the default is `5`.

This means moving a workflow between the DSL and Builder APIs can silently change its failure behaviour.

## Expected behaviour

Choose and document one default for ordinary user-defined steps across the DSL and Builder APIs, then align the structs, tests, generated DSL documentation, and concepts guide. Built-in step types can continue to use explicit limits where their semantics require them.

Changing either public default may affect existing workflows, so the fix may need migration or release-note guidance.

Contributor guide

Open the contributing guide

Research direction

Start with Reactor.Dsl.Step, %Reactor.Step{}, and Reactor.Builder.Step.add_step/5, then inspect the test that asserts the Builder default. Compare those values with the generated DSL documentation and concepts guide. Done means one documented default for ordinary user-defined steps, aligned structs and tests, and migration or release-note guidance for affected workflows.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
backend
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.