Skip to content

Conversation

@martintmk
Copy link
Member

@martintmk martintmk commented Jan 16, 2026

still WIP

@codecov
Copy link

codecov bot commented Jan 16, 2026

Codecov Report

❌ Patch coverage is 93.90519% with 81 lines in your changes missing coverage. Please review.
✅ Project coverage is 99.0%. Comparing base (fb231dc) to head (5b6b54b).

Files with missing lines Patch % Lines
...elt/src/circuit_breaker/engine/engine_telemetry.rs 79.5% 20 Missing ⚠️
crates/seatbelt/src/circuit_breaker/args.rs 14.2% 18 Missing ⚠️
crates/seatbelt/src/retry/layer.rs 92.0% 10 Missing ⚠️
crates/seatbelt/src/circuit_breaker/layer.rs 94.4% 8 Missing ⚠️
crates/seatbelt/src/retry/service.rs 95.6% 5 Missing ⚠️
crates/seatbelt/src/rnd.rs 72.2% 5 Missing ⚠️
...seatbelt/src/circuit_breaker/engine/probing/mod.rs 86.3% 3 Missing ⚠️
crates/seatbelt/src/options/define_fn_wrapper.rs 78.5% 3 Missing ⚠️
crates/seatbelt/src/retry/args.rs 88.8% 3 Missing ⚠️
crates/seatbelt/src/timeout/service.rs 92.5% 3 Missing ⚠️
... and 3 more
Additional details and impacted files
@@           Coverage Diff            @@
##             main    #203     +/-   ##
========================================
- Coverage   100.0%   99.0%   -1.0%     
========================================
  Files         106     135     +29     
  Lines        6845    8174   +1329     
========================================
+ Hits         6845    8093   +1248     
- Misses          0      81     +81     

☔ 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.

@github-actions
Copy link

github-actions bot commented Jan 16, 2026

⚠️ Breaking Changes Detected

error: failed to retrieve local crate data from git revision

Caused by:
    0: failed to retrieve manifest file from git revision source
    1: possibly due to errors: [
         failed to parse /home/runner/work/oxidizer/oxidizer/target/semver-checks/git-origin_main/c4930327a95c9c19ab4e8f010f81fae06419654c/Cargo.toml: no `package` table,
         failed when reading /home/runner/work/oxidizer/oxidizer/target/semver-checks/git-origin_main/c4930327a95c9c19ab4e8f010f81fae06419654c/scripts/crate-template/Cargo.toml: TOML parse error at line 9, column 26
         |
       9 | keywords = ["oxidizer", {{CRATE_KEYWORDS}}]
         |                          ^
       missing key for inline table element, expected key
       : TOML parse error at line 9, column 26
         |
       9 | keywords = ["oxidizer", {{CRATE_KEYWORDS}}]
         |                          ^
       missing key for inline table element, expected key
       ,
       ]
    2: package `seatbelt` not found in /home/runner/work/oxidizer/oxidizer/target/semver-checks/git-origin_main/c4930327a95c9c19ab4e8f010f81fae06419654c

Stack backtrace:
   0: anyhow::error::<impl anyhow::Error>::msg
   1: cargo_semver_checks::rustdoc_gen::RustdocFromProjectRoot::get_crate_source
   2: cargo_semver_checks::rustdoc_gen::StatefulRustdocGenerator<cargo_semver_checks::rustdoc_gen::CoupledState>::prepare_generator
   3: cargo_semver_checks::Check::check_release::{{closure}}
   4: cargo_semver_checks::Check::check_release
   5: cargo_semver_checks::exit_on_error
   6: cargo_semver_checks::main
   7: std::sys::backtrace::__rust_begin_short_backtrace
   8: main

If the breaking changes are intentional then everything is fine - this message is merely informative.

Remember to apply a version number bump with the correct severity when publishing a version with breaking changes (1.x.x -> 2.x.x or 0.1.x -> 0.2.x).

typeid = { version = "1.0.3", default-features = false }
windows-sys = { version = "0.61.2", default-features = false }
xxhash-rust = { version = "0.8.15", default-features = false }
fastrand = { version = "2.3.0", default-features = false, features = ["std"] }
Copy link
Member

Choose a reason for hiding this comment

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

Shoudl not have a feature specified here, do it in the crate's Cargo.toml. Same for http below.

Copy link
Member

Choose a reason for hiding this comment

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

Also, keep the dependencies sorted.


[package]
name = "seatbelt"
description = "Resilience and recovery mechanisms for services, applications, and libraries."
Copy link
Member

Choose a reason for hiding this comment

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

How about

"Resilience and recovery mechanisms for fallible operations.

description = "Resilience and recovery mechanisms for services, applications, and libraries."
version = "0.1.0"
readme = "README.md"
keywords = ["oxidizer", "resilience", "tower", "recovery", "retry", "circuit-breaker"]
Copy link
Member

Choose a reason for hiding this comment

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

Should "tower" be replaced with "layered"?

reason = "Too ugly to make 'live links' possible with the combination of features"
)]

//! Resilience and fault handling for applications and libraries.
Copy link
Member

Choose a reason for hiding this comment

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

Match the description in Cargo.toml and in the top-level README.md


//! Resilience and fault handling for applications and libraries.
//!
//! This crate helps applications handle transient faults gracefully through composable
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
//! This crate helps applications handle transient faults gracefully through composable
//! This crate helps you handle transient faults gracefully through composable

//!
//! - `options`: Enables common APIs for building resilience middleware, including [`SeatbeltOptions`].
//! Requires [`tick`] for timing operations.
//! - `service`: Re-exports common types for building middleware from [`layered`] crate.
Copy link
Member

Choose a reason for hiding this comment

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

How about calling this feature "layered"?


/// Re-exported types from the [`layered`] crate.
#[cfg(any(feature = "service", test))]
pub mod service {
Copy link
Member

Choose a reason for hiding this comment

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

Always maybe call this module layered?

///
/// The default attempt has:
/// - `attempt`: 0 (first attempt, 0-based indexing)
/// - `is_last`: true (indicating this is both the first and last attempt)
Copy link
Member

Choose a reason for hiding this comment

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

What? Why is is_last true for the first attempt?

/// > `layered` and reference it here instead of diverging.
#[derive(Debug)]
#[non_exhaustive]
pub struct SeatbeltOptions<In, Out> {
Copy link
Member

Choose a reason for hiding this comment

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

I worry that this is not serializable. Ultimately, I think we want Seatbelt to be configurable through JSON at the top. So I think we want to separate "options state" from things like Clock which is a runtime construct.

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