Files
member-portal/tests
inference-bot 0296f8d066
ci/woodpecker/push/woodpecker Pipeline was canceled
credits: infer anchor days for org-backed members
The allowance reconcile skips rows with org_slug (dues are paid by an OC
Organization, not an individual order), so org members never got an anchor_day
and close_credit_cycles skipped them forever — their packs regenerated monthly,
the same defect as #12.

- fetch_org_join_days(): paginated OC members walk, ORGANIZATION accounts only,
  slug -> membership createdAt.
- reconcile_org_anchors(): for every active org-backed row with anchor_day NULL,
  set anchor = org join day clamped to 1..28 and pin the team reset to its next
  occurrence. Only NULL rows are touched (idempotent); an org with no OC record is
  reported, never guessed, and keeps being reported until resolved.
- Runs in /admin/sweep and immediately in the org-member webhook path.

tests/test_org_anchors.py: anchor math incl. clamp, reset pin, idempotence,
unresolved reporting.
2026-11-27 21:23:24 +00:00
..