refactor: tighten task API route adapters #364

Closed
opened 2026-05-11 21:02:06 +00:00 by barrettruth · 0 comments
Owner

Parent: #355

Problem

Task API routes still repeat ID conversion, owned-task lookup, mutation error mapping, JSON body handling, and dependency validation around the newer task mutation boundary.

Solution

Add route adapter helpers without changing mutation behavior:

  • centralize task ID parsing and not-found/unauthorized responses
  • centralize TaskMutationError response mapping
  • reduce dependency-route body parsing duplication
  • keep existing status codes and JSON shapes stable

Acceptance criteria

  • Task route files are thinner adapters over server mutation helpers.
  • API route validation tests preserve current response contracts.
  • No task mutation semantics change.
Parent: #355 ## Problem Task API routes still repeat ID conversion, owned-task lookup, mutation error mapping, JSON body handling, and dependency validation around the newer task mutation boundary. ## Solution Add route adapter helpers without changing mutation behavior: - centralize task ID parsing and not-found/unauthorized responses - centralize `TaskMutationError` response mapping - reduce dependency-route body parsing duplication - keep existing status codes and JSON shapes stable ## Acceptance criteria - Task route files are thinner adapters over server mutation helpers. - API route validation tests preserve current response contracts. - No task mutation semantics change.
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
barrettruth/delta#364
No description provided.