feat: expose configurable retry backoff via env vars - #42
Merged
Merged
Conversation
- Add WBAB_RETRY_BACKOFF_BASE (default 2) and WBAB_RETRY_BACKOFF_MAX
(default 300) env vars to Executor._get_backoff_delay()
- Both vars fall back to defaults if unset, non-numeric, or out of range
- Base clamped to minimum 2, max clamped to minimum 1
- Add TestBackoffDelay class with 8 tests covering defaults, custom
values, clamping, and non-numeric fallback
- Update docs/CONTRACTS.md with new env var documentation
- Update BACKLOG.md to mark Item 4 completed
Closes #41
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 free
to 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.
Summary
Exposes
WBAB_RETRY_BACKOFF_BASEandWBAB_RETRY_BACKOFF_MAXenvironment variables to allow users to tune retry throttling behavior without modifying source code.Changes
core/wbab_core.py: Updated_get_backoff_delay()to readWBAB_RETRY_BACKOFF_BASE(default2) andWBAB_RETRY_BACKOFF_MAX(default300) from environment. Both fall back to defaults if unset, non-numeric, or out of range (base < 2 clamped to 2, max < 1 clamped to 300).tests/unit/test_scm.py: AddedTestBackoffDelayclass with 8 tests covering defaults, custom values, combined settings, non-numeric fallback, and clamping.docs/CONTRACTS.md: Documented new env vars.BACKLOG.md: Marked Item 4 as completed.Testing
Closes #41