Documentation

Docs / Reference

ADR 0040 - Network egress boundary

Status: Accepted (delegated review, 2026-11-03)

Context

ARCHITECTURE.md ("Network egress") and AGENTS.md say that only internal/egress may open network connections and that an offline run opens no connections except explicitly configured infrastructure. Until T016b this was a convention: egress.ConfigurePostgres installed a plain net.Dialer and the default resolver on the pgx configuration, and nothing checked that other code stayed away from net. The next M2 tasks add the first code that listens (the HTTP server on 127.0.0.1, T016c) and dials beyond the database (the "try it" proxy, live schema introspection), and M3 adds LLM providers. The boundary has to be a tested property before they arrive.

Options considered

Decision

internal/egress provides:

Configuration gains the optional root key egress with the single key mode (offline or llm, default offline), strictly decoded like the other sections. No command consumes it yet; llm adds no destinations until providers exist.

Three tests enforce the boundary:

Consequences

Known gaps

Review notes (delegated review, 2026-11-03)

Report a problem with this pageSource: docs/adr/0040-network-egress-boundary.md