Implement slug following commands #9

Closed
opened 2026-05-19 19:51:44 -05:00 by erik · 3 comments
Owner

Goal

Implement slug following management commands against the Slugkit following API.

Spec: docs/cli-specs/09-following-commands.md

Requirements

  • Implement following list, resolve, follow, unfollow, and cancel commands from the spec.
  • Serialize follow targets exactly as the API expects.
  • Display resolved profile details before/after follow operations as appropriate.
  • Display target site/profile before mutations.
  • Support valid JSON output where specified.
  • Surface validation, auth, not-found, conflict/delivery failures, and 501 Not Implemented responses clearly.
  • Add CLI tests with mocked API responses for success and common errors.

Acceptance criteria

  • Can resolve a follow target.
  • Can follow a target.
  • Can list following state.
  • Can unfollow an accepted following record.
  • Can cancel a pending following record.
  • JSON output is valid when requested.
  • 501 Not Implemented responses are displayed clearly.
  • Tests cover success and common API errors.
  • Relevant lint/test checks pass.

Dependencies

  • task-a3cd5595
  • task-11469f4d
## Goal Implement `slug` following management commands against the Slugkit following API. Spec: `docs/cli-specs/09-following-commands.md` ## Requirements - Implement following list, resolve, follow, unfollow, and cancel commands from the spec. - Serialize follow targets exactly as the API expects. - Display resolved profile details before/after follow operations as appropriate. - Display target site/profile before mutations. - Support valid JSON output where specified. - Surface validation, auth, not-found, conflict/delivery failures, and `501 Not Implemented` responses clearly. - Add CLI tests with mocked API responses for success and common errors. ## Acceptance criteria - [ ] Can resolve a follow target. - [ ] Can follow a target. - [ ] Can list following state. - [ ] Can unfollow an accepted following record. - [ ] Can cancel a pending following record. - [ ] JSON output is valid when requested. - [ ] `501 Not Implemented` responses are displayed clearly. - [ ] Tests cover success and common API errors. - [ ] Relevant lint/test checks pass. ## Dependencies - task-a3cd5595 - task-11469f4d
Author
Owner

Synced from todu comment by @todu on 2026-06-04T12:33:41.527Z

Scope update

User decision: simplify following cancellation semantics.

  • Do not add a separate slug following cancel CLI command.
  • Remove the API endpoint /api/v1/following/{id}/cancel.
  • Handle pending follow-request cancellation through /api/v1/following/{id}/unfollow instead, so the user-facing action is simply unfollow for both pending and accepted following records.

Rationale: a pending follow request is still a prior attempt to follow, so unfollow is the clearer single action.

_Synced from todu comment by @todu on 2026-06-04T12:33:41.527Z_ ## Scope update User decision: simplify following cancellation semantics. - Do not add a separate `slug following cancel` CLI command. - Remove the API endpoint `/api/v1/following/{id}/cancel`. - Handle pending follow-request cancellation through `/api/v1/following/{id}/unfollow` instead, so the user-facing action is simply `unfollow` for both pending and accepted following records. Rationale: a pending follow request is still a prior attempt to follow, so `unfollow` is the clearer single action.
Author
Owner

Synced from todu comment by @todu on 2026-06-04T12:38:55.451Z

PR Review

PR: #93

Review result: approved

Acceptance criteria: 9 total, 9 met, 0 missing

Blocking issues: 0
Warnings: 0

Notes:

  • Reviewed against the user-approved scope update: no separate cancel; pending follow request cancellation is handled by unfollow.
  • /api/v1/following/{id}/cancel was removed.

Verification:

  • ./scripts/pre-pr.sh passed locally.
  • Forgejo CI status for CI / build-lint-test (pull_request) is success.

Verdict: Approved. Ready for human merge approval.

_Synced from todu comment by @todu on 2026-06-04T12:38:55.451Z_ ## PR Review PR: https://forge.caradoc.com/erik/slugkit/pulls/93 Review result: approved Acceptance criteria: 9 total, 9 met, 0 missing Blocking issues: 0 Warnings: 0 Notes: - Reviewed against the user-approved scope update: no separate `cancel`; pending follow request cancellation is handled by `unfollow`. - `/api/v1/following/{id}/cancel` was removed. Verification: - `./scripts/pre-pr.sh` passed locally. - Forgejo CI status for `CI / build-lint-test (pull_request)` is `success`. Verdict: Approved. Ready for human merge approval.
erik 2026-06-04 07:46:04 -05:00
Author
Owner

Synced from todu comment by @todu on 2026-06-04T12:42:17.384Z

Closing Summary

Status: READY

Evidence:

  • PR #93 was approved with 9/9 acceptance criteria met and 0 blocking issues.
  • Local pre-PR verification passed per review evidence.
  • Forgejo CI CI / build-lint-test (pull_request) succeeded per review evidence.
  • PR #93 has been merged into main as 85d2360 (feat: add following CLI commands).

Notes:

  • Per approved scope update, pending follow-request cancellation is handled through unfollow; no separate cancel command or /cancel API endpoint was retained.
_Synced from todu comment by @todu on 2026-06-04T12:42:17.384Z_ ## Closing Summary Status: READY Evidence: - PR #93 was approved with 9/9 acceptance criteria met and 0 blocking issues. - Local pre-PR verification passed per review evidence. - Forgejo CI `CI / build-lint-test (pull_request)` succeeded per review evidence. - PR #93 has been merged into `main` as `85d2360` (`feat: add following CLI commands`). Notes: - Per approved scope update, pending follow-request cancellation is handled through `unfollow`; no separate `cancel` command or `/cancel` API endpoint was retained.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
erik/slugkit#9
No description provided.