(Optional) One-time cleanup of duplicate kind 0 rows in DynamoDB#75
Merged
alejandro-runner merged 1 commit intomainfrom Feb 3, 2026
Merged
(Optional) One-time cleanup of duplicate kind 0 rows in DynamoDB#75alejandro-runner merged 1 commit intomainfrom
alejandro-runner merged 1 commit intomainfrom
Conversation
- scripts/cleanup-kind0-duplicates.ts: scan kind=0, keep latest per pubkey, delete rest - --dry-run to preview; document in scripts/README.md - npm run cleanup:kind0:dry-run | cleanup:kind0 Closes #71 Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
After merging the Lambda and data-loader fixes (#68, #69), DynamoDB may still contain multiple kind 0 rows per pubkey from past runs. This adds a one-time cleanup script so the table can be normalized to one kind 0 per pubkey.
Changes
created_atper pubkey, and deletes the others. Supports--dry-runto preview without deleting.npm run cleanup:kind0:dry-runandnpm run cleanup:kind0.Do not run automatically in production; run explicitly after deploying the kind 0 replaceable fix. Prefer testing against a staging table first.
Closes #71