towerops/config
Graham McIntire 8682cdce55 fix: resolve session salts at runtime so prod release boots
The @session_options module attribute used Application.compile_env, which
baked compile-time placeholders into the endpoint while runtime.exs set
the real values from SESSION_SIGNING_SALT / SESSION_ENCRYPTION_SALT env
vars. Phoenix detected the mismatch and refused to start (failing migrate
Job in k8s).

- Remove hardcoded salts from config/config.exs (no compile-time binding)
- Add stable per-env salts in dev.exs / test.exs so local + CI don't need
  the env vars
- Split static cookie opts (@static_session_options) from runtime-resolved
  opts in endpoint.ex; expose session_options/0 as an MFA tuple in socket
  connect_info so LiveView decodes sessions with the same runtime salts
- New ToweropsWeb.Plugs.RuntimeSession wraps Plug.Session, fetches salts
  from app env on first request, and caches the initialized opts in
  :persistent_term (zero per-request overhead after warm-up)
2026-05-12 16:26:54 -05:00
..
config.exs fix: resolve session salts at runtime so prod release boots 2026-05-12 16:26:54 -05:00
dev.exs fix: resolve session salts at runtime so prod release boots 2026-05-12 16:26:54 -05:00
prod.exs fix: H12 cookie hardening + 5 low/medium bugs (L2, L5, L6, L8, L10, L11) 2026-05-12 11:22:47 -05:00
runtime.exs fix: H11 — load session salts from env vars instead of hardcoded 8-byte values 2026-05-12 14:03:31 -05:00
test.exs fix: resolve session salts at runtime so prod release boots 2026-05-12 16:26:54 -05:00