/report · demo-2 · baked output
Environment Variable Rename
Email service failure due to SMTP_SERVER → MAIL_HOST environment variable rename
overall
CRITICAL
files
6
cross-svc
no
critical
5
high
0
medium
1
low
0
/a
changed symbols
services/notifications/config.ts
SMTP_HOST constant
− process.env.SMTP_SERVER
+ process.env.MAIL_HOST
/b
impacts
| risk | file | line | symbol | reason | kind |
|---|---|---|---|---|---|
| CRITICAL | services/notifications/config.ts | 5 | SMTP_HOST | Reads undefined environment variable - email service fails | direct |
| CRITICAL | .env | 6 | SMTP_SERVER | Old variable name still defined - needs update to MAIL_HOST | indirect |
| CRITICAL | docker-compose.yml | 29 | SMTP_SERVER | Docker sets old variable name - container deployment fails | indirect |
| MEDIUM | README.md | 0 | SMTP_SERVER | Documentation may reference old variable name | indirect |
| CRITICAL | CI/CD pipelines | 0 | SMTP_SERVER | CI environment may set old variable name | indirect |
| CRITICAL | Production environment | 0 | SMTP_SERVER | Production servers have old variable configured | indirect |
/c
dependency graph
/d
suggested regression tests
demo-monorepo/tests/regression/cascade-env-config.spec.ts// jest
describe('Email configuration validation', () => {
it('should throw error when MAIL_HOST is not set', () => {
delete process.env.MAIL_HOST;
expect(() => require('../services/notifications/config')).toThrow('MAIL_HOST environment variable is required');
});
});demo-monorepo/tests/regression/cascade-env-config.spec.ts// jest
describe('Email service error handling', () => {
it('should throw descriptive error when SMTP_HOST is undefined', async () => {
process.env.MAIL_HOST = undefined;
await expect(sendEmail('test@example.com', 'Test', 'Body')).rejects.toThrow('Email configuration incomplete');
});
});/e
missing coverage
- services/notifications/email.tssendEmail should fail gracefully when SMTP_HOST is undefined
- services/notifications/config.tsconfig should validate all required environment variables are set
- services/notifications/email.tssendEmail should throw descriptive error when email config is incomplete