Skip to content

feat: expose configurable retry backoff via env vars - #42

Merged
mark-e-deyoung merged 1 commit into
mainfrom
feat/configurable-backoff
Jul 6, 2026
Merged

mark-e-deyoung merged 1 commit into
mainfrom
feat/configurable-backoff

Conversation

@mark-e-deyoung

Copy link
Copy Markdown
Contributor

Summary

Exposes WBAB_RETRY_BACKOFF_BASE and WBAB_RETRY_BACKOFF_MAX environment variables to allow users to tune retry throttling behavior without modifying source code.

Changes

  • core/wbab_core.py: Updated _get_backoff_delay() to read WBAB_RETRY_BACKOFF_BASE (default 2) and WBAB_RETRY_BACKOFF_MAX (default 300) 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: Added TestBackoffDelay class 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

$ python3 -m unittest discover -s tests/unit -p "*.py"
.. (12 tests, all pass)

Closes #41

- 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
@mark-e-deyoung
mark-e-deyoung merged commit 2e32b0d into main Jul 6, 2026
4 of 7 checks passed
@mark-e-deyoung
mark-e-deyoung deleted the feat/configurable-backoff branch July 6, 2026 11:26
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.

feat: Expose configurable retry backoff via env vars

1 participant