Skip to content

Two integration tests fail against Mastodon 4.6: scheduled-status idempotency (500) and filtered-notification requests #144

Description

@milmazz

While verifying #126 (PR #143), the integration suite was run against ghcr.io/mastodon/mastodon:v4.6.1 on a freshly provisioned stack. All OAuth tests pass there, but two pre-existing tests fail; both pass on the v4.4.8 image CI now pins. These need investigating before any CI bump toward the 4.6 parity target.

1. scheduling a status returns a scheduled status; idempotency key deduplicates

POST /api/v1/statuses with scheduled_at + an Idempotency-Key header returns 500 Internal Server Error on v4.6.1:

** (Hunter.Error) "{\"status\":500,\"error\":\"Internal Server Error\"}"
code: Hunter.create_status(conn, "idempotent probe #hunterci", idempotency_key: key)
test/integration/mastodon_test.exs:218

A server 500 suggests a Mastodon-side regression or a changed contract around scheduled statuses/idempotency — worth reproducing with curl against 4.6.x and checking upstream release notes/issues before deciding whether Hunter needs a change.

2. filtered notifications become requests that can be accepted

On v4.6.1 (fresh DB, no rate limiting in play) the NotificationRequest for the filtered mention never materializes:

** (RuntimeError) notification request not created yet
test/integration/mastodon_test.exs:316

Possibly a changed default in 4.6's notification-policy/filtering behavior (e.g. for_not_following semantics or request-creation conditions).

Related, but separate: the test is also non-idempotent locally

Independent of server version, this test leaves permanent state behind: accept_notification_request creates a NotificationPermission for kadaba, so any re-run against a reused local DB finds her mentions no longer filtered and times out waiting for a request. Fresh-DB CI is unaffected. A fix could remove the permission in on_exit via an API call if one exists, or the test could tolerate the pre-permitted state.

Environment

  • Repro: edit docker-compose.ci.yml images to v4.6.1, then docker compose -f docker-compose.ci.yml down -v && ./scripts/ci/setup_mastodon.sh && source scripts/ci/.env.hunter && mix test --only integration
  • Result on v4.6.1: 26/28 (only the two above fail) · on v4.4.8: 28/28

🤖 Generated with Claude Code

https://claude.ai/code/session_012Ye7jCRcC5hkSBt3dALD44

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions