Skip to content

Implement policy composition and fallbacks (#8)#11

Merged
cinar merged 2 commits intomainfrom
issue-8
Mar 2, 2026
Merged

Implement policy composition and fallbacks (#8)#11
cinar merged 2 commits intomainfrom
issue-8

Conversation

@cinar
Copy link
Copy Markdown
Owner

@cinar cinar commented Mar 2, 2026

Pull Request

Description

  • Add Fallback support to the retry execution loop in retry.go.

  • Implement WithFallback and WithFallbackErr functional options in options.go.

  • Add comprehensive unit tests in fallback_test.go to verify fallback logic.

  • Update docs/SPEC.md and README.md with fallback strategy documentation.

  • Add a practical fallback example in examples/fallback/main.go.

  • Improve code coverage to 100% for the core package.

  • Fixes Policy Composition & Fallbacks #8

  • New Feature

cinar added 2 commits March 1, 2026 23:34
- Add Fallback support to the retry execution loop in retry.go.
- Implement WithFallback and WithFallbackErr functional options in options.go.
- Add comprehensive unit tests in fallback_test.go to verify fallback logic.
- Update docs/SPEC.md and README.md with fallback strategy documentation.
- Add a practical fallback example in examples/fallback/main.go.
- Improve code coverage to 100% for the core package.
@cinar cinar merged commit a61b085 into main Mar 2, 2026
4 checks passed
@cinar cinar deleted the issue-8 branch March 2, 2026 15:06
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 35.00000% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.17%. Comparing base (b61b47d) to head (d768fce).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
examples/fallback/main.go 0.00% 26 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #11      +/-   ##
==========================================
- Coverage   74.49%   73.17%   -1.32%     
==========================================
  Files          11       12       +1     
  Lines         345      384      +39     
==========================================
+ Hits          257      281      +24     
- Misses         82      101      +19     
+ Partials        6        2       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Policy Composition & Fallbacks

2 participants