diff --git a/app/main.py b/app/main.py index bfeeb90..7fbf755 100644 --- a/app/main.py +++ b/app/main.py @@ -7708,6 +7708,19 @@ async def reconcile_allowances(send: bool = False) -> dict: counts["skipped"] += 1 # the co-op's own account continue oc_slug = (rec or {}).get("slug") or "" + if not oc_slug and member_source(email, conn) == "oc-incognito": + # OC's member index DROPS anyone whose profile hides its email, so it + # can never supply the slug for these members — and without one the + # reconciler cannot see their orders at all and skips them as + # "not in the live Open Collective member list". Their own row holds + # the slug, and it is the same key fetch_member_orders() groups by, + # which is why matching works once we use it. (mmoya@mmoya.org, + # 2026-11-13: source oc-incognito, slug incognito-5ad60182, a live + # monthly contribution the member index could not see.) + oc_slug = slug + if oc_slug: + logger.info("Allowance reconcile: %s is oc-incognito; using their stored slug %s", + email, oc_slug) if not oc_slug: decisions.append({"email": email, "slug": slug, "anchor_day": anchor_day, "cycle": "", "decision": "skipped", diff --git a/tests/test_oc_incognito.py b/tests/test_oc_incognito.py index 66f1c0f..f4169bb 100644 --- a/tests/test_oc_incognito.py +++ b/tests/test_oc_incognito.py @@ -93,6 +93,10 @@ recon = src[src.index("async def reconcile_allowances"):] recon = recon[:recon.index("def ", recon.index("for row in rows"))] check('member_source(email, conn) == "manual"' in recon, "the reconciliation skips only source == manual") +check('member_source(email, conn) == "oc-incognito"' in recon and "oc_slug = slug" in recon, + "an oc-incognito member takes the OC slug from their own row — the index cannot give it " + "(it drops anyone without an email), and without a slug the reconciler skips them as " + "'cannot verify payment'") check("in MANUAL_MEMBERS" not in recon, "and no longer keys on the raw list (an oc-incognito member must not be skipped)") check("not is_manual_member(email)" in src,