pub async fn enforce_server_network_invariant(
ctx: &Ctx,
client: &TaskFastClient,
) -> Result<(), CmdError>Expand description
Runtime cross-system check for the env→network invariant. The
compile-time table in Environment::network says each env runs
exactly one Tempo network; this verifies that the deployment at
ctx.base_url() agrees by inspecting /config/network.
Default: warn-only. Today’s deployments still advertise multiple
networks in one response (server-side one-network-per-deployment
tracked in #62). Until that lands, a mismatch logs a tracing::warn!
and continues. Set TASKFAST_STRICT_ENV_NETWORK=1 to fail-closed
instead. The default flips to strict in a follow-up CLI release once
#62 is deployed across prod + staging.
Bypassed entirely for Environment::Local (sandboxed dev) and when
--allow-custom-endpoints is set, matching the F2 endpoint guard.