Refs #892 - Gateway config debt: missing keys and broken fallbacks
Changes:
- Add `_is_network_accessible()` helper to gateway/config.py (avoids circular
import with gateway.platforms.base which imports from gateway.config)
- Add API_SERVER_KEY warning in `_validate_gateway_config`: when the API server
is enabled on a network-accessible address (0.0.0.0, public IP, hostname) but
no key is configured, log a warning at config-load time so operators see the
issue before any adapter initialisation runs
- Add `TestValidateGatewayConfig` in tests/gateway/test_config.py covering:
- idle_minutes <= 0 and None are corrected to 1440 (default)
- at_hour outside 0-23 is corrected to 4 (default)
- Boundary hours 0 and 23 are accepted unchanged
- Empty platform token triggers a warning log
- Disabled platform with empty token produces no warning
- API server on 0.0.0.0 without key logs a warning
- API server on 127.0.0.1 without key is silent (loopback is allowed)
- API server with a key set logs no warning regardless of bind address
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>