Skip to content

local_review: avoid nested full-workflow retries in stdio workers - #588

Merged
rgushchin merged 1 commit into
mainfrom
fix-stdio-worker-nested-retries
Sep 29, 2026
Merged

rgushchin merged 1 commit into
mainfrom
fix-stdio-worker-nested-retries

Conversation

@rgushchin

@rgushchin rgushchin commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

In review_single_patch, the worker currently wraps worker.run in a
hardcoded 1..=3 retry loop. While appropriate for standalone local CLI
reviews, daemon-spawned worker processes (using stdio-* providers) are
already retried by the parent Reviewer up to review.max_retries times,
causing transient failures to multiply into up to 9 full-workflow
attempts.

Set the inner attempt limit to 1 for stdio-* providers so retries are
governed solely by the parent Reviewer. Also record a missing or empty
review_inline field when findings are present as an attempt error in
last_error rather than falling through on the final attempt, ensuring
the worker returns an error so the parent Reviewer triggers its retry
loop.

@sashiko-bot

sashiko-bot Bot commented Sep 29, 2026

Copy link
Copy Markdown

Sashiko review

Commit 1/1 — 9f07ceea local_review: avoid nested full-workflow retries in stdio workers

  • [HIGH] In src/local_review.rs (review_single_patch), reducing max_attempts
    to 1 for stdio workers causes a silent failure when the review_inline field
    is missing. If the attempt limit is reached, the loop falls through and
    returns a successful JSON payload with a null error. Because the worker
    returns success instead of an error on the first failure, the parent daemon
    never triggers its own retry loop. It instead saves the defective findings
    and silently skips sending any notification email.

Full review and stage logs on sashiko.sashiko.dev

In review_single_patch, the worker currently wraps worker.run in a
hardcoded 1..=3 retry loop. While appropriate for standalone local CLI
reviews, daemon-spawned worker processes (using stdio-* providers) are
already retried by the parent Reviewer up to review.max_retries times,
causing transient failures to multiply into up to 9 full-workflow
attempts.

Set the inner attempt limit to 1 for stdio-* providers so retries are
governed solely by the parent Reviewer. Also record a missing or empty
review_inline field when findings are present as an attempt error in
last_error rather than falling through on the final attempt, ensuring
the worker returns an error so the parent Reviewer triggers its retry
loop.

Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev>
@rgushchin
rgushchin force-pushed the fix-stdio-worker-nested-retries branch from 9f07cee to 4758b24 Compare September 29, 2026 05:59
@sashiko-bot

sashiko-bot Bot commented Sep 29, 2026

Copy link
Copy Markdown

Sashiko review — v2

✓ No issues found across 1 commit.

Full review log on sashiko.sashiko.dev

@rgushchin
rgushchin merged commit 4febeb0 into main Sep 29, 2026
3 checks passed
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.

1 participant