docs(roadmap): record p5 error mapping coverage
This commit is contained in:
parent
ff33a057ab
commit
6741e93d55
@ -173,7 +173,7 @@ Goal: backend behavior is production observable, testable, and consistent with c
|
||||
- [x] **P5.1** Replace raw `process.stdout.write` / `process.stderr.write` in backend startup paths with app logger or shared logger-compatible handling. Commit: `7016fc1`; Verified: `GITEA_NPM_TOKEN=dummy pnpm --filter @notelett/backend run typecheck`; `GITEA_NPM_TOKEN=dummy pnpm --filter @notelett/backend exec vitest run src/server.test.ts src/modules/note-prompts/scheduler.test.ts`; `rg -n "process\\.(stdout|stderr)\\.write" backend/src --glob '!**/*.test.*'` returned no matches; `git diff --check`. Routed Cosmos startup diagnostics through `@bytelyst/logger`, passed the Fastify app logger into the scheduler loop, and updated server bootstrap coverage to assert logger propagation.
|
||||
- [x] **P5.2** Ensure request IDs are propagated to extraction-service, platform-service, blob, LLM, webhook, and MCP calls where supported. Add tests for local propagation helpers. Commit: `c31f51d`; Verified: `GITEA_NPM_TOKEN=dummy pnpm --filter @notelett/backend run typecheck`; `GITEA_NPM_TOKEN=dummy pnpm --filter @notelett/backend exec vitest run src/lib/request-context.test.ts src/lib/extraction-client.test.ts src/lib/field-encrypt.test.ts src/server.test.ts src/modules/notes/routes.test.ts`; request propagation audit confirmed note summarization passes inbound `x-request-id` to extraction-service, startup platform-service flag polling sends a generated outbound `x-request-id`, MCP write audit trails already default correlation IDs from `req.id`, and no backend blob/LLM/webhook local call path exposes supported request-id headers beyond shared package ownership; `git diff --check`.
|
||||
- [x] **P5.3** Add health/dependency readiness coverage for datastore, encryption, platform-service, extraction-service, and MCP. Prefer `@bytelyst/monitoring` patterns if suitable. Commit: `874dda2`; Verified: `zsh -lc 'source ~/.zshrc; export GITEA_NPM_TOKEN; pnpm install --offline'` to link local `@bytelyst/monitoring`; `zsh -lc 'source ~/.zshrc; export GITEA_NPM_TOKEN; pnpm --filter @notelett/backend run typecheck'`; `zsh -lc 'source ~/.zshrc; export GITEA_NPM_TOKEN; pnpm --filter @notelett/backend exec vitest run src/lib/dependency-readiness.test.ts src/diagnostics.test.ts'`; `git diff --check`. Added `/api/diagnostics/readiness` with datastore, field-encryption, platform-service, extraction-service, and MCP dependency checks using common-platform monitoring status vocabulary and local MCP registration coverage.
|
||||
- [ ] **P5.4** Add structured error mapping tests for validation, auth, forbidden, not found, conflict, extraction failure, LLM timeout, and blob failure paths. Commit:
|
||||
- [x] **P5.4** Add structured error mapping tests for validation, auth, forbidden, not found, conflict, extraction failure, LLM timeout, and blob failure paths. Commit: `ff33a05`; Verified: `zsh -lc 'source ~/.zshrc; export GITEA_NPM_TOKEN; pnpm --filter @notelett/backend run typecheck'`; `zsh -lc 'source ~/.zshrc; export GITEA_NPM_TOKEN; pnpm --filter @notelett/backend exec vitest run src/lib/error-mapping.test.ts src/lib/extraction-client.test.ts src/modules/note-prompts/runner.test.ts'`; `git diff --check`. Added stable dependency error mapping helpers for extraction-service, LLM, and blob failures, mapped extraction HTTP/fetch failures and LLM timeout failures to structured `ServiceError` responses, and added regression tests for validation, auth, forbidden, not-found, conflict, extraction failure, LLM timeout, and blob failure response shapes.
|
||||
- [ ] **P5.5** Review Cosmos partition keys and query patterns for current containers; document any cross-partition or count-heavy operations and add repository tests for scope isolation. Commit:
|
||||
- [ ] **P5.6** Verify webhook/scheduler loops shut down cleanly on Fastify close and do not start unexpectedly in tests. Commit:
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user