fix(domain): count unverified holders in tier slot usage (BUNYIP-105) #239

Merged
Claude-Run merged 1 commit from fix/bunyip-105-count-unverified-tier-slots into main 2026-06-26 05:02:12 +02:00
Member

count_tier_assignments filtered on email_verified = true, so unverified lifetime / early_adopter users read as 0. That let unverified lifetimes bypass the configured cap and made the admin Tier Settings page under-report slot usage, contradicting the function's own BUNYIP-96 doc-comment.

Drop the email_verified predicate (keep deleted_at IS NULL): an active lifetime / early_adopter subscription occupies a slot regardless of email-verification state. Extract the SQL into a named const so a --lib unit test can assert the predicate stays dropped without a live database.

#BUNYIP-105

count_tier_assignments filtered on email_verified = true, so unverified lifetime / early_adopter users read as 0. That let unverified lifetimes bypass the configured cap and made the admin Tier Settings page under-report slot usage, contradicting the function's own BUNYIP-96 doc-comment. Drop the email_verified predicate (keep deleted_at IS NULL): an active lifetime / early_adopter subscription occupies a slot regardless of email-verification state. Extract the SQL into a named const so a --lib unit test can assert the predicate stays dropped without a live database. #BUNYIP-105
fix(domain): count unverified holders in tier slot usage (BUNYIP-105)
All checks were successful
E2E / Playwright against deployment (pull_request) Successful in 1m3s
Check / fmt + clippy + build + tests (pull_request) Successful in 22m54s
Create release / Create release from merged PR (pull_request) Has been skipped
87deecd38a
count_tier_assignments filtered on email_verified = true, so unverified lifetime / early_adopter users read as 0. That let unverified lifetimes bypass the configured cap and made the admin Tier Settings page under-report slot usage, contradicting the function's own BUNYIP-96 doc-comment.

Drop the email_verified predicate (keep deleted_at IS NULL): an active lifetime / early_adopter subscription occupies a slot regardless of email-verification state. Extract the SQL into a named const so a --lib unit test can assert the predicate stays dropped without a live database.

#BUNYIP-105
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/bunyip!239
No description provided.