Skip to content

feat(backend): activity and account deletion, data export (TDD-0004) - #26

Merged
AlessioBrillo merged 1 commit into
mainfrom
feat/backend-deletion-export
Oct 9, 2026
Merged

AlessioBrillo merged 1 commit into
mainfrom
feat/backend-deletion-export

Conversation

@AlessioBrillo

Copy link
Copy Markdown
Owner

Stacked on #25 (docs) and contains the #24 revert commit (the new V5 replaces the removed one). Merge #24 and #25 first, then retarget this to main.

What

  • V5__data_deletion.sql: users.deleted_at, deleted_activities tombstones.
  • DELETE /v1/activities/{id} (204/404/400), DELETE /v1/me (idempotent, the only call a deleted account may make), GET /v1/me/export (ZIP: raw JSONL byte-for-byte, GPX, activities.json; max 2 at once, then 503).
  • PUT of a deleted id answers 410 (the sync client already treats it as permanent). Deleted accounts get 403.
  • RawObjectStore.delete / deletePrefix; UserData holds deletion and export.

Verification

./gradlew :backend:ktlintCheck :backend:test against real PostGIS + SeaweedFS (22 ingest tests, 5 new: delete + 410, IDOR on delete, account deletion leaves other users untouched, export contents and byte equality, export slot limit). End-to-end on the Compose stack and the web flow come with the web PR.

Notes

  • Account deletion sets the flag first, then deletes objects, then rows; every step can be repeated.
  • Not tested: log contents during deletion/export (checked in the end-to-end run), exports larger than a few activities.

🤖 Generated with Claude Code

DELETE /v1/activities/{id} removes the row and raw object and leaves a data-free tombstone (a later
upload of that id gets 410). DELETE /v1/me flags the account, removes its objects by prefix and all
its rows; a deleted account gets 403 except for repeating the deletion. GET /v1/me/export streams a
ZIP of every raw file unchanged, a GPX of each and activities.json, at most 2 at a time.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@AlessioBrillo
AlessioBrillo force-pushed the feat/backend-deletion-export branch from 457e2b7 to 5359675 Compare October 9, 2026 18:03
@AlessioBrillo
AlessioBrillo changed the base branch from docs/tdd-0004-deletion-export to main October 9, 2026 18:03
@AlessioBrillo
AlessioBrillo merged commit 4b94ad9 into main Oct 9, 2026
13 checks passed
@AlessioBrillo
AlessioBrillo deleted the feat/backend-deletion-export branch October 9, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant