Skip to content

Record history honors deletion (staging port of #137) - #138

Merged
daviddao merged 2 commits into
stagingfrom
record-history-honor-deletes-staging
Sep 23, 2026
Merged

daviddao merged 2 commits into
stagingfrom
record-history-honor-deletes-staging

Conversation

@daviddao

Copy link
Copy Markdown
Member

Staging port of #137 so production honors deletion in record history: deleting a record removes its versions, and deleted, deactivated or taken-down accounts lose theirs in the same purge transaction. Adds migration 016 (record_version(did) index). Same code as #137, adapted to staging's records.Delete path.

Verified on this branch: lint, go test -race ./... on SQLite and PostgreSQL 17, and integration tests.

#137)

Deleting a record removes its stored versions, and account purges remove the
account's versions with its records. Migration 016 indexes record_version(did).
@vercel

vercel Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hyperindex-atproto-client Ready Ready Preview Sep 23, 2026 7:49am UTC
hyperindex-client Ready Ready Preview Sep 23, 2026 7:49am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: GainForest/hyperindex/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: c4a539fc-8cd4-43a7-837c-092ea024dc6c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 63d10a1437

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread internal/database/migrations/sqlite/016_add_record_version_did_index.up.sql Outdated
Comment thread cmd/hyperindex/main.go Outdated
Same as #137's follow-up: Records.Delete / DeleteByDID / PurgeActorData
delete record_version rows in the same transaction (covering Tap and legacy
Jetstream deletes), and migration 016 removes history the 015-era build kept
for deleted records and purged accounts before adding the did index.
@daviddao

Copy link
Copy Markdown
Member Author

Addressed in the latest commits: history is now deleted inside RecordsRepository.Delete/DeleteReturning/DeleteByDID/PurgeActorData, in the same transaction as the record, which covers Tap and legacy Jetstream deletes. Migration 016 now removes what 015-era builds left behind (tombstones, versions before a tombstone, and history of records that no longer exist, including purged accounts), verified on SQLite (test) and PostgreSQL (manual fixture).

@daviddao
daviddao merged commit a567f3a into staging Sep 23, 2026
9 checks passed

This branch was successfully deployed

2 active deployments
Preview – hyperindex-client — 625d8ae2 Deployed Sep 23, 2026 by vercel[bot]
Preview – hyperindex-atproto-client — 625d8ae2 Deployed Sep 23, 2026 by vercel[bot]
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