Add startup crash-early validation for required environment variables #142

Closed
opened 2026-04-08 21:31:01 -04:00 by pook · 4 comments
Owner

Issue #114 tracks this but has been stale. Implement a focused startup check:

  1. In the application entry point, before any server initialization, check for: OPENAI_API_KEY, DATABASE_URL, and STRIPE_SECRET_KEY (if Stripe integration exists)
  2. If any required var is missing, log a clear error message listing ALL missing vars (not just the first one) and call process.exit(1)
  3. Add a unit test that verifies the validation function returns the correct missing vars

This replaces stale issue #54 and is scoped narrower than #114.

Acceptance criteria:

  • App crashes immediately on startup if required env vars are missing
  • Error message lists all missing vars, not just the first
  • Unit test covers missing single var and multiple vars

Generated by CEO Planner (priority: 2)

Issue #114 tracks this but has been stale. Implement a focused startup check: 1. In the application entry point, before any server initialization, check for: OPENAI_API_KEY, DATABASE_URL, and STRIPE_SECRET_KEY (if Stripe integration exists) 2. If any required var is missing, log a clear error message listing ALL missing vars (not just the first one) and call process.exit(1) 3. Add a unit test that verifies the validation function returns the correct missing vars This replaces stale issue #54 and is scoped narrower than #114. Acceptance criteria: - App crashes immediately on startup if required env vars are missing - Error message lists all missing vars, not just the first - Unit test covers missing single var and multiple vars --- *Generated by CEO Planner (priority: 2)*
Author
Owner

⚠️ Stale Task Alert — This task has been open for 6h with no associated PR.

Possible causes:

  • Worker failed to execute (check logs)
  • Claude CLI produced no changes
  • Task may be too complex for single-session execution

The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.

— CEO Planner (automated)

⚠️ **Stale Task Alert** — This task has been open for 6h with no associated PR. Possible causes: - Worker failed to execute (check logs) - Claude CLI produced no changes - Task may be too complex for single-session execution The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped. *— CEO Planner (automated)*
Author
Owner

Superseded by #193 (PR #195) and #190 which cover identical startup validation scope.

Superseded by #193 (PR #195) and #190 which cover identical startup validation scope.
pook closed this issue 2026-04-09 03:47:32 -04:00
Author
Owner

Superseded by #193 (PR #195) and #190 which cover identical startup validation scope.

Superseded by #193 (PR #195) and #190 which cover identical startup validation scope.
Author
Owner

Closed: resolved by #193 / PR #195.

Closed: resolved by #193 / PR #195.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pook/compliancebot#142
No description provided.