Add ActivityPub engagement ingestion #120

Merged
erik merged 1 commit from feat/task-5ed9fc7d-activitypub-engagement-ingestion into main 2026-06-06 07:38:18 -05:00
Owner

Summary

  • add ActivityPub engagement ingestion for Fedify inbox Like and Announce activities
  • store likes and boosts in existing post_engagements rows with actor metadata and activity deduplication
  • validate targets against local published post URLs and ignore unknown/draft/non-local targets
  • expose ingested activity through existing engagement summary, likes, and boosts API shapes
  • add signed Fedify inbox tests for likes, boosts, duplicates, invalid targets, and API visibility

Checks

  • make check
  • ./scripts/pre-pr.sh
## Summary - add ActivityPub engagement ingestion for Fedify inbox `Like` and `Announce` activities - store likes and boosts in existing `post_engagements` rows with actor metadata and activity deduplication - validate targets against local published post URLs and ignore unknown/draft/non-local targets - expose ingested activity through existing engagement summary, likes, and boosts API shapes - add signed Fedify inbox tests for likes, boosts, duplicates, invalid targets, and API visibility ## Checks - `make check` - `./scripts/pre-pr.sh`
feat: ingest ActivityPub engagements
All checks were successful
CI / build-lint-test (pull_request) Successful in 48s
bed4efb01e
Task: #task-5ed9fc7d
Author
Owner

PR Review

Summary

  • Reviewed PR #120 for task-5ed9fc7d against the ActivityPub engagement ingestion requirements.
  • The implementation handles signed Fedify inbox Like and Announce activities, validates local published-post targets, stores likes/boosts in post_engagements, and exposes them through the existing engagement API routes.
  • It avoids custom raw ActivityPub inbox routes and keeps Fedify as the protocol entry point.
  • CI and local gates are green.

Acceptance criteria

  • Incoming Like handled through Fedify for a local post creates a post_engagements row with kind = like.
  • Incoming Announce handled through Fedify for a local post creates a post_engagements row with kind = boost.
  • Duplicate activities do not create duplicate engagement rows.
  • Activities targeting unknown posts do not affect engagement counts.
  • Engagement summary includes counts from ingested ActivityPub likes and boosts.
  • Like and boost list endpoints expose ingested actor/activity data.
  • Existing engagement API response shapes are unchanged.
  • No duplicate hand-rolled ActivityPub inbox routes are added outside the Fedify route setup.
  • Relevant tests and checks pass (./scripts/pre-pr.sh, CI run #159).

Blocking issues

  • None.

Warnings

  • None.

Verdict

Approved. Stop at the human merge approval gate.

PR Review Worker Result

  • pr: open
  • review: approved
  • pr_comment: posted
  • task_comment: posted
  • blocking_issues: 0
  • warnings: 0
  • criteria_total: 9
  • criteria_met: 9
  • criteria_missing: 0
## PR Review ### Summary - Reviewed PR #120 for `task-5ed9fc7d` against the ActivityPub engagement ingestion requirements. - The implementation handles signed Fedify inbox `Like` and `Announce` activities, validates local published-post targets, stores likes/boosts in `post_engagements`, and exposes them through the existing engagement API routes. - It avoids custom raw ActivityPub inbox routes and keeps Fedify as the protocol entry point. - CI and local gates are green. ### Acceptance criteria - [x] Incoming `Like` handled through Fedify for a local post creates a `post_engagements` row with `kind = like`. - [x] Incoming `Announce` handled through Fedify for a local post creates a `post_engagements` row with `kind = boost`. - [x] Duplicate activities do not create duplicate engagement rows. - [x] Activities targeting unknown posts do not affect engagement counts. - [x] Engagement summary includes counts from ingested ActivityPub likes and boosts. - [x] Like and boost list endpoints expose ingested actor/activity data. - [x] Existing engagement API response shapes are unchanged. - [x] No duplicate hand-rolled ActivityPub inbox routes are added outside the Fedify route setup. - [x] Relevant tests and checks pass (`./scripts/pre-pr.sh`, CI run #159). ### Blocking issues - None. ### Warnings - None. ### Verdict Approved. Stop at the human merge approval gate. PR Review Worker Result - pr: open - review: approved - pr_comment: posted - task_comment: posted - blocking_issues: 0 - warnings: 0 - criteria_total: 9 - criteria_met: 9 - criteria_missing: 0
erik merged commit a4080e1b61 into main 2026-06-06 07:38:18 -05:00
erik deleted branch feat/task-5ed9fc7d-activitypub-engagement-ingestion 2026-06-06 07:38:18 -05:00
Sign in to join this conversation.
No description provided.