S17 Phase 1: Hosted repository CRUD
## Summary Phase 1 of S17: CRUD for **hosted** repositories, assuming a seeded namespace. Repositories live in the shared, format-free `repositories` table; the detail response nests format and kind specifics under a polymorphic `settings` object (ADR-009). Create and update accept `kind=hosted` only; list and detail define the `settings` envelope for all kinds, but only hosted rows exist until S13. ## Why hosted first The hosted formats (S10/S11/S12) have their schemas defined and are being implemented, and they create repositories only through this API. Remote and virtual repository settings (upstream URL/auth/cache, upstream associations) depend on the virtual and remote foundation (S13), which is not yet built. ## Why first Unblocks the frontend repository read epic (&22321) and lets users create hosted repositories to push to. ## Endpoints - `GET /api/v1/:slug/repositories` - list (filter by `format` and `kind`, keyset pagination, sort) - `GET /api/v1/:slug/repositories/:repository_name` - detail - `POST /api/v1/:slug/repositories` - create (`kind=hosted` only) - `PATCH /api/v1/:slug/repositories/:repository_name` - update (`name` immutable) - `DELETE /api/v1/:slug/repositories/:repository_name` - delete ## Deliverables 1. S17 spec, Phase 1 cut (spec MR) 1. S17 Phase 1 plan (plan MR) 1. Hosted repository read (list, detail) 1. Hosted repository write (create, update, delete) ## Out of scope Remote and virtual repository CRUD (creation with upstream settings and associations) - gated on S13, tracked under &22341's "Virtual and remote repositories" phase. Everything else beyond repository CRUD; see &22341 for the full phase roadmap.
epic