Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
span (a no-op without a `Tracing` span). Routed to the ADR-0014 Telemetry plane. Adds the
`tracing` facade (runtime dep) + `tracing-subscriber` (dev-dep). (ADR-0031 §6, ADR-0014,
ADR-0034.)
- `oath-adapter-net-http-api` `stack()` assembly + `HttpConfig` (Slice 2, assembly) —
`stack<S, T, A, K>()` composes the canonical resilience order (ADR-0031 §1)
`Tracing(CircuitBreaker(Retry(RateLimit(Timeout(SetHeaders(Auth(leaf)))))))` over any
leaf, returning `Result<impl HttpClient + Clone + Send + Sync + 'static, BuildError>`.
It builds the fallible `RateLimit` layer first (running `validate_coverage` +
`validate_concurrency_singleton`), so a coverage/param/singleton failure is a boot
error before the rest is assembled. `HttpConfig` is the non-generic aggregate
(`timeout`, `retry`, `circuit_breaker`, `headers`, `rate_limit_max_wait`); the pacing
map, `auth`, and `timer` are separate arguments. Full-stack ordering invariants
(CircuitBreaker-outside-Retry, RateLimit-inside-Retry, send-Timeout, per-attempt
Auth, Scope fail-closed) are regression-tested over an inline leaf + `MockTimer`. No
new dependency; no existing-layer change. (ADR-0031 §1, ADR-0034.) The hyper leaf +
`build()` land in the following slice.
- net-http construction-surface design refinements (ADR-0034 append-only
Amendments 2026-07-04, spec updated) — an absent `RateLimit<K>` directive now
**fails closed** (not "defaults to `Global`"), closing the last silent
Expand Down
4 changes: 4 additions & 0 deletions crates/adapter/net/http/api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
//! `RequestTimeout` per-request override
//! - [`trace`] — the `Tracing` layer and its `TracingLayer` factory (outermost;
//! one span per request, secret-safe, routed to the ADR-0014 Telemetry plane)
//! - [`stack()`] — `HttpConfig` and the `stack()` assembly composing the canonical
//! resilience order (ADR-0031 §1) over any leaf (Slice 2)
//!
//! The resilience layers, `stack`/`build` assembly, and backends land in later
//! slices. No async runtime, `hyper`, `reqwest`, or `serde` here.
Expand All @@ -34,6 +36,7 @@ pub mod rate;
pub mod rate_limit;
pub mod retry;
pub mod service;
pub mod stack;
pub mod timeout;
pub mod trace;

Expand All @@ -49,5 +52,6 @@ pub use rate::{
pub use rate_limit::{RateLimit, RateLimitLayer, RateScope, Scope};
pub use retry::{Retry, RetryConfig, RetryLayer, Retryable};
pub use service::Service;
pub use stack::{HttpConfig, stack};
pub use timeout::{RequestTimeout, Timeout, TimeoutLayer};
pub use trace::{Tracing, TracingLayer};
Loading