oc-incognito: take the slug from the member's own row
ci/woodpecker/push/woodpecker Pipeline was canceled

Setting the source was not enough, and verification is what caught it: mmoya still
produced no allowance decision at all.

The reconciler gets a member's OC slug from the member INDEX — which is keyed by
email, and DROPS anyone whose profile hides its email. So `oc_slug` came back
empty, the member fell into "not in the live Open Collective member list — cannot
verify payment", and was counted as skipped. An oc-incognito member would have
been "not manual" and still not reconciled: a nicer label over the same hole.

For source oc-incognito the slug now comes from the member's own row, which is
the same key fetch_member_orders() groups orders by — the whole reason matching
can work for these people. The test pins the fallback, not just the source.
This commit is contained in:
inference-admin committed 2026-11-13 22:27:55 +00:00
1 parent 66a770ae10
commit b1022eb02a
2 files changed
+17

No files matched your search

+13
View File
@@ -7708,6 +7708,19 @@ async def reconcile_allowances(send: bool = False) -> dict:
counts["skipped"] += 1 # the co-op's own account counts["skipped"] += 1 # the co-op's own account
continue continue
oc_slug = (rec or {}).get("slug") or "" 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: if not oc_slug:
decisions.append({"email": email, "slug": slug, "anchor_day": anchor_day, decisions.append({"email": email, "slug": slug, "anchor_day": anchor_day,
"cycle": "", "decision": "skipped", "cycle": "", "decision": "skipped",
+4
View File
@@ -93,6 +93,10 @@ recon = src[src.index("async def reconcile_allowances"):]
recon = recon[:recon.index("def ", recon.index("for row in rows"))] recon = recon[:recon.index("def ", recon.index("for row in rows"))]
check('member_source(email, conn) == "manual"' in recon, check('member_source(email, conn) == "manual"' in recon,
"the reconciliation skips only source == manual") "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, check("in MANUAL_MEMBERS" not in recon,
"and no longer keys on the raw list (an oc-incognito member must not be skipped)") "and no longer keys on the raw list (an oc-incognito member must not be skipped)")
check("not is_manual_member(email)" in src, check("not is_manual_member(email)" in src,