You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add all remaining capability trait modules to oath-net-core.
These are the policy-boundary traits that every net-<backend> and adapter-* crate depends on as bounds.
Depends on: #12 (composition primitives must be merged first)
Spec: crates/net/core/PLAN.md — Layer 1 § Capability traits, § HTTP / WS operation contracts, § Module layout.
Update with mod declarations and pub use re-exports for all new modules (in addition to those added in #12).
Design constraints (from PLAN.md)
Every trait is RPITIT — fn … -> impl Future<…> + Send. No async-trait, no dyn.
net-core has zero runtime deps — no tokio, hyper, reqwest, tracing, serde, or thiserror.
WsClient uses futures-core::Stream and futures-sink::Sink for its split-half signatures.
AuthProvider and Codec are kept deliberately minimal — broker-specific logic lives in adapter-<broker>.
LoadShedPolicy decisions take RequestMetadata as input so broker adapters can supply per-endpoint priority rules without importing backend internals.
Acceptance criteria
just ci passes
All 9 traits (RateLimiter, RetryPolicy, SessionProvider, CircuitBreaker, ConcurrencyLimiter, LoadShedPolicy, AuthProvider, Codec, HasErrorKind) are pub from the crate root
WsClient compiles with futures-core / futures-sink bounds and no concrete runtime
No tokio, hyper, serde, thiserror anywhere in the crate
All public items have /// doc comments (enforced by missing_docs lint)
Summary
Add all remaining capability trait modules to
oath-net-core.These are the policy-boundary traits that every
net-<backend>andadapter-*crate depends on as bounds.Depends on: #12 (composition primitives must be merged first)
Spec:
crates/net/core/PLAN.md— Layer 1 § Capability traits, § HTTP / WS operation contracts, § Module layout.Files to create
endpoint.rsHttpEndpoint— operation descriptor (method, path, etc.)metadata.rsRequestMetadata— per-request weight annotation and contextrate_limit.rsRateLimitertraitretry.rsRetryPolicytraitsession.rsSessionProvidertraitcircuit.rsCircuitBreakertraitconcurrency.rsConcurrencyLimitertraitload_shed.rsLoadShedPolicytraitauth.rsAuthProvidertraitcodec.rsCodectraitws.rsWsClient,WsMessage,WsCloseFrame(usesfutures-core/futures-sinkbounds)client.rsHttpClientthin compat shim (if needed)lib.rsUpdate with
moddeclarations andpub usere-exports for all new modules (in addition to those added in #12).Design constraints (from PLAN.md)
fn … -> impl Future<…> + Send. Noasync-trait, nodyn.net-corehas zero runtime deps — notokio,hyper,reqwest,tracing,serde, orthiserror.WsClientusesfutures-core::Streamandfutures-sink::Sinkfor its split-half signatures.AuthProviderandCodecare kept deliberately minimal — broker-specific logic lives inadapter-<broker>.LoadShedPolicydecisions takeRequestMetadataas input so broker adapters can supply per-endpoint priority rules without importing backend internals.Acceptance criteria
just cipassesRateLimiter,RetryPolicy,SessionProvider,CircuitBreaker,ConcurrencyLimiter,LoadShedPolicy,AuthProvider,Codec,HasErrorKind) arepubfrom the crate rootWsClientcompiles withfutures-core/futures-sinkbounds and no concrete runtimetokio,hyper,serde,thiserroranywhere in the crate///doc comments (enforced bymissing_docslint)