feat/federation #19

Merged
blacklight merged 26 commits from feat/federation into main 2026-09-08 12:43:34 +02:00
Owner

Closes: #18

Closes: #18
- Add Activity, ActivityMention, and ActivityTarget tables with constraints
- Expand Visibility enum with mentioned/followers and add rank/can_contain
- Backfill create activities for already federated tracks
- Document activities layer and add model/constraint tests
- Add services/activities for entity resolution and local activity creation
- Add activity cascade deletion with tombstone Delete fan-out for sent targets
- Refactor federation delete builder to share tombstone helper
- Add tests for activity service and deletion cascade; harden S3 delete test cleanup
- Update architecture docs for new activity and deletion flows
- Add VisibilityRules for containment, validation, and cascade fan-out
- Build Update/Delete payloads for audience changes and reuse delivery enqueue
- Add Visibility.federates and ActivityPub audience helpers
- Update docs and add tests for visibility rules and fan-out behavior
- Bump pubby to 0.3.0 and route content/duration formatting through pubby
- Use pubby for domain allow/block matching, inbox collection, and delivery
- Enforce allow/block lists on /ap inbox, inbound processing, and fan-out
- Switch storage URL conversion and key provisioning to pubby helpers
- Update tests and docs for new behavior and headers/signing changes
- Add services/mentions.py pipeline for @handle parsing and WebFinger lookup
- Render safe HTML and build ActivityPub Mention/Hashtag tags
- Update activity handle regex, federation exports, and architecture docs
- Add tests for mention extraction, gating, and end-to-end processing
Add POST /api/v1/activities/{id}/like: records an idempotent `like`
activity that inherits the target's visibility and fans out to the
liked activity author's inbox. `can_view_activity` centralizes entity
ACL + per-activity visibility checks, and `create_local_activity`
gains a `require_manage` flag so interactions only require view access.

Like payload construction and remote actor inbox resolution are
delegated to pubby 0.3.1 (`build_like_activity`, `resolve_actor_inbox`);
Songhive keeps the Visibility-to-audience adapter, Celery
orchestration, and retry policy. Also extract `get_default_user_agent`
for federation HTTP requests.
feat(federation): add activity edit endpoint and mention reprocessing
Some checks failed
continuous-integration/drone/push Build is failing
43d453fe92
- Add PATCH /api/v1/activities/{id} with ACL checks
- Re-run mention pipeline on content edits; rebuild payload object content/tags
- Cascade visibility updates via VisibilityRules
- Add tests for update service and endpoint
- Document behavior in changelog and architecture docs
feat(federation): add visibility-based activity fan-out w/ target tracking
Some checks reported errors
continuous-integration/drone/push Build was killed
368552a5fd
- Add resolve_audience + fan_out_activity and ActivityTarget bookkeeping
- Route likes through fan_out_like_activity; drop publish_like_activity
- Update docs/changelog and add tests for fan-out + interactions
chore(frontend): upgrade Node version: 20->26
Some checks reported errors
continuous-integration/drone/push Build was killed
91f54ce923
- Add GET /api/v1/{entity_type}/{entity_id}/activities with filters and cursor
- Enforce per-activity visibility in SQL for correct keyset pagination
- Add response serializers and tests for API/service behavior
fix(frontend): addressed failing ArtistView test
All checks were successful
continuous-integration/drone/push Build is passing
6b10247b1e
* main:
  chore(ci): bump Node to 24 for frontend toolchain
  ci(drone): added S3 environment variables for tests
- Serve stored AP payloads or synthesize Note objects for content activities
- Return Tombstone for soft-deleted activities; 404 for non-federated visibility
- Resolve activities by local_object_id/source_id within owner namespace
- Bump pubby to 0.3.2 and delegate Delete(Tombstone) payload construction
- Update docs/changelog and add route coverage tests
- record_track_publication persists a create Activity with the
 Create(Audio) payload and fans out with ActivityTarget tracking
- add DELETE /api/v1/activities/{id} for per-activity retraction
- retract publication rows when a track leaves the fediverse
- remove the superseded publish_track_activity delivery helper
- Emit "{artist} - {title}" anchor in `name` when URL is linkable
- Document Mastodon-specific rendering behavior in architecture notes
- Update federation tests for linked `name` output
- Add pubby Update builder adapters for visibility + full object updates
- Stamp updated on rebuilt activity objects
- Deliver Update to prior targets and Create to newly reached inboxes
- Trigger best-effort update fan-out from PATCH /activities endpoint
- Bump pubby to 0.3.3 and extend update fan-out tests
- Resolve local owner avatars and cached remote actor icons
- Add response field and tests for avatar inclusion
- Return source actor display name in activity list responses
- Resolve local/remote actor profiles (avatar + display name)
- Apply visibility/mentions addressing to Create(Audio) and stored payload
- Route HTML requests to the SPA and serve Audio JSON for AP clients
- Add Link/alternate hints in SPA shell and include @context/to/cc in objects
- Prefer actor URL first in attributedTo for better remote author detection
- Document activity edit fan-out, retraction, and track publish visibility
- Note Audio rendering, summary/url fixes, and track object negotiation
- Add routes and nginx negotiation details for tracks and objects
- Assert to/cc audience is applied to Create/Audio payloads for visibility modes
- Add track page content-negotiation tests for ActivityPub vs HTML responses
- Verify mentioned/followers/local publication delivery behavior and validation
- Ensure activities API exposes source actor display name/avatar and rewrites audience
- Added var(--color-text-link) to have more consistent colors for links
- Replaced var(--color-accent-contrast) with no background with better
  combinations - it would look dark-on-dark in dark mode.
fix(activities): return updated activity and audit mutations
Some checks reported errors
continuous-integration/drone/push Build was killed
de708c23b1
- PATCH /activities/{id} now returns ActivityResponse and refreshes mentions
- Add audit logs for activity update/delete/like actions
- Fix mention audience rebuild via explicit mention queries
- Update frontend store/tests to use returned updated activity
- Add tests covering audit logging and update response fields
blacklight changed title from WIP: feat/federation to feat/federation 2026-09-08 12:43:06 +02:00
blacklight deleted branch feat/federation 2026-09-08 12:43:34 +02:00
Sign in to join this conversation.
No description provided.