Skip to main content

Module pipeline

Module pipeline 

Source
Expand description

Ordered hot-path middleware and upstream forwarding.

Modules§

supervision_help
Shared HELP text for the supervised-loop counters that are registered TWICE: eagerly at boot (this module — so rate() > 0 alerts can see the FIRST fire) and lazily at the observation site (main.rs / reconciler.rs panic arms). The metrics registry is first-wins on HELP and warns on divergence in debug builds; these six pairs had drifted into permanent per-tick warn spam (R285). One const per metric, referenced from both sites.

Structs§

AppState
Shared application state passed through HTTP handlers and background tasks.
ForwardedResponse
Provider response paired with its active session lease.
PreparedRequest
A request after all local hot-path gates have passed.

Enums§

PipelineError
Hot-path failures, each carrying an HTTP status mapping.

Constants§

HTTP_CONNECT_TIMEOUT
TCP connect timeout for every outbound HTTPS client the harness builds.
IDLE_CLOSE_TIMEOUTS_HELP
Shared HELP for av_idle_close_timeouts_total (boot pre-registration and reconciler idle-sweep lookup). Same first-wins/no-drift rationale as SESSION_CLOSE_TIMEOUTS_HELP.
MCP_DRAIN_TIMEOUTS_HELP
Shared HELP for av_shutdown_mcp_drain_timeouts_total (boot pre-registration and shutdown-path lookup in main.rs). Same first-wins/no-drift rationale as SESSION_CLOSE_TIMEOUTS_HELP.
SESSION_CLOSE_TIMEOUTS_HELP
Shared HELP for av_shutdown_session_close_timeouts_total, registered at boot (pre-registration in the pipeline’s metric block) and looked up again on the shutdown path (main.rs finalize loop). The registry is first-wins on HELP and warns on drift — a single const is the only arrangement that cannot drift.

Functions§

describe_upstream_auth
How the harness authenticates to the chat upstream, for startup logs and avctl doctor — never contains key material.

Type Aliases§

ErrorSource
Boxed dynamic error source for harness error variants whose underlying cause can be any of several concrete types (io::Error, serde_json::Error, av_receipts::ReceiptError, …). Kept dynamic so one variant covers heterogeneous call sites while still exposing the typed error through std::error::Error::source — callers can source().downcast_ref::<std::io::Error>() to branch on e.g. io::ErrorKind, and tracing subscribers receive the full chain.