Implement following API routes #76

Merged
caradoc merged 1 commit from feat/task-64c48bf9-following-api into main 2026-05-30 22:59:07 -05:00
Collaborator

Summary

  • add following persistence for protocol-neutral social targets
  • add authenticated following list, resolve, create, unfollow, and cancel API routes
  • create/reuse contact and account data when following a target
  • document following routes and schemas in OpenAPI
  • add route and migration tests

Verification

  • make check
  • ./scripts/pre-pr.sh

Task: #task-64c48bf9

## Summary - add following persistence for protocol-neutral social targets - add authenticated following list, resolve, create, unfollow, and cancel API routes - create/reuse contact and account data when following a target - document following routes and schemas in OpenAPI - add route and migration tests ## Verification - `make check` - `./scripts/pre-pr.sh` Task: #task-64c48bf9
feat: implement following API routes
All checks were successful
CI / build-lint-test (pull_request) Successful in 27s
a3af55a8b3
Task: #task-64c48bf9
Author
Collaborator

PR review approved

Summary:

  • Adds protocol-neutral following persistence and API routes for list, resolve, create, unfollow, and cancel.
  • Creates/reuses related contact and account records when following a target.
  • Exposes validation, conflict, not-found, failed-status/last-error, and unsupported-operation behavior.
  • Documents following routes and schemas in OpenAPI.
  • Adds route and migration tests.

Acceptance criteria:

  • Can list following records and statuses — met by GET /api/v1/following, optional status filtering, and list tests covering pending and failed records.
  • Can resolve a follow target — met by POST /api/v1/following/resolve and tests for handle and URL targets.
  • Can follow a target and create a pending following record — met by POST /api/v1/following and tests asserting pending state plus contact/account creation.
  • Can unfollow an accepted target — met by POST /api/v1/following/{id}/unfollow and accepted-status test.
  • Can cancel a pending follow — met by POST /api/v1/following/{id}/cancel and pending cancel test.
  • Delivery/validation failures are visible and use documented error behavior — met by validation/conflict/not-found tests and failed status/lastError list coverage.
  • Unsupported implementations return standardized 501 Not Implemented — met by missing-table test.
  • Every route appears in OpenAPI with documented operation IDs — met by OpenAPI route coverage for all five operation IDs.
  • Relevant lint/test checks pass — make check, ./scripts/pre-pr.sh, and Forgejo CI passed.

Blocking issues: none.

Warnings: none.

Final verdict: approved.

### PR review approved Summary: - Adds protocol-neutral following persistence and API routes for list, resolve, create, unfollow, and cancel. - Creates/reuses related contact and account records when following a target. - Exposes validation, conflict, not-found, failed-status/last-error, and unsupported-operation behavior. - Documents following routes and schemas in OpenAPI. - Adds route and migration tests. Acceptance criteria: - [x] Can list following records and statuses — met by `GET /api/v1/following`, optional status filtering, and list tests covering pending and failed records. - [x] Can resolve a follow target — met by `POST /api/v1/following/resolve` and tests for handle and URL targets. - [x] Can follow a target and create a pending following record — met by `POST /api/v1/following` and tests asserting pending state plus contact/account creation. - [x] Can unfollow an accepted target — met by `POST /api/v1/following/{id}/unfollow` and accepted-status test. - [x] Can cancel a pending follow — met by `POST /api/v1/following/{id}/cancel` and pending cancel test. - [x] Delivery/validation failures are visible and use documented error behavior — met by validation/conflict/not-found tests and failed status/`lastError` list coverage. - [x] Unsupported implementations return standardized `501 Not Implemented` — met by missing-table test. - [x] Every route appears in OpenAPI with documented operation IDs — met by OpenAPI route coverage for all five operation IDs. - [x] Relevant lint/test checks pass — `make check`, `./scripts/pre-pr.sh`, and Forgejo CI passed. Blocking issues: none. Warnings: none. Final verdict: approved.
caradoc deleted branch feat/task-64c48bf9-following-api 2026-05-30 22:59:07 -05:00
Sign in to join this conversation.
No description provided.