feat: missing required setting fails startup with a field-specific error (E00-S04-T02)

- packages/config: add src/startup.ts exposing assertValidConfig (builds on
  the T01 TypeBox/Ajv schema) and the field-specific startup errors
  (MissingRequiredSettingError names the missing field; ConfigStartupError
  names each violating field); re-export from the package boundary
- apps/server: validate the startup configuration (including the required
  EPPP_SESSION_SECRET) before the server binds, so a missing required
  setting crashes the process at startup naming the field; depends on
  @personal-blog/config
- compose.yaml: provide EPPP_SESSION_SECRET for the app service (dev-only
  >= 32 char default; override via .env / shell)
- Dockerfile: ship the compiled packages/config in the image (build source +
  runtime dist), matching the server's new workspace dependency
- pnpm-lock.yaml: apps/server importer gains @personal-blog/config
This commit is contained in:
implementer
2026-08-30 03:00:40 +00:00
parent ecc945ce65
commit 0ce790fca3
9 changed files with 200 additions and 23 deletions
+3 -3
View File
@@ -8,9 +8,9 @@
*
* This is deliberately NOT the E00-S04-T02 field-specific startup error:
* `validateConfig` returns the raw schema-validation outcome (valid or not,
* with the Ajv messages) and performs no startup wiring — the adapter
* (E00-S04-T04) and the startup error formatting (E00-S04-T02) build on it
* in later tasks.
* with the Ajv messages) and performs no startup wiring — the startup error
* formatting (E00-S04-T02, `startup.ts`) and the environment adapter
* (E00-S04-T04) build on this raw outcome in their own modules.
*/
import { Ajv } from 'ajv';