No description
Find a file
jedarden da116c546b feat: add environment variable validation with documented defaults
- Create internal/config package with Load() function for all env vars
- Validate types (string, bool, int, enum, URL) and ranges
- Collect all validation errors before returning (fail fast)
- Log non-sensitive values at INFO on startup (MQTT_PASSWORD masked)
- Return error slice; main() logs each error and exits(1)
- Unit tests for valid/invalid cases

Env vars validated:
- SPAXEL_BIND_ADDR (string, default '0.0.0.0:8080')
- SPAXEL_DATA_DIR (string, default '/data')
- SPAXEL_STATIC_DIR (string, default '/dashboard')
- SPAXEL_MDNS_ENABLED (bool, default true)
- SPAXEL_MDNS_NAME (string, default 'spaxel')
- SPAXEL_LOG_LEVEL (enum: debug|info|warn|error, default 'info')
- SPAXEL_FUSION_RATE_HZ (int, range [1,20], default 10)
- SPAXEL_REPLAY_MAX_MB (int, range [10,10000], default 360)
- SPAXEL_INSTALL_SECRET (string, optional, 32+ chars if set)
- SPAXEL_NTP_SERVER (string, default 'pool.ntp.org')
- SPAXEL_MQTT_BROKER (string, optional, must be valid URL if set)
- SPAXEL_MQTT_USERNAME (string, optional)
- SPAXEL_MQTT_PASSWORD (string, optional, never logged)
- TZ (string, default 'UTC', validated via time.LoadLocation)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 12:15:06 -04:00
.beads feat: implement comprehensive /healthz endpoint 2026-04-07 11:09:36 -04:00
.marathon ci: set VERSION to 0.1.0 for image build 2026-04-06 08:53:25 -04:00
dashboard feat: process buffered events from delta WebSocket updates 2026-04-07 11:04:49 -04:00
docs init: spaxel project — docs, plan, and marathon infrastructure 2026-03-26 06:43:25 -04:00
firmware feat: implement comprehensive /healthz endpoint 2026-04-07 11:09:36 -04:00
mothership feat: add environment variable validation with documented defaults 2026-04-07 12:15:06 -04:00
.dockerignore feat(deploy): Docker packaging with multi-stage build and compose orchestration 2026-03-26 07:46:15 -04:00
.gitignore feat(deploy): Docker packaging with multi-stage build and compose orchestration 2026-03-26 07:46:15 -04:00
.needle-predispatch-sha feat: implement comprehensive /healthz endpoint 2026-04-07 11:09:36 -04:00
.needle.yaml feat: trigger CI build and verify deployment 2026-04-06 09:54:08 -04:00
docker-compose.yml feat(deploy): Docker packaging with multi-stage build and compose orchestration 2026-03-26 07:46:15 -04:00
Dockerfile feat: implement comprehensive /healthz endpoint 2026-04-07 11:09:36 -04:00
PROGRESS.md feat(mothership): signal processing package with phase/baseline/motion detection 2026-03-26 08:08:46 -04:00
VERSION ci: auto-bump version to 0.1.58 2026-04-07 16:10:33 +00:00