Allow contact deletion after ActivityPub unfollow #314

Merged
erik merged 1 commit from fix/task-b116d607-contact-unfollow into main 2026-10-30 05:55:02 -05:00
Owner

Summary

  • Allow explicit contact deletion when only inactive follow history remains. Pending/accepted follows and unrelated references still return 409 without partial cleanup.
  • Transactionally detach inactive history, remove the deleted contact’s owned accounts, and preserve incoming bodies/snapshots, delivery aliases, tombstones, cursor positions and deduplication identity.
  • Hide detached internal history from management routes until explicit refollow reattaches the same following ID to a real account. Public accountId remains non-null. Ignore late signed Accept/Reject for detached history without inbox retries.
  • Add migration 031 with preservation/rollback, API, deletion/refollow and late-delivery regressions.
  • Update OpenAPI, digest, metadata tests and adoption/spec docs for source contract 2.3.0 (additive deletion capability); npm versions, pins and lockfile unchanged.

Verification

  • ./scripts/pre-pr.sh passed: build/contract validation, CSS consistency, formatting, lint, types and 1,461 tests across 99 files.
  • npm run test:ci passed: 1,326 tests across 87 files; integration/federation tests remain local-only, workflows unchanged.
  • Current-head CI passed: https://forge.caradoc.com/erik/slugkit/actions/runs/566/jobs/0 (794e7c1).
  • Independent review found no actionable issues at 794e7c1; review summary recorded in PR comment.
  • git diff --check clean; generated CSS/dependency metadata unchanged.

Operational boundaries

All migration tests use isolated in-memory databases. No normal application startup or migration execution against existing data; dev server was stopped. No release, deployment, production contact cleanup or historical changelog edits. Existing-site adoption requires backup/restored-copy testing and separately authorized migration/startup. This does not delete or merge the production contacts mentioned in the task.

Task: task-b116d607.

Pipeline state

Ready for explicit human merge approval. Do not auto-merge.

## Summary - Allow explicit contact deletion when only inactive follow history remains. Pending/accepted follows and unrelated references still return 409 without partial cleanup. - Transactionally detach inactive history, remove the deleted contact’s owned accounts, and preserve incoming bodies/snapshots, delivery aliases, tombstones, cursor positions and deduplication identity. - Hide detached internal history from management routes until explicit refollow reattaches the same following ID to a real account. Public accountId remains non-null. Ignore late signed Accept/Reject for detached history without inbox retries. - Add migration 031 with preservation/rollback, API, deletion/refollow and late-delivery regressions. - Update OpenAPI, digest, metadata tests and adoption/spec docs for source contract 2.3.0 (additive deletion capability); npm versions, pins and lockfile unchanged. ## Verification - ./scripts/pre-pr.sh passed: build/contract validation, CSS consistency, formatting, lint, types and 1,461 tests across 99 files. - npm run test:ci passed: 1,326 tests across 87 files; integration/federation tests remain local-only, workflows unchanged. - Current-head CI passed: https://forge.caradoc.com/erik/slugkit/actions/runs/566/jobs/0 (794e7c1). - Independent review found no actionable issues at 794e7c1; review summary recorded in PR comment. - git diff --check clean; generated CSS/dependency metadata unchanged. ## Operational boundaries All migration tests use isolated in-memory databases. No normal application startup or migration execution against existing data; dev server was stopped. No release, deployment, production contact cleanup or historical changelog edits. Existing-site adoption requires backup/restored-copy testing and separately authorized migration/startup. This does not delete or merge the production contacts mentioned in the task. Task: task-b116d607. ## Pipeline state Ready for explicit human merge approval. Do not auto-merge.
fix: allow contact deletion after unfollow
All checks were successful
CI / build-lint-test (pull_request) Successful in 1m3s
794e7c15bd
Task: #task-b116d607
Author
Owner

Independent review of exact head 794e7c1 completed by a separate read-only pi reviewer following the pr-review skill:

No actionable issues found in PR #314 at 794e7c1.
Reviewed the complete supplied diff and surrounding migration, deletion, account, following, incoming-buffer, federation, and API code.
Supplied local logs show pre-pr.sh passed (1,461 tests across 99 files) and test:ci passed (1,326 tests across 87 files).
Verification limits: read-only review; tests were not rerun and remote CI was not independently verified by the reviewer.

Implementing-agent verification: current-head CI / build-lint-test passed at 794e7c15bd (1m3s): https://forge.caradoc.com/erik/slugkit/actions/runs/566/jobs/0 . Full local checks passed and working tree is clean. No workflows, npm versions, pins, lockfile or generated CSS changed. No existing-data migrations, application startup, release/deployment or production cleanup performed.

Pipeline state: implementation, local checks, exact-head CI and independent review complete. Awaiting explicit human merge approval; do not auto-merge. Task remains in progress and task branch is retained.

Independent review of exact head 794e7c1 completed by a separate read-only pi reviewer following the pr-review skill: > No actionable issues found in PR #314 at 794e7c1. > Reviewed the complete supplied diff and surrounding migration, deletion, account, following, incoming-buffer, federation, and API code. > Supplied local logs show pre-pr.sh passed (1,461 tests across 99 files) and test:ci passed (1,326 tests across 87 files). > Verification limits: read-only review; tests were not rerun and remote CI was not independently verified by the reviewer. Implementing-agent verification: current-head CI / build-lint-test passed at 794e7c15bddd65c622610b897fb2292847e169c5 (1m3s): https://forge.caradoc.com/erik/slugkit/actions/runs/566/jobs/0 . Full local checks passed and working tree is clean. No workflows, npm versions, pins, lockfile or generated CSS changed. No existing-data migrations, application startup, release/deployment or production cleanup performed. Pipeline state: implementation, local checks, exact-head CI and independent review complete. Awaiting explicit human merge approval; do not auto-merge. Task remains in progress and task branch is retained.
erik merged commit d007a5f2f6 into main 2026-10-30 05:55:02 -05:00
erik deleted branch fix/task-b116d607-contact-unfollow 2026-10-30 05:55:02 -05:00
Author
Owner

Merged with explicit human approval as d007a5f2f6. Post-merge main CI passed (1m7s): https://forge.caradoc.com/erik/slugkit/actions/runs/567/jobs/0 . Local main synchronized and task branch cleaned up locally/remotely. No release, existing-data migration execution, deployment or production contact cleanup performed.

Merged with explicit human approval as d007a5f2f67c2c04408178801eed00caa7ed0719. Post-merge main CI passed (1m7s): https://forge.caradoc.com/erik/slugkit/actions/runs/567/jobs/0 . Local main synchronized and task branch cleaned up locally/remotely. No release, existing-data migration execution, deployment or production contact cleanup performed.
Sign in to join this conversation.
No reviewers
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!314
No description provided.