Skip to content

feat(seatbelt): add handle_unavailable to RetryConfig and HedgingConfig#314

Open
martintmk wants to merge 4 commits intomainfrom
seatbelt/add-handle-unavailable-to-config
Open

feat(seatbelt): add handle_unavailable to RetryConfig and HedgingConfig#314
martintmk wants to merge 4 commits intomainfrom
seatbelt/add-handle-unavailable-to-config

Conversation

@martintmk
Copy link
Member

Add the handle_unavailable boolean field to both config structs so it can be driven from external configuration sources (e.g. config files). The field defaults to false, matching the existing layer default.

The config() methods on RetryLayer and HedgingLayer now forward the new field, and all snapshot tests are updated accordingly.

Add the handle_unavailable boolean field to both config structs so it
can be driven from external configuration sources (e.g. config files).
The field defaults to false, matching the existing layer default.

The config() methods on RetryLayer and HedgingLayer now forward the
new field, and all snapshot tests are updated accordingly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 10, 2026 16:18
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a handle_unavailable: bool flag to both retry and hedging configuration structs so the existing layer behavior can be controlled via externally loaded config (e.g., JSON), and wires those configs through the respective Layer::config() convenience methods.

Changes:

  • Add handle_unavailable to RetryConfig and HedgingConfig with a default of false.
  • Forward handle_unavailable through RetryLayer::config() and HedgingLayer::config().
  • Update relevant insta snapshots to reflect the new field.

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
crates/seatbelt/src/retry/config.rs Adds handle_unavailable to RetryConfig and documents its default/meaning.
crates/seatbelt/src/retry/layer.rs Forwards handle_unavailable from RetryConfig via .config().
crates/seatbelt/src/retry/snapshots/seatbelt__retry__config__tests__default_snapshot.snap Updates JSON snapshot to include handle_unavailable.
crates/seatbelt/src/retry/snapshots/seatbelt__retry__layer__tests__config_applies_all_settings.snap Updates debug snapshot for config_applies_all_settings.
crates/seatbelt/src/hedging/config.rs Adds handle_unavailable to HedgingConfig and documents its default/meaning.
crates/seatbelt/src/hedging/layer.rs Forwards handle_unavailable from HedgingConfig via .config().
crates/seatbelt/src/hedging/snapshots/seatbelt__hedging__config__tests__default_snapshot.snap Updates JSON snapshot to include handle_unavailable.
crates/seatbelt/src/hedging/snapshots/seatbelt__hedging__layer__tests__config_applies_all_settings.snap Updates debug snapshot for config_applies_all_settings.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Mar 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.0%. Comparing base (d60d207) to head (d03c4c7).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #314   +/-   ##
=======================================
  Coverage   100.0%   100.0%           
=======================================
  Files         153      153           
  Lines        9401     9405    +4     
=======================================
+ Hits         9401     9405    +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.

Copilot AI review requested due to automatic review settings March 12, 2026 16:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 13 out of 14 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

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.

3 participants