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:
1 parent
f0d67e7efa
commit
22c0167978
2 files changed
+18
-13
No files matched your search
+14
-10
@@ -4402,8 +4402,9 @@ async def reconcile_memberships() -> dict:
|
|||||||
# Policy (operator decision 2026-11-04). Open Collective aligns every member's
|
# Policy (operator decision 2026-11-04). Open Collective aligns every member's
|
||||||
# charge onto the collective's common billing day, so anchoring an allowance
|
# 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
|
# reset to the PAYMENT date lets a charge move the boundary and skip a cycle
|
||||||
# entirely: [redacted member reference] [redacted timeline],
|
# entirely: a member who joins mid-month can be charged on the common billing
|
||||||
# and our reset rule re-anchored them to a new day with no reset in between. So the
|
# 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
|
# 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
|
# decided by asking Open Collective directly whether a recurring contribution is
|
||||||
# live — on our own schedule, not inferred from webhook delivery. A webhook that
|
# 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)"
|
return f"allowance shortfall, truncated paid cycle {prev}→{cur} (OC billing alignment)"
|
||||||
|
|
||||||
|
|
||||||
# Members already made whole OUTSIDE this mechanism, keyed by (email, OC charge
|
# Charges already made whole OUTSIDE this mechanism, keyed by the OC charge
|
||||||
# reference). [redacted member reference] received a manual allowance reset
|
# reference alone (the same idempotence key the shortfall path uses). The one
|
||||||
# on 2026-11-04 for the cycle OC truncated ([redacted timeline]); that
|
# listed charge received a manual allowance reset on 2026-11-04 for the cycle
|
||||||
# specific charge is excluded so a re-run never credits it again. Later charges
|
# OC truncated; it is excluded so a re-run never credits it again. Later
|
||||||
# form new cycles and are credited normally.
|
# charges form new cycles and are credited normally. The member's identity and
|
||||||
SHORTFALL_REMEDIATED: set[tuple[str, str]] = {
|
# the full timeline behind this entry are recorded in the operations docs and
|
||||||
("[redacted member reference]", "[redacted member reference]"),
|
# 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":
|
if rec and rec.get("role") == "ADMIN":
|
||||||
skipped.append({**c, "email": email, "why": "operator account"})
|
skipped.append({**c, "email": email, "why": "operator account"})
|
||||||
continue
|
continue
|
||||||
if (email, c["reference"]) in SHORTFALL_REMEDIATED:
|
if c["reference"] in SHORTFALL_REMEDIATED:
|
||||||
skipped.append({**c, "email": email,
|
skipped.append({**c, "email": email,
|
||||||
"why": "already remediated by a manual allowance reset (2026-11-04)"})
|
"why": "already remediated by a manual allowance reset (2026-11-04)"})
|
||||||
continue
|
continue
|
||||||
|
|||||||
@@ -108,9 +108,10 @@ check("reason names the cycle",
|
|||||||
shortfall_reason("2026-10-07", "2026-11-02"),
|
shortfall_reason("2026-10-07", "2026-11-02"),
|
||||||
"allowance shortfall, truncated paid cycle 2026-10-07→2026-11-02 (OC billing alignment)")
|
"allowance shortfall, truncated paid cycle 2026-10-07→2026-11-02 (OC billing alignment)")
|
||||||
|
|
||||||
# --- the manual-remediation exclusion is keyed on (email, charge ref)
|
# --- the manual-remediation exclusion is keyed on the charge ref alone
|
||||||
check("remediated member/charge excluded",
|
# --- (no member PII in this public repo; identity/timeline live in ops docs)
|
||||||
("[redacted member reference]", "[redacted member reference]") in SHORTFALL_REMEDIATED, True)
|
check("remediated charge excluded by reference",
|
||||||
|
"[redacted member reference]" in SHORTFALL_REMEDIATED, True)
|
||||||
|
|
||||||
print(f"\n{'FAILED' if failures else 'OK'} — {failures} failure(s)")
|
print(f"\n{'FAILED' if failures else 'OK'} — {failures} failure(s)")
|
||||||
sys.exit(1 if failures else 0)
|
sys.exit(1 if failures else 0)
|
||||||
Reference in new issue
Block a user