Make filtered-notification integration test idempotent (#144) - #149
Merged
Conversation
Accepting a notification request grants the sender a permanent NotificationPermission, so any re-run against a reused database found kadaba's mentions no longer filtered and timed out waiting for a NotificationRequest. Mastodon exposes no API to revoke the permission directly, but BlockService destroys it (verified on v4.4.8 and v4.6.1), so the test now resets it via a block/unblock pair at the start and in on_exit. Investigation notes for the rest of #144: on a truly fresh database the test passes against Mastodon 4.6.1 as well — the reported failure was this leftover state, not a 4.6 behavior change. The remaining failure (idempotency-key dedup returning 500) is an upstream 4.6 regression in PostStatusService#with_idempotency and cannot be fixed in Hunter. Co-Authored-By: Claude Fable 5 <[email protected]>
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
Fixes the second failure in #144 (
filtered notifications become requests that can be accepted) and documents why the first one can't be fixed here.NotificationPermission, so any re-run against a reused database found kadaba's mentions no longer filtered (FilterCondition#override_for_sender?) and timed out waiting for aNotificationRequest.BlockServicedestroys it (present in both v4.4.8 and v4.6.1), so the test now resets it with a block/unblock pair at the start and inon_exit, making it self-healing on reused databases.Investigation findings for the rest of #144
POST /api/v1/statuseswith the sameIdempotency-Key→ 500) is an upstream Mastodon 4.6 regression, still present onmain: thewith_idempotencyrefactor inPostStatusServicereturns the duplicate from the helper's own scope,callcontinues with@status = nil, andpostprocess_status!crashes inProcessHashtagsService(NoMethodError: undefined method 'account' for nil). Reproducible with plain curl. Nothing in Hunter can fix it; it blocks bumping CI toward 4.6 unless that assertion is version-guarded.Test plan
Refs #144
🤖 Generated with Claude Code