Skip to content

test: temp_postgres_store fixture never clears user_entitlements #437

Description

@FlyM1ss

Status: deferred 2026-09-02 in PR #436 (defer rule D1)

What: temp_postgres_store (dashboard/backend/tests/test_users_postgres.py:92-97) deletes password_reset_requests, email_change_requests, auth_sessions, and users between tests, but never user_entitlements. Under a full-file run against a real Postgres (TEST_POSTGRES_URL), leftover rows fail test_entitlements_missing_user_is_user_not_found_postgres and test_credit_spend_for_missing_user_postgres via cross-test pollution. Invisible on CI/local runs without a live PG (@pg_only skips).

Why deferred: D1 — pre-existing fixture gap in the entitlements/credits tests, untouched by PR #436's password-reset diff (found while live-verifying the PR's tests against postgres:16, which pass).

Next-session entry point: dashboard/backend/tests/test_users_postgres.py:92-97 — add DELETE FROM user_entitlements (and any credit-ledger tables) to the fixture wipe, re-run the full file against a live PG. ~15 min.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    afk-deferredDeferred by the AFK dev loop (defer rule D1-D6)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions