Files
2026-08-17 22:23:10 +02:00

935 B

TASKS — F-003 HTTP foundation and request context

  • TASK-001 deps: add pino + zod; justify both in spec/tech.md
  • TASK-002 src/infrastructure/logging/logger.ts: createLogger({ level?, destination? })
  • TASK-003 src/shared/errors.ts: AppError + errorEnvelope v2 (code + requestId)
  • TASK-004 src/shared/http-input.ts: parseJson(schema, input) -> AppError(400, VALIDATION_ERROR)
  • TASK-005 src/app/build-app.ts: genReqId sanitization, onRequest/onResponse hooks, error + notFound handlers with requestId; buildApp(deps) injectable logger
  • TASK-006 src/infrastructure/http/server.ts: logger-based startup lines
  • TASK-007 tests: src/shared/tests/http-input.test.ts
  • TASK-008 tests: src/app/tests/http-foundation.test.ts (id propagation/sanitization, log correlation, envelope stability incl. malformed JSON, no stack leak)
  • TASK-009 run lint + boundaries + typecheck + build + test + verify.sh