privacy: de-PII the shortfall exclusion and policy comment (audit H2)

SHORTFALL_REMEDIATED is keyed on the OC charge reference alone (the same
idempotence key the shortfall path uses); the member's identity and the
timeline of the 2026-11-04 manual allowance reset move to the operations
docs and stay in the ledger. The policy comment that named a member's
join/charge dates is generalized. No behavioral change: the exclusion
matches the same charge it always matched.
This commit is contained in:
inference-bot committed 2026-11-05 15:59:07 +00:00
1 parent f0d67e7efa
commit 22c0167978
2 files changed
+18 -13

No files matched your search

+14 -10
View File
@@ -4402,8 +4402,9 @@ async def reconcile_memberships() -> dict:
# Policy (operator decision 2026-11-04). Open Collective aligns every member's
# charge onto the collective's common billing day, so anchoring an allowance
# reset to the PAYMENT date lets a charge move the boundary and skip a cycle
# entirely: [redacted member reference] [redacted timeline],
# and our reset rule re-anchored them to a new day with no reset in between. So the
# entirely: a member who joins mid-month can be charged on the common billing
# day within weeks, and the old reset rule re-anchored them to that new day
# with no reset in between. So the
# reset is anchored to the day of the month the member JOINED, and renewal is
# decided by asking Open Collective directly whether a recurring contribution is
# live — on our own schedule, not inferred from webhook delivery. A webhook that
@@ -5013,13 +5014,16 @@ def shortfall_reason(prev: str, cur: str) -> str:
return f"allowance shortfall, truncated paid cycle {prev}→{cur} (OC billing alignment)"
# Members already made whole OUTSIDE this mechanism, keyed by (email, OC charge
# reference). [redacted member reference] received a manual allowance reset
# on 2026-11-04 for the cycle OC truncated ([redacted timeline]); that
# specific charge is excluded so a re-run never credits it again. Later charges
# form new cycles and are credited normally.
SHORTFALL_REMEDIATED: set[tuple[str, str]] = {
("[redacted member reference]", "[redacted member reference]"),
# Charges already made whole OUTSIDE this mechanism, keyed by the OC charge
# reference alone (the same idempotence key the shortfall path uses). The one
# listed charge received a manual allowance reset on 2026-11-04 for the cycle
# OC truncated; it is excluded so a re-run never credits it again. Later
# charges form new cycles and are credited normally. The member's identity and
# the full timeline behind this entry are recorded in the operations docs and
# the ledger — deliberately NOT in this public repository (audit H2,
# 2026-11-05: the exclusion used to embed a member's email and billing dates).
SHORTFALL_REMEDIATED: set[str] = {
"[redacted member reference]",
}
@@ -5286,7 +5290,7 @@ async def reconcile_allowance_shortfalls(send: bool = False) -> dict:
if rec and rec.get("role") == "ADMIN":
skipped.append({**c, "email": email, "why": "operator account"})
continue
if (email, c["reference"]) in SHORTFALL_REMEDIATED:
if c["reference"] in SHORTFALL_REMEDIATED:
skipped.append({**c, "email": email,
"why": "already remediated by a manual allowance reset (2026-11-04)"})
continue