Review Resilience
Review changed code; expand crate-wide only on request. Read diff, manifests,
errors/conversions, resilience call sites including unchanged callers,
configuration and focused tests.
Follow shared context and the
findings contract. Own recovery
propagation/classification and middleware selection/composition. Route
error/panic conventions to review-api-design, other runtime defects to
review-correctness, and emitted contracts to review-telemetry.
Use recoverable/seatbelt only where shared repository adaptation selects them;
else use repository equivalents, not new Oxidizer dependencies.
Procedure
Resolve exact recipes. Use cargo metadata and any lockfile to resolve
each package's recoverable edge, including aliases/multiple versions. Read
that version's recoverable::_documentation::recipes or
src/_documentation/recipes.rs; extract applicable inner-propagation,
permanent-error or heuristic recipes, not remembered classifications. Before
recommending seatbelt, resolve dependency/workspace-approved version,
enabled features and module docs. If approved without an established version,
recommend only crate/feature, never an invented version-specific call.
Inventory failure flows. Trace transient failures, unavailability,
timeouts, throttling, connection loss, temporary resource pressure and
wrappers from origin to caller, including conversions erasing inner errors.
Check every recovery boundary.
- Require
Recovery when some state may recover or classification may evolve;
permanently non-recoverable-only errors need no trait.
- Apply recipe
RecoveryInfo; preserve inner recovery through conversions,
e.g. recovery: error.recovery() in ohno #[from]. Override only for
outer context that changes recoverability.
- Use supported heuristics for foreign errors without
Recovery; for
std::io::Error, prefer built-in ErrorKind conversion and traverse
Error::source() when buried. Use typed variants/kinds/causes, not text.
Recovery informs, not performs, recovery. Preserve Retry-After and
other useful delay hints. Test recoverable, unavailable, permanent,
wrapped and heuristic paths.
Find equivalent middleware. Inspect attempt loops/counters, sleeps,
backoff/jitter, deadline races, timeout cancellation, breaker state, parallel
hedges, fallback routing and fault injection:
| Behavior |
Prefer |
| retry/backoff/jitter |
seatbelt::retry |
| per-attempt timeout |
seatbelt::timeout |
| open/half-open state |
seatbelt::breaker |
| duplicate concurrent attempts |
seatbelt::hedging |
| replacement output/route |
seatbelt::fallback |
| injected failures |
seatbelt::chaos::injection (chaos-injection) |
| injected latency |
seatbelt::chaos::latency (chaos-latency) |
Enable only required features; there are no defaults. Reuse config types and
vocabulary. Prefer static composition, usually outside-to-inside
fallback -> retry -> breaker -> timeout, so every attempt is timed and
observed by the breaker. Check input cloning/restoration, idempotency, delay
hints, cancellation/drop and breaker partitioning. Do not duplicate supplied
telemetry/jitter. Gate production fault injection with the repository's
test-only feature convention.
Exclude lookalikes. Business workflow loops, protocol-mandated
retransmission and simple value fallback (unwrap_or) are not automatically
resilience. Trace equivalent failure-handling semantics before recommending
middleware.
Proof and coverage
Identify triggering flow, lost/incorrect classification or duplicate mechanism,
decisive evidence, reliability impact and recipe-based/version-correct fix.
Static API/dependency findings can use code and resolved docs. Executable claims
need shared-rule reproduction with focused command/result; unconfirmed behavior
is a question or limitation.
Coverage: errors/mechanisms and resolved recoverable/seatbelt versions or
repository equivalents.
1---2name: review-resilience3description: Review Rust changes for recovery classification and retry, timeout, circuit-breaker, hedging, fallback or chaos behavior that should use approved middleware. In recoverable/seatbelt repositories, checks Recovery against the exact recoverable version's _documentation::recipes and audits seatbelt adoption. Use for a PR, branch, commit, working-tree diff, or focused crate audit. Not for a general code review or ordinary error changes with no recovery concern.4---56# Review Resilience78Review changed code; expand crate-wide only on request. Read diff, manifests,9errors/conversions, resilience call sites including unchanged callers,10configuration and focused tests.1112Follow [shared context](../review-lens/review-context.md) and the13[findings contract](../review-delivery/findings-contract.md). Own recovery14propagation/classification and middleware selection/composition. Route15error/panic conventions to `review-api-design`, other runtime defects to16`review-correctness`, and emitted contracts to `review-telemetry`.1718Use `recoverable`/`seatbelt` only where shared repository adaptation selects them;19else use repository equivalents, not new Oxidizer dependencies.2021## Procedure22231. **Resolve exact recipes.** Use `cargo metadata` and any lockfile to resolve24 each package's `recoverable` edge, including aliases/multiple versions. Read25 that version's `recoverable::_documentation::recipes` or26 `src/_documentation/recipes.rs`; extract applicable inner-propagation,27 permanent-error or heuristic recipes, not remembered classifications. Before28 recommending `seatbelt`, resolve dependency/workspace-approved version,29 enabled features and module docs. If approved without an established version,30 recommend only crate/feature, never an invented version-specific call.312. **Inventory failure flows.** Trace transient failures, unavailability,32 timeouts, throttling, connection loss, temporary resource pressure and33 wrappers from origin to caller, including conversions erasing inner errors.343. **Check every recovery boundary.**35 - Require `Recovery` when some state may recover or classification may evolve;36 permanently non-recoverable-only errors need no trait.37 - Apply recipe `RecoveryInfo`; preserve inner recovery through conversions,38 e.g. `recovery: error.recovery()` in `ohno` `#[from]`. Override only for39 outer context that changes recoverability.40 - Use supported heuristics for foreign errors without `Recovery`; for41 `std::io::Error`, prefer built-in `ErrorKind` conversion and traverse42 `Error::source()` when buried. Use typed variants/kinds/causes, not text.43 - `Recovery` informs, not performs, recovery. Preserve `Retry-After` and44 other useful delay hints. Test recoverable, unavailable, permanent,45 wrapped and heuristic paths.464. **Find equivalent middleware.** Inspect attempt loops/counters, sleeps,47 backoff/jitter, deadline races, timeout cancellation, breaker state, parallel48 hedges, fallback routing and fault injection:4950 | Behavior | Prefer |51 | --- | --- |52 | retry/backoff/jitter | `seatbelt::retry` |53 | per-attempt timeout | `seatbelt::timeout` |54 | open/half-open state | `seatbelt::breaker` |55 | duplicate concurrent attempts | `seatbelt::hedging` |56 | replacement output/route | `seatbelt::fallback` |57 | injected failures | `seatbelt::chaos::injection` (`chaos-injection`) |58 | injected latency | `seatbelt::chaos::latency` (`chaos-latency`) |5960 Enable only required features; there are no defaults. Reuse config types and61 vocabulary. Prefer static composition, usually outside-to-inside62 `fallback -> retry -> breaker -> timeout`, so every attempt is timed and63 observed by the breaker. Check input cloning/restoration, idempotency, delay64 hints, cancellation/drop and breaker partitioning. Do not duplicate supplied65 telemetry/jitter. Gate production fault injection with the repository's66 test-only feature convention.675. **Exclude lookalikes.** Business workflow loops, protocol-mandated68 retransmission and simple value fallback (`unwrap_or`) are not automatically69 resilience. Trace equivalent failure-handling semantics before recommending70 middleware.7172## Proof and coverage7374Identify triggering flow, lost/incorrect classification or duplicate mechanism,75decisive evidence, reliability impact and recipe-based/version-correct fix.76Static API/dependency findings can use code and resolved docs. Executable claims77need shared-rule reproduction with focused command/result; unconfirmed behavior78is a question or limitation.7980Coverage: errors/mechanisms and resolved `recoverable`/`seatbelt` versions or81repository equivalents.