Skip to content

feat(api/meetings): CRUD with relationship strength auto-recomputation#48

Merged
gracefullight merged 2 commits intomainfrom
symphony/FIR-36
Mar 21, 2026
Merged

feat(api/meetings): CRUD with relationship strength auto-recomputation#48
gracefullight merged 2 commits intomainfrom
symphony/FIR-36

Conversation

@gracefullight
Copy link
Member

Summary

  • Add meeting, meeting_participant, and contact_relationship tables via migration 0004
  • Implement full Meeting CRUD (/meetings) with participant management
  • Auto-recompute ContactRelationship.strength on every meeting create/update/delete based on shared meeting count between contact pairs
  • Invalidate globe arc cache (globe:user:{user_id}:arcs) on relationship changes
  • DB-level constraint (strength > 0) ensures zero-strength rows are never persisted — rows are deleted instead

Test plan

  • Run migration 0004 against local DB
  • Create a meeting with 2+ participants → verify contact_relationship rows created with correct strength
  • Update meeting participants → verify affected relationships recomputed (old + new participants)
  • Delete meeting → verify strength decremented; relationships with 0 shared meetings deleted
  • Verify Redis key globe:user:{id}:arcs is invalidated on each CRUD operation
  • Verify 404 returned for non-existent meeting/contact IDs
  • Verify at least 1 participant required (schema validation)

🤖 Generated with Claude Code

gracefullight and others added 2 commits March 21, 2026 21:44
Add meeting management with automatic contact relationship strength
tracking. When meetings are created, updated, or deleted, the strength
between all participant pairs is recomputed based on shared meeting count.

- Add meeting, meeting_participant, contact_relationship tables (migration 0004)
- Meeting CRUD endpoints with participant management
- ContactRelationshipService: upsert/delete based on shared meeting count
- Globe cache invalidation on relationship changes
- DB constraint ensures strength > 0 (no zero-strength rows created)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# Conflicts:
#	apps/api/src/main.py
#	apps/api/src/meetings/models.py
#	apps/api/src/meetings/repository.py
#	apps/api/src/meetings/router.py
#	apps/api/src/meetings/schemas.py
#	apps/api/src/meetings/service.py
@gracefullight gracefullight merged commit 01727d4 into main Mar 21, 2026
2 checks passed
@gracefullight gracefullight deleted the symphony/FIR-36 branch March 21, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant