Rename gift to guest throughout: routes, ledger table, account_type values, env names, emails, tests

Pure rename, no behaviour change, matching the renamed panel and dashboard
builds. Includes one-time idempotent migrations for existing databases
(gifts->guests table, gift_expires_at->guest_expires_at column,
account_type 'gift'->'guest' values, gift_lapse_notices->guest_lapse_notices)
and four transitional alias routes (admin/provision-gift, admin/gift-convert,
broker/gift-status, broker/cancel-gift) so pre-rename dashboard/panel builds
keep working until they are redeployed.
This commit is contained in:
inference-bot committed 2026-11-08 02:41:05 +00:00
1 parent 8af8e39c0b
commit 27f9cc06b2
5 files changed
+493 -447

No files matched your search

+2 -2
View File
@@ -207,7 +207,7 @@ def from_sqlite() -> dict:
"""Members, plus the provisioning dates that give the growth curve.
Operator/utility accounts are excluded, matching the panel's member count.
GIFT accounts are excluded too: they are $5 guest passes, not members —
GUEST accounts are excluded too: they are $5 guest passes, not members —
counting them would move the growth curve the co-op publishes.
"""
conn = connect()
@@ -221,7 +221,7 @@ def from_sqlite() -> dict:
conn.close()
real = [r for r in rows
if (r[0] or "").strip().lower() not in OPERATOR_EMAILS
and not (has_acct and len(r) > 3 and (r[3] or "") == "gift")]
and not (has_acct and len(r) > 3 and (r[3] or "") == "guest")]
return {
"active": sum(1 for r in real if r[1]),
"total": len(real),