-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Context
Critical configuration (DB connection, API keys, etc.) is currently validated only when the feature is used. Misconfiguration can surface in the middle of gameplay instead of failing early during startup.
Goal
Validate critical configuration at bootstrap using a clear, typed schema and stop the server early when configuration is invalid.
Tasks
- Define a Zod schema (or similar) for critical configuration:
- Database connection string / credentials.
- External API base URLs and keys.
- Any other required engine-level configuration.
- Add a boot validation step in
initServer(or equivalent) that:- Validates configuration once at startup.
- Logs a clear error with the list of invalid/missing fields.
- Stops the server bootstrap when validation fails.
- Provide helpful documentation / error messages so users know how to fix config.
Acceptance Criteria
- Starting the server with missing or invalid critical config fails immediately with a clear log message.
- No late runtime errors occur due to missing DB or critical API config during normal use.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels