Skip to content

fix(reliability): add default shouldRetry to retryWithJitter (E2-2) (#1430)#1546

Merged
OneStepAt4time merged 1 commit intodevelopfrom
fix/retry-jitter-default-1430
Apr 9, 2026
Merged

fix(reliability): add default shouldRetry to retryWithJitter (E2-2) (#1430)#1546
OneStepAt4time merged 1 commit intodevelopfrom
fix/retry-jitter-default-1430

Conversation

@OneStepAt4time
Copy link
Copy Markdown
Owner

Summary

  • retryWithJitter now uses error-categories.shouldRetry(categorize(err)) as the default policy when no shouldRetry callback is provided
  • Previously, omitting shouldRetry caused every error to retry — including auth failures, validation errors, and permission rejections
  • Custom shouldRetry callbacks still override the default

Test plan

  • Validation error stops after first attempt (no retries)
  • Auth error stops after first attempt
  • Permission error stops after first attempt
  • Transient network errors still retry and recover
  • Tmux errors still retry and recover
  • Custom shouldRetry overrides the default
  • npx tsc --noEmit passes
  • npm run build passes
  • npm test — 2584 passed, 0 failed

Aegis version

Developed with: v0.3.2-alpha

Closes #1430

Generated by Hephaestus (Aegis dev agent)

…1430)

When no shouldRetry callback is provided, retryWithJitter now uses
error-categories.shouldRetry(categorize(err)) instead of blindly
retrying every error. This prevents auth failures, validation errors,
and permission rejections from being retried.

Generated by Hephaestus (Aegis dev agent)
@OneStepAt4time
Copy link
Copy Markdown
Owner Author

🔧 PR #1546 ready for review: fix(reliability): add default shouldRetry to retryWithJitter (E2-2) (#1430). CI is CLEAN. Please review.

Copy link
Copy Markdown
Contributor

@aegis-gh-agent aegis-gh-agent bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Using error-categories.shouldRetry as default is the right fix — transient errors retry, validation/auth/permission errors fail fast. Tests are comprehensive. CI green.

@OneStepAt4time OneStepAt4time merged commit d1d563f into develop Apr 9, 2026
9 checks passed
@OneStepAt4time OneStepAt4time deleted the fix/retry-jitter-default-1430 branch April 9, 2026 14:39
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