Uh oh!
There was an error while loading. Please reload this page.
fix(e2e): add retry-with-backoff for DigitalOcean 422 droplet limit errors - #2520
Merged
Conversation
…rrors When provisioning hits a 422 "droplet limit exceeded" response, wait 30s and retry up to 3 times. Makes E2E suite resilient to transient limit hits during parallel batch provisioning. Fixes#2516 Agent: code-health Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
louisgv
approved these changes
Mar 12, 2026
louisgv
left a comment
Collaborator
There was a problem hiding this comment.
Security Review
Verdict: APPROVED
Commit: c8b3c93
Findings
No security issues found. The retry-with-backoff implementation is safe and follows project conventions:
- ✅ Loop bounds properly validated (max 3 retries)
- ✅ Fixed sleep duration (30s) - no user-controlled timing
- ✅ Grep pattern is fixed string literal - no regex injection
- ✅ File existence checks before grep operations
- ✅ Integer arithmetic uses bash 3.2-compatible syntax
- ✅ Error messages use script-controlled counters only
- ✅ All variables properly quoted and locally scoped with
_prefix - ✅ State tracking via integer flag prevents logic errors
- ✅ Clean failure paths with proper error reporting
Tests
- bash -n: PASS (no syntax errors)
- bun test: N/A (shell script only)
- curl|bash: OK (no network calls in changed code)
- macOS compat: OK (no bash 3.x incompatibilities introduced)
Implementation Quality
The retry logic is conservative and defensive:
- Only retries on specific droplet limit / quota error patterns
- Validates stderr file exists before pattern matching
- Limited retry attempts prevent infinite loops
- Fixed backoff interval prevents DoS behavior
- Preserves all existing security controls (app_name validation, env var whitelisting, base64 validation)
-- security/pr-reviewer
Uh oh!
There was an error while loading. Please reload this page.
AhmedTMM pushed a commit
to AhmedTMM/spawn
that referenced
this pull request
Mar 12, 2026
…rrors (OpenRouterLabs#2520) When provisioning hits a 422 "droplet limit exceeded" response, wait 30s and retry up to 3 times. Makes E2E suite resilient to transient limit hits during parallel batch provisioning. FixesOpenRouterLabs#2516 Agent: code-health Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
AhmedTMM pushed a commit
to AhmedTMM/spawn
that referenced
this pull request
Mar 13, 2026
…rrors (OpenRouterLabs#2520) When provisioning hits a 422 "droplet limit exceeded" response, wait 30s and retry up to 3 times. Makes E2E suite resilient to transient limit hits during parallel batch provisioning. FixesOpenRouterLabs#2516 Agent: code-health Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
AhmedTMM pushed a commit
to AhmedTMM/spawn
that referenced
this pull request
Mar 13, 2026
…rrors (OpenRouterLabs#2520) When provisioning hits a 422 "droplet limit exceeded" response, wait 30s and retry up to 3 times. Makes E2E suite resilient to transient limit hits during parallel batch provisioning. FixesOpenRouterLabs#2516 Agent: code-health Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why: E2E suite fails permanently on DigitalOcean 422 "droplet limit exceeded" errors instead of retrying — makes the suite fragile to transient capacity issues during parallel batch provisioning.
Changes
provision_agent()(sh/e2e/lib/provision.sh)$((...))not((var++)))Fixes#2516
-- refactor/code-health