Skip to content

refactor: flatten chained | and & into single retry_any/retry_all#609

Merged
mergify[bot] merged 1 commit intomainfrom
devs/jd/fix/retry-base-compose-plain-functions/I3a58c9dfeed2309427e65a1c79cb9ac252db0c2a
Feb 24, 2026
Merged

refactor: flatten chained | and & into single retry_any/retry_all#609
mergify[bot] merged 1 commit intomainfrom
devs/jd/fix/retry-base-compose-plain-functions/I3a58c9dfeed2309427e65a1c79cb9ac252db0c2a

Conversation

@jd
Copy link
Owner

@jd jd commented Feb 24, 2026

When composing multiple retry conditions like a | b | c, the
operators now flatten into retry_any(a, b, c) instead of nesting
retry_any(retry_any(a, b), c). This reduces call stack depth
when debugging complex retry conditions.

Flattening is done in ror/rand (where containers are created)
and in retry_any.ror/retry_all.rand (to extend existing
containers). Async versions get the same treatment.

Fixes #476

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

When composing multiple retry conditions like `a | b | c`, the
operators now flatten into `retry_any(a, b, c)` instead of nesting
`retry_any(retry_any(a, b), c)`. This reduces call stack depth
when debugging complex retry conditions.

Flattening is done in __ror__/__rand__ (where containers are created)
and in retry_any.__ror__/retry_all.__rand__ (to extend existing
containers). Async versions get the same treatment.

Fixes #476

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Change-Id: I3a58c9dfeed2309427e65a1c79cb9ac252db0c2a
@jd jd marked this pull request as ready for review February 24, 2026 16:06
@mergify mergify bot merged commit 44eaefb into main Feb 24, 2026
9 checks passed
@mergify mergify bot deleted the devs/jd/fix/retry-base-compose-plain-functions/I3a58c9dfeed2309427e65a1c79cb9ac252db0c2a branch February 24, 2026 16:07
@mergify
Copy link
Contributor

mergify bot commented Feb 24, 2026

Merge Queue Status

Rule: default


  • Entered queue2026-02-24 16:07 UTC
  • Checks passed · in-place
  • Merged2026-02-24 16:07 UTC · at c25c7b12e111581e2d728f6bbdf47548bf3576f2

This pull request spent 12 seconds in the queue, with no time running CI.

Required conditions to merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Coalesce multiple ORs into a single object

1 participant