"Shuttle Revolutionizes Message Management: Eradicates Ghost Messages from Database!"
"New update empowers users to delete orphaned messages, enhancing data integrity and streamlining operations."
Commit Details:
feat(shuttle): Support deleting messages on DB that are missing on hub (#2341) There was existing support for handling messages that were present on hub and missing on DB, but not the opposite. From talking with Sanjay, it should be correct/safe to delete these messages from the DB. ## Why is this change needed? Shuttle only reconciled in one direction, even though everything appears 95% written to support both directions. This completes that. I know from adding logging to our Shuttle-powered app that that are a significant number of messages present in our DB that are missing in the hub. ## Merge Checklist _Choose all relevant options below by adding an `x` now or at any time before submitting for review_ - [x] PR title adheres to the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) standard - [x] PR has a [changeset](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#35-adding-changesets) - [ ] PR has been tagged with a change label(s) (i.e. documentation, feature, bugfix, or chore) - [ ] PR includes [documentation](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#32-writing-docs) if necessary. <!-- start pr-codex --> --- ## PR-Codex overview This PR introduces functionality to delete messages from the database that are not present on the hub, enhancing the message handling logic in the `shuttle` package. ### Detailed summary - Updated `handleMissingMessage` method in `HubEventProcessor` to accept an optional `missingInHub` parameter. - Added logic to delete messages if `missingInHub` is true; otherwise, it merges them. - Adjusted calls to `handleMissingMessage` in `app.ts` to pass the new parameter. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->