Commit Graph
400 Commits
Author SHA1 Message Date
inference-bot 97f0d6c3f1 credits: uncapped operator accounts; no cap for info@
ci/woodpecker/push/woodpecker Pipeline was canceled
Operator/infrastructure accounts are a collective expense, not members: applying
the $15 + credits cap to them cuts the co-op's own tooling off mid-task.

- UNCAPPED_EMAILS (defaults to OPERATOR_EMAILS) is cleared in
  sync_team_budget_from_balance via litellm_clear_team_budget: max_budget = NULL
  on the team row (unlimited), written directly because /team/update drops
  budget_reset_at.
- sync_team_budget_from_balance returns None for an uncapped account; admin
  responses report team_budget: null rather than a computed figure.
2026-11-27 21:19:52 +00:00
inference-bot 237b695087 manifest: pin to 20261127-fe89890
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-27 20:42:13 +00:00
inference-bot fe898905b4 credits: close each cycle so a pack cannot be spent twice (#12)
ci/woodpecker/push/woodpecker Pipeline failed
LiteLLM zeroes a team's `spend` at budget_reset_at but leaves max_budget
alone, and nothing in the portal ever reduced credit_balance. So every
monthly reset restored every credit pack already spent: a $15 member who
bought $50 and used all $65 got $65 again the next month.

Fix — record the draw when a cycle closes:
- new `members.credits_drawn` (credits consumed in CLOSED cycles);
  credit_balance stays the lifetime purchased total so the "bought all-time"
  display never changes meaning.
- `compute_max_budget` caps at allowance + credits STILL AVAILABLE
  (purchased − drawn). Spend inside the current cycle still does not shrink
  the cap, so a credit add keeps raising it 1:1.
- `apply_cycle_draw` writes a NEGATIVE credit_ledger row per closed cycle,
  deduped on reference `cycle-close:<email>:<cycle>`; the cycle's spend is
  summed from LiteLLM_SpendLogs over the exact anchor-day window.
- `close_credit_cycles` runs every 10 min via the new Cloudron scheduler task
  (credit_cycle_close.sh) and again as a catch-up inside /admin/sweep.
- CREDIT_CLOSE_FROM (default 2026-11-28) stops it charging cycles that
  started before the fix: credits already regranted are forgiven rather than
  clawed back mid-cycle.
- /admin/credits/{email} now reports credits_drawn.

Tests: tests/test_credit_cycle_close.py covers the cap arithmetic, the
issue's worked example, draw idempotence and the available-credit cap.
2026-11-27 20:29:12 +00:00
inference-bot bcdc0416e2 manifest: pin to 20261127-0e53c33
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-27 18:04:29 +00:00
inference-bot 0e53c330e1 tests: FX verdict at the 1.0975 fallback pin
ci/woodpecker/push/woodpecker Pipeline was canceled
2026-11-27 18:04:00 +00:00
inference-bot 9ab8156da2 fx: baseline the spot check at the written fallback pin, not a stale 1.16
ci/woodpecker/push/woodpecker Pipeline failed
The sweep compared the ECB rate to a hardcoded 1.16 and emailed info@ with
"-5.39%" plus advice to "re-convert" — obsolete since fx_sync.py converts at
boot. The steady breach also froze the alert marker, so a later, real move
could never mail.

- Default baseline 1.0975 (the gateway's FX_FALLBACK_USD pin, ECB 2026-11-26);
  runtime value set via FX_POLICY_EUR_USD.
- Email now says live billing is unaffected by conversion and points at the
  stale artifacts (config fallback, ops pricing tables, fx_state.json).
2026-11-27 17:58:01 +00:00
inference-bot a3bfc56b77 manifest: pin to 20261124-c174cba
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-24 19:50:16 +00:00
inference-bot c174cba5ce Merge pull request 'membership events: durable lapse/reactivation log' (#11) from feat/membership-events into main
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-24 19:49:10 +00:00
inference-bot b3de608170 membership events: durable lapse/reactivation log
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-24 19:41:00 +00:00
inference-admin f1ba9d7313 manifest: pin to 20261123-419b1f4
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-23 14:27:14 +00:00
inference-admin 419b1f4322 matrix sync: skip a member's remaining rooms after a transport error
ci/woodpecker/push/woodpecker Pipeline was canceled
An unreachable remote homeserver hangs every invite POST to that member until
the client timeout (8 rooms x 30s), which outlived the 5-minute service-sync
tick and starved every member queued behind it. Raise a member-scoped
_TransportError instead of returning False, skip that member's remaining rooms
for this pass, and report transport_skipped in the result. Invites stay
idempotent, so the next pass retries.

Test: a timed-out member is attempted once, not once per room.
2026-11-23 14:26:03 +00:00
inference-bot d190aa7762 manifest: pin to 20261123-db0c09e
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-23 03:36:33 +00:00
inference-bot db0c09e85d orders: docstring matches the paginated read (no fixed window) 2026-11-23 03:36:33 +00:00
inference-bot 3ccaf0ec85 manifest: pin to 20261123-c60dc2c
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-23 03:34:55 +00:00
inference-bot c60dc2c482 orders: read every page, never a fixed 200-order window
The collective crossed 200 orders on 2026-11-23 (203). fetch_member_orders()
asked for orders(limit: 200) in one request, so the orders beyond the window —
the OLDEST ones, where long-standing members' recurring contributions live —
were absent from the sweep's read. Three paying members (ntnsndr,
elizabeth-barry1, guest-0f6d98ac) therefore read as "no recurring (monthly)
contribution on Open Collective" and were sent a payment reminder at 03:02 UTC
for contributions that were live and charged on 2 Nov.

fetch_oc_monthly_order_charges() had the same fixed window, hiding the oldest
orders' charge ladders from the shortfall credit pass.

Both now page by offset until OC's totalCount is covered, and a read that falls
short of totalCount RAISES instead of returning a short list: a short list is
the exact shape that reads as "nobody is paying".
2026-11-23 03:34:49 +00:00
inference-admin f09bec67d8 Merge pull request 'Loomio sync: a stamp must not outlive the membership' (#9) from loomio-reconcile into main
ci/woodpecker/push/woodpecker Pipeline failed
Reviewed-on: #9
2026-11-22 19:47:22 +00:00
inference-bot ffed06d492 loomio sync: a stamp must not outlive the membership
ci/woodpecker/push/woodpecker Pipeline failed
The invite stamp meant 'handed to Loomio once, EVER', so a member whose
membership was later revoked (a lapse that was reversed) or who deleted
their Loomio account was recorded as invited and never invited again.

- Stamp only the addresses Loomio actually returns in added_emails; an
  address accepted in the payload but not added stays eligible.
- Clear the stamp for an ACTIVE member stamped-but-absent from the live
  roster; the invite itself waits one pass so a single stale page cannot
  become an invite.
- Cap stamp clearing per pass (LOOMIO_RECONCILE_MAX, default 10): more
  stamped-but-absent members means a short roster read, not a mass
  re-invite.
- loomio_opt_out exempts members who deliberately left.
- Username fix falls back to the portal slug when a handle is already
  taken (Loomio handles are instance-global; every OC alias resolves to
  opencollective).
2026-11-22 19:45:20 +00:00
inference-bot 146bfaf45e manifest: pin to 20261121-b761136
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-21 19:43:12 +00:00
inference-bot b761136dd9 unmapped backers: a plain donation is not a member finding
ci/woodpecker/push/woodpecker Pipeline was canceled
A no-tier BACKER is only a member when it predates the tier system
(LEGACY_NO_TIER_BEFORE). Treating every no-tier BACKER as memberish made
the $75 Workers.VC donation mail info@ as a paid contributor with no
account. Mirror fetch_members() exactly; donations stay silent, and only
unattached credit packs keep the hold-and-notify path.
2026-11-21 19:42:36 +00:00
inference-bot ac39740acb manifest: pin to 20261121-a4b6aa5
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-21 18:20:40 +00:00
inference-bot a4b6aa5357 matrix sync: a transport error on one invite must not abort the pass
An httpx.ReadTimeout during an invite POST raised out of sync_matrix_space,
so every member after the timed-out one got nothing and the service-sync log
said only 'Matrix sync failed:' (httpx transport exceptions stringify to '').
One new member sat uninvited for a day that way.

- invite(): catch httpx.HTTPError per member/room, log the type, return False
- pass counts only members whose invite actually returned True
- room-membership snapshot, the retire half and the Cloudron users walk no
  longer abort on a transport error; the unreadable room/member is skipped
- service-sync now logs the exception TYPE (empty str(e) hid the cause)

Regression in tests/test_service_invites.py section 7: a timed-out member does
not stop the member after them, and the next pass retries them.
2026-11-21 18:20:00 +00:00
inference-admin d7c812ba07 manifest: pin to 20261120-34f2eed
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-20 20:08:53 +00:00
inference-admin 34f2eeddd7 security: reject hostile tokens cleanly and record webhook sources
secrets.compare_digest raises TypeError on str containing non-ASCII, so a
webhook path token or header token with one answered 503/500 instead of
401/403 — a scanner manufactured a false money-critical alert on 2026-11-20.
Compare UTF-8 bytes through _secret_eq and fail closed on empty.

webhook_failures now stores ip and user_agent; the sweep email names each
source and distinguishes a probe from an Open Collective delivery.
2026-11-20 20:08:12 +00:00
inference-admin 347f2cf720 manifest: pin to 20261120-3c36bdf
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-20 10:02:37 +00:00
inference-admin 3c36bdf2a9 security: cap MXID verification DMs per member per day
ci/woodpecker/push/woodpecker Pipeline was canceled
2026-11-20 10:01:47 +00:00
inference-admin 3ed4d75898 manifest: pin to 20261119-637a8ae
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-20 00:19:35 +00:00
inference-admin 637a8aed13 security: require timestamped HMAC on the key feed when configured
ci/woodpecker/push/woodpecker Pipeline was canceled
2026-11-20 00:18:43 +00:00
inference-admin f24f0c32f4 security: CODEOWNERS for CI config
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-20 00:15:12 +00:00
inference-admin 66b765d81d manifest: pin to 20261119-504200e
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-20 00:08:44 +00:00
inference-admin 504200e011 security: queue Matrix invites after MXID verification instead of blocking the request
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-20 00:06:37 +00:00
inference-admin f39a84ac14 manifest: pin to registry.inference.coop/code/member-portal:20261119-dc7c381
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-20 00:02:45 +00:00
inference-admin dc7c381bd8 security: verify control of external MXIDs before inviting (one-time Matrix DM code)
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-20 00:01:23 +00:00
inference-admin 96c0866c67 manifest: pin to registry.inference.coop/code/member-portal:20261119-3a2d608
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-19 23:45:05 +00:00
inference-admin 3a2d6088f2 security: expose MXID change date to the admin panel
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-19 23:44:10 +00:00
inference-admin c57dbdb62e tests: cover switch-group path in guest cancel
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-19 23:41:15 +00:00
inference-admin ac2ba4d2c1 manifest: pin to 20261119-a215b5f
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-19 23:35:21 +00:00
inference-admin a215b5f9c9 security: bound MXID changes, preserve Cloudron groups, refuse guest invites onto existing accounts, legacy no-tier cutoff, internal-only key feed
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-19 23:33:24 +00:00
inference-admin 4554bf3251 manifest: pin to 20261119-89e5ae6
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-19 23:26:25 +00:00
inference-admin 89e5ae6273 webhook: refuse an unresolvable order.processed instead of answering provisioned
ci/woodpecker/push/woodpecker Pipeline was canceled
2026-11-19 23:25:39 +00:00
inference-admin 90b94904e8 manifest: pin to 20261119-c9726f4
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-19 23:23:52 +00:00
inference-admin c9726f4029 security: verify OC orders, fail-closed revoke, per-IP rate buckets, escaped guest email
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-19 23:22:51 +00:00
inference-admin 5a0a3decbe manifest: pin to 20261119-59d228b
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-19 22:45:32 +00:00
inference-admin 59d228b8d3 retire Open WebUI: drop rag_refresh job and its credentials; keep LibreChat path
ci/woodpecker/push/woodpecker Pipeline was canceled
2026-11-19 22:44:49 +00:00
inference-admin 816494aee0 manifest: pin to 20261119-5f3519d
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-19 22:40:09 +00:00
inference-admin 5f3519d0af security: retire the legacy /v1/* key-injection proxy and PORTAL_SECRET
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-19 22:39:14 +00:00
inference-admin 1ea7cfc773 manifest: pin to 20261119-649392d
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-19 22:11:51 +00:00
inference-admin 649392d2e8 security: constant-time admin-token compare on four routes; legacy token off by default
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-19 22:09:38 +00:00
inference-admin 1f1d555125 manifest: pin to 20261118-4af22ca
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-18 17:44:49 +00:00
inference-admin 4af22ca4c4 portal: daily EUR/USD spot check against the pricing FX, alert only (no reprice)
ci/woodpecker/push/woodpecker Pipeline was canceled
Reads the ECB reference rate in the sweep, compares to FX_POLICY_EUR_USD (1.16),
and emails info@ only when the drift first crosses FX_ALERT_PCT (2%). Marker in
portal_state keeps a steady breach from mailing daily and resets when inside the band.
2026-11-18 17:44:00 +00:00
inference-admin 6b46dfee90 manifest: pin to 20261117-e4d9d7b
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-17 16:14:11 +00:00