S06: добавить HTTP API для чатов и файлов #12

Open
opened 2026-04-07 16:39:05 +00:00 by gglamer · 0 comments
Owner

Контекст

После готовности workspace/chat/file usecases спринту 01 нужен versioned HTTP API, чтобы storage slice стал доступен через FastAPI adapter.

Цель

Добавить HTTP endpoints для chat и file operations под /api/v1.

В scope

  • request/response schemas
  • dependencies для резолва новых usecases из container
  • routes для chat create/get/list/delete
  • routes для file upload/list/get metadata/delete/clear
  • file download endpoint через master
  • mapping domain/usecase errors в HTTP
  • thin router-only orchestration
  • focused HTTP tests

Вне scope

  • auth/access control
  • artifacts
  • retention engine
  • durable DB

Ограничения

  • весь FastAPI code остается в adapter/http/fastapi/
  • handlers только переводят input/output и маппят ошибки
  • inner layers не должны импортировать FastAPI
  • file download должен использовать storage adapter/output from usecases, а не прямую business logic в router

Критерии приемки

  • versioned chat/file endpoints существуют под /api/v1
  • schemas явные и валидируемые
  • file download работает через HTTP adapter
  • HTTP error mapping детерминированный и тонкий
  • focused HTTP tests проходят
  • проходит make typecheck

Предполагаемые файлы

  • adapter/http/fastapi/schemas.py
  • adapter/http/fastapi/dependencies.py
  • adapter/http/fastapi/routers/v1/router.py
  • adapter/di/container.py
  • focused tests в test/*

Зависимости

  • зависит от S04 и S05
  • блокирует S07

Ветки

  • Ветка-основание: feat/storage-s05-chat-file-usecases
  • Новая ветка: feat/storage-s06-chat-file-http-api
## Контекст После готовности workspace/chat/file usecases спринту 01 нужен versioned HTTP API, чтобы storage slice стал доступен через FastAPI adapter. ## Цель Добавить HTTP endpoints для chat и file operations под `/api/v1`. ## В scope - request/response schemas - dependencies для резолва новых usecases из container - routes для chat create/get/list/delete - routes для file upload/list/get metadata/delete/clear - file download endpoint через master - mapping domain/usecase errors в HTTP - thin router-only orchestration - focused HTTP tests ## Вне scope - auth/access control - artifacts - retention engine - durable DB ## Ограничения - весь FastAPI code остается в `adapter/http/fastapi/` - handlers только переводят input/output и маппят ошибки - inner layers не должны импортировать FastAPI - file download должен использовать storage adapter/output from usecases, а не прямую business logic в router ## Критерии приемки - versioned chat/file endpoints существуют под `/api/v1` - schemas явные и валидируемые - file download работает через HTTP adapter - HTTP error mapping детерминированный и тонкий - focused HTTP tests проходят - проходит `make typecheck` ## Предполагаемые файлы - `adapter/http/fastapi/schemas.py` - `adapter/http/fastapi/dependencies.py` - `adapter/http/fastapi/routers/v1/router.py` - `adapter/di/container.py` - focused tests в `test/*` ## Зависимости - зависит от S04 и S05 - блокирует S07 ## Ветки - Ветка-основание: `feat/storage-s05-chat-file-usecases` - Новая ветка: `feat/storage-s06-chat-file-http-api`
gglamer changed title from S06: add chat and file HTTP API to S06: добавить HTTP API для чатов и файлов 2026-04-07 16:43:19 +00:00
blaze was assigned by gglamer 2026-04-07 16:48:18 +00:00
gglamer added this to the Tasks project 2026-04-07 16:48:20 +00:00
Sign in to join this conversation.
No labels
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: platform/master#12
No description provided.