feat(provider): implement SP registration (topic 3) - #11
Conversation
Add service provider registration endpoint with full CRUD lifecycle: - POST /registrations accepts provider metadata and returns 201 - Validates endpoint URL format, rejects duplicates - Persistent JSON file-backed store with atomic writes - Domain error types with RFC 7807 problem detail responses - Context-aware Store and Service interfaces Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: gabriel-farache <gfarache@redhat.com>
550056a to
a1f401d
Compare
PR Summary by QodoImplement persistent service provider registration lifecycle
AI Description
Diagram
High-Level Assessment
Files changed (17)
|
Code Review by Qodo
1.
|
1. Rollback registry (Claim/Move) when Store.Save fails — prevents phantom slot ownership on persistence failure 2. Filter embedded providers during LoadPersisted; clean stale embedded records during RegisterEmbedded — disabled embedded SPs no longer survive restart 3. Update existing.ID on re-registration when ?id= is supplied (per REQ-SPR-090) 4. Check ID uniqueness before create/update — reject duplicate IDs with 409 Conflict 5. Thread operations + metadata through handler → service → store → API response — fields are now persisted and returned 6. Validate deserialized records on load — fail fast on schema-invalid persistence data (REQ-SPR-181) Addresses: dcm-project#11 (comment) Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: gabriel-farache <gfarache@redhat.com>
1. Rollback registry (Claim/Move) when Store.Save fails — prevents phantom slot ownership on persistence failure 2. Filter embedded providers during LoadPersisted; clean stale embedded records during RegisterEmbedded — disabled embedded SPs no longer survive restart 3. Update existing.ID on re-registration when ?id= is supplied (per REQ-SPR-090) 4. Check ID uniqueness before create/update — reject duplicate IDs with 409 Conflict 5. Thread operations + metadata through handler → service → store → API response — fields are now persisted and returned 6. Validate deserialized records on load — fail fast on schema-invalid persistence data (REQ-SPR-181) Addresses: dcm-project#11 (comment) Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: gabriel-farache <gfarache@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
9fbff1c to
3ffa4e9
Compare
Summary
POST /registrations) that accepts provider metadata and returns 201 with the created resourceTest plan
Made with Cursor