Skip to content

fix(kotlin): Honor Retry-After for pool warmups - #1512

Merged
Pangjiping merged 3 commits into
opensandbox-group:mainfrom
Gujiassh:fix/kotlin-pool-retry-after-1500
Aug 19, 2026
Merged

fix(kotlin): Honor Retry-After for pool warmups#1512
Pangjiping merged 3 commits into
opensandbox-group:mainfrom
Gujiassh:fix/kotlin-pool-retry-after-1500

Conversation

@Gujiassh

Copy link
Copy Markdown
Contributor

Summary

  • Preserve SandboxRateLimitException during Kotlin pool warmup completion and pause new warmups for Retry-After, with a 10-second default and the existing 60-second SDK cap.
  • Keep rate-limit throttling separate from degraded failure accounting, extend concurrent deadlines monotonically, and schedule a reconcile as soon as the throttle expires.
  • Keep idle reaping and shrink active during throttling, reset the local throttle on pool restart, and document the behavior.

The rate-limit state is scoped to the active pool run, avoiding a shared PoolStateStore contract change and keeping this fix separate from the windowed degraded-detection work in #1499.

Fixes #1500.

Testing

  • Not run (explain why)
  • Unit tests: ./gradlew :sandbox:test (324 tests, 0 failures)
  • Integration tests
  • e2e / manual verification: focused one-second Retry-After recovery and stop/start reset tests
  • ./gradlew spotlessCheck
  • pnpm docs:build

Breaking Changes

  • None
  • Yes (describe impact and migration path)

Checklist

  • Linked Issue or clearly described motivation
  • Added/updated docs (if needed)
  • Added/updated tests (if needed)
  • Security impact considered
  • Backward compatibility considered

@github-actions github-actions Bot added documentation Improvements or additions to documentation sdk/java sdks size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 14, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a499814066

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Fall back to the default warmup delay when Retry-After is zero or
non-positive, and document that snapshot().backoffActive also covers
the rate-limit throttle.
@Pangjiping Pangjiping self-assigned this Aug 19, 2026

@Pangjiping Pangjiping left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@Pangjiping
Pangjiping merged commit b8cabe5 into opensandbox-group:main Aug 19, 2026
57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation sdk/java sdks size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kotlin SandboxPool ignores Retry-After on rate-limited warmup creates

3 participants