fix(wintermute): distinguish an absent record row from a stale delete - #226
Open
afbase wants to merge 1 commit into
Open
fix(wintermute): distinguish an absent record row from a stale delete#226afbase wants to merge 1 commit into
afbase wants to merge 1 commit into
Conversation
afbase
force-pushed
the
fix/wintermute-delete-cascade
branch
from
August 11, 2026 04:54
a5dada6 to
6b9de47
Compare
afbase
changed the base branch from
main
to
fix/wintermute-notification-retraction
August 11, 2026 04:54
afbase
force-pushed
the
fix/wintermute-notification-retraction
branch
from
August 11, 2026 20:49
8a1bacf to
a0ac6f5
Compare
The delete path treated "no record row deleted" as a lost race and skipped the typed cleanup, which orphaned the typed row whenever the record row was simply absent. The boilerplate skip works around that by forcing the cascade for like, repost, follow and block, but it does so unconditionally: a delete carrying an older rev than a surviving record row now cascades into a live typed row, and the error from the record delete is discarded. Return the deletion outcome instead. An absent record row cascades, a surviving newer rev does not, and the distinction holds for every collection rather than only the boilerplate set.
afbase
force-pushed
the
fix/wintermute-delete-cascade
branch
from
August 11, 2026 20:50
6b9de47 to
fe1b32d
Compare
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
Builds on #223. The delete path treats "no record row deleted" as a lost race and skips the typed cleanup, so the typed row is orphaned whenever the record row is simply absent rather than newer. #223 works around that by forcing the cascade for the boilerplate collections (
like,repost,follow,block), which fixes the common case but does it unconditionally: a delete carrying an older rev than a surviving record row now cascades into a live typed row, and the error from the record delete is discarded.This returns the deletion outcome instead of a bool. An absent record row cascades; a surviving newer rev does not; and the distinction holds for every collection rather than only the boilerplate set. Practical exposure of the stale-rev case is small — rkeys are TIDs, so delete-then-recreate at the same key is rare — so this is a correctness cleanup rather than an urgent fix.
Stacked on #227; review that one first. Retarget to
mainonce it merges.Test plan
cargo clippy -p rsky-wintermute --all-targetsis cleancargo test -p rsky-wintermute --libagainst a schema-loaded Postgres, including the two added cases: cascade with the skip off and the record row absent, and no cascade for a stale-rev delete with the skip oncargo llvm-cov -p rsky-wintermutecargo build --release -p rsky-wintermute