fix: ignore stale Undo Follow activities #303

Merged
erik merged 2 commits from fix/task-89c23bd4-stale-undo-follow into main 2026-10-26 07:32:11 -05:00
Owner

Summary

Prevent an Undo for an earlier Follow from deactivating a newer ActivityPub follower relationship in the example site.

Task

task-89c23bd4 — Fix stale Undo Follow handling in the example site.

Changes

  • Require the undone Follow to have an ID and the same actor as the Undo.
  • Atomically deactivate only the active follower whose actor URL and stored Follow ID match; preserve relationships when stored Follow identity is missing or invalid.
  • Normalize newly stored Follow JSON-LD so custom ID aliases match correctly; also recognize @id in previously stored documents.
  • Add signed inbox regression cases for stale and matching Undo after a newer Follow using id, @id, and a custom alias, plus deterministic unit coverage for replay, refollow, actor mismatch, and missing/invalid stored identity.
  • Include the user-provided AGENTS.md workflow updates.
  • No production deployment, data repair, schema changes, or CI workflow changes.

Testing

  • Confirmed the stale-Undo regression fails on the original implementation (expected one follower, observed none).
  • Targeted tests: 26 passed across two files.
  • ./scripts/pre-pr.sh: passed (build, generated CSS, formatting, lint, typecheck, full local tests including integration coverage).
  • Unit tests run in the existing test:ci job; integration coverage remains local-only.

Checklist

  • Unit tests added/updated
  • Signed inbox integration regression exercised locally
  • ./scripts/pre-pr.sh passes
  • User-provided AGENTS.md updates included
  • No unrelated changes included

Review and delivery state

  • Reviewed directly using the pr-review skill at commit 797a579608.
  • The JSON-LD identity issue found during review was fixed and covered with regression tests; no remaining actionable defects found.
  • Forgejo CI run #528 (build-lint-test) passed for this commit.
  • Local ./scripts/pre-pr.sh passed, including the signed inbox integration regressions.
  • No live Mastodon interoperability or production deployment was performed.
  • Merged with explicit human approval as af0826a915; post-merge CI #529 passed.
  • Task task-89c23bd4 is done. Local main is synchronized and clean; the task branch was deleted locally and remotely.
## Summary Prevent an Undo for an earlier Follow from deactivating a newer ActivityPub follower relationship in the example site. ## Task `task-89c23bd4` — Fix stale Undo Follow handling in the example site. ## Changes - Require the undone Follow to have an ID and the same actor as the Undo. - Atomically deactivate only the active follower whose actor URL and stored Follow ID match; preserve relationships when stored Follow identity is missing or invalid. - Normalize newly stored Follow JSON-LD so custom ID aliases match correctly; also recognize `@id` in previously stored documents. - Add signed inbox regression cases for stale and matching Undo after a newer Follow using `id`, `@id`, and a custom alias, plus deterministic unit coverage for replay, refollow, actor mismatch, and missing/invalid stored identity. - Include the user-provided `AGENTS.md` workflow updates. - No production deployment, data repair, schema changes, or CI workflow changes. ## Testing - Confirmed the stale-Undo regression fails on the original implementation (expected one follower, observed none). - Targeted tests: 26 passed across two files. - `./scripts/pre-pr.sh`: passed (build, generated CSS, formatting, lint, typecheck, full local tests including integration coverage). - Unit tests run in the existing `test:ci` job; integration coverage remains local-only. ## Checklist - [x] Unit tests added/updated - [x] Signed inbox integration regression exercised locally - [x] `./scripts/pre-pr.sh` passes - [x] User-provided `AGENTS.md` updates included - [x] No unrelated changes included ## Review and delivery state - Reviewed directly using the `pr-review` skill at commit `797a579608`. - The JSON-LD identity issue found during review was fixed and covered with regression tests; no remaining actionable defects found. - Forgejo CI run #528 (`build-lint-test`) passed for this commit. - Local `./scripts/pre-pr.sh` passed, including the signed inbox integration regressions. - No live Mastodon interoperability or production deployment was performed. - Merged with explicit human approval as `af0826a915`; post-merge CI #529 passed. - Task `task-89c23bd4` is done. Local `main` is synchronized and clean; the task branch was deleted locally and remotely.
fix: ignore stale Undo Follow activities
All checks were successful
CI / build-lint-test (pull_request) Successful in 1m1s
5fdff3bf07
Task: #task-89c23bd4
fix: normalize Follow identity for Undo matching
All checks were successful
CI / build-lint-test (pull_request) Successful in 1m1s
797a579608
Handle JSON-LD ID aliases and include the user-provided agent workflow updates.

Task: #task-89c23bd4
erik merged commit af0826a915 into main 2026-10-26 07:32:11 -05:00
erik deleted branch fix/task-89c23bd4-stale-undo-follow 2026-10-26 07:32:11 -05:00
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!303
No description provided.