feat(api): .kc commit extraction pipeline + metadata API (Phase 1) #141
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implement the .kc commit extraction pipeline and metadata CRUD endpoints as specified in KC_SERVER.md Sections 2 and 4.1.
Depends on: #140 (database migration)
Supports: SILO_VIEWPORT Phase 1-2 (Manifest Viewer, Metadata Editor)
Commit Pipeline (Section 2)
When a .kc file is uploaded via
POST /api/items/{partNumber}/file, after storing the file:silo/directorysilo/manifest.jsonand validate:item_metadatarow from manifest + metadata entriesmetadata_errorflag on the revisionMetadata API Endpoints (Section 4.1)
GET/api/items/{pn}/metadataPUT/api/items/{pn}/metadataPATCH/api/items/{pn}/metadata/lifecyclePATCH/api/items/{pn}/metadata/tagsImplementation scope
internal/kc/extract.go-- ZIP reader, silo/ directory parser, manifest validationinternal/db/item_metadata.go-- item_metadata repository (upsert, get, update fields, update lifecycle, update tags)internal/api/metadata_handlers.go-- HTTP handlers for the 4 endpointsinternal/api/routes.go-- register new routesAcceptance criteria