--- id: "0002" date: 2026-02-18 status: Accepted supersedes: superseded-by: affected-paths: [lib/relay/http_client.rb, lib/relay/delivery.rb] affected-components: [http, delivery] --- # 0002 — Route all outbound HTTP through the shared HttpClient ## Context Two call sites had grown their own Net::HTTP usage with inconsistent timeouts and no shared User-Agent, and a TLS verification bug had to be fixed in both places separately. ## Decision All outbound HTTP goes through Relay::HttpClient (lib/relay/http_client.rb). No other file constructs Net::HTTP objects directly — timeouts, TLS policy, headers, and instrumentation live in exactly one place. ## Consequences One place to change HTTP policy; call sites cannot drift. New delivery types must accept the small indirection of going through the wrapper even for trivial requests. ## Alternatives rejected Per-call-site Net::HTTP rejected: policy drift was the concrete bug that motivated this. Pulling in a full HTTP gem (faraday) rejected: stdlib is sufficient at this scale and keeps the tool dependency-free.