#115 made AuthModule import SessionModule (for AuthController to
inject UserSessionIndexService). SessionModule transitively pulls
in RedisModule whose factory calls assertRedisConfig() — that
throws when REDIS_URL is unset. auth.module.spec only seeded the
ENTRA_* env vars, so compile() blew up the moment it walked the
new import graph.
caught only by ci, not locally: nx auto-loads apps/portal-bff/.env
for tasks, which my dev box has. the ci runner starts with a clean
environment, surfaces the real failure path, and ci:check went red
on main right after #115 merged.
repro of the ci condition locally:
env -u REDIS_URL -u SESSION_SECRET -u SESSION_ENCRYPTION_KEY \
-u DATABASE_URL -u ENTRA_INSTANCE_URL -u ENTRA_TENANT_ID \
-u ENTRA_CLIENT_ID -u ENTRA_CLIENT_SECRET \
-u ENTRA_REDIRECT_URI -u ENTRA_POST_LOGOUT_REDIRECT_URI \
pnpm exec nx test portal-bff --skip-nx-cache
fix: extend the spec's VALID env block with REDIS_URL (a
well-formed but unreachable url so ioredis stays lazy),
SESSION_SECRET, and SESSION_ENCRYPTION_KEY — same pattern as
session.module.spec.ts. and dispose the ioredis client in
afterEach so jest doesn't hang on its reconnect timer (the spec
now opens a real connection at module init).
123/123 pass under the clean-env repro. no production code change.