feat(annotations): REST endpoints for relationships and sync queue#29
Merged
patchmemory merged 2 commits intomainfrom Feb 3, 2026
Merged
feat(annotations): REST endpoints for relationships and sync queue#29patchmemory merged 2 commits intomainfrom
patchmemory merged 2 commits intomainfrom
Conversation
…c queue Implements Phase 02 REST endpoints for annotations story: - POST /api/relationships - create relationship between entities - GET /api/relationships?file_id= - list relationships for entity - DELETE /api/relationships/<id> - delete relationship - POST /api/sync - enqueue sync item for background processing - GET /api/sync/queue - list unprocessed sync queue items - POST /api/sync/<id>/mark-processed - mark sync item as processed Implementation: - Created api_annotations.py blueprint with comprehensive endpoints - Registered blueprint in routes/__init__.py - Extended test_annotations_rest_endpoints.py with 10 new tests - All tests pass (143 passed) Privacy guardrails documented for future implementation: - Authentication and authorization - Rate limiting - Input validation and sanitization - Audit logging Task: task:annotations/rest-endpoints DoD: ✅ endpoints work; tests pass; privacy guardrails noted 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements Phase 02 REST endpoints for the annotations story (task:annotations/rest-endpoints).
Changes
New Endpoints
Relationships:
POST /api/relationships- Create relationship between entitiesGET /api/relationships?file_id=<id>- List relationships for entityDELETE /api/relationships/<id>- Delete relationshipSync Queue:
POST /api/sync- Enqueue sync item for background processingGET /api/sync/queue- List unprocessed sync queue itemsPOST /api/sync/<id>/mark-processed- Mark sync item as processedImplementation
scidk/web/routes/api_annotations.pyblueprint with 6 endpointsscidk/web/routes/__init__.pytests/test_annotations_rest_endpoints.pywith 10 new test functionsscidk/core/annotations_sqlite.pyTest Results
✅ 143 passed (all non-E2E tests)
New tests:
test_create_relationship_successtest_create_relationship_missing_fieldstest_list_relationships_successtest_list_relationships_missing_file_idtest_delete_relationship_successtest_enqueue_sync_successtest_enqueue_sync_missing_fieldstest_list_sync_queuetest_mark_sync_processed_successtest_privacy_guardrails_documentedPrivacy Guardrails
Privacy guardrails are documented in test suite for future implementation:
Acceptance Criteria
✅ Endpoints work
✅ Tests pass
✅ Privacy guardrails noted
Task Info
Related
🤖 Generated with Claude Code