Commit Graph
412 Commits
Author SHA1 Message Date
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
inference-admin e4d9d7bf49 portal: stale-invite sweep skips addresses emailed in the last hour
ci/woodpecker/push/woodpecker Pipeline was canceled
An explicit resend followed by the sweep sent the same guest two identical invites.
2026-11-17 16:13:49 +00:00
inference-admin cddab4d759 manifest: pin to 20261117-0ae9634
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-17 16:13:02 +00:00
inference-admin 0ae9634f70 portal: setup links expire after seven days — say so, and offer a resend
ci/woodpecker/push/woodpecker Pipeline was canceled
Cloudron's account-setup links lapse after a week, so an unaccepted invitation goes
stale through no fault of the member. Both setup emails now state the lifetime and
where to ask for a new link. New admin routes: resend one invite (fresh link, never
to an activated account) and resend every unaccepted guest invite older than N days.
2026-11-17 16:12:40 +00:00
inference-admin e6db73c6bb manifest: pin to 20261117-58b9a52
ci/woodpecker/push/woodpecker Pipeline was canceled
2026-11-17 16:12:00 +00:00
inference-admin 58b9a52e01 manifest: pin to 20261117-9023496
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-17 09:17:59 +00:00
inference-admin 9023496e94 portal: dues sum stacked subscriptions and record for manual members
ci/woodpecker/push/woodpecker Pipeline was canceled
_current_dues took only the newest live order, so evan-prodromou's $5 + $10 monthly
subscriptions displayed as $5. Sum per unit (monthly separate from yearly), never
mixing them. Also snapshot dues BEFORE the manual skip: manual members take no
membership decision, but the panel's Dues column is a read-model of OC truth and
was unreachable for them.
2026-11-17 09:17:37 +00:00
inference-admin 549a86a48c manifest: pin to 20261117-f7f6946
ci/woodpecker/push/woodpecker Pipeline failed
2026-11-17 09:09:26 +00:00
inference-admin f7f6946207 portal: dues = the co-op's share, not the donor's OC total
ci/woodpecker/push/woodpecker Pipeline was canceled
totalAmount includes the buyer's optional Open Collective tip, so a member who tips
showed a higher dues level than they pay us. Use amount.value — the base
contribution that reaches the co-op — and fetch it alongside totalAmount. The
webhook credit-pack path made this same mistake and already resolves it via the
public order API.
2026-11-17 09:08:58 +00:00
inference-bot a814a5f7f9 manifest: pin to 20261117-a135560
ci/woodpecker/push/woodpecker Pipeline was successful
2026-11-17 09:02:55 +00:00
inference-bot a135560899 portal: persist each member's current OC dues level
reconcile_allowances already matches every member's Open Collective orders;
it now records what those orders say the member currently pays:
dues_amount / dues_frequency / dues_updated_at (added via the lazy ALTER
pattern). Only a LIVE recurring order (MONTHLY/YEARLY, ACTIVE/PROCESSING)
counts — one-time orders are credit purchases, cancelled/errored ones are not
a current level, and anything unreadable is NULL rather than a guessed tier.

/admin/overview carries the three fields so the admin panel can show a real
Dues column instead of a credit figure. The write happens in report mode too:
it records OC's own truth and makes no membership decision.

tests/test_dues_level.py pins the extraction rules.
2026-11-17 09:02:22 +00:00
inference-admin 1216d9a873 manifest: pin to 20261117-9b90f89
ci/woodpecker/push/woodpecker Pipeline was successful
2026-11-17 08:14:29 +00:00
inference-admin 9b90f89135 portal: stray-credit email states the real floor — from $5/month, no suggested level
ci/woodpecker/push/woodpecker Pipeline was canceled
2026-11-17 08:14:05 +00:00
inference-admin 78bd79a933 manifest: pin to 20261117-d941961
ci/woodpecker/push/woodpecker Pipeline was successful
2026-11-17 08:07:29 +00:00
inference-admin d941961549 portal: stop telling stray-credit buyers the floor is $10
ci/woodpecker/push/woodpecker Pipeline was canceled
mmoya traced the false '$10 floor' to the stray-credit email: it said '($10-20/month,
sliding scale)' when Open Collective's flexible tier starts at $5 (suggested $10).
Copy now says 'from $5/month, suggested $10 — sliding scale'.
2026-11-17 08:07:01 +00:00
inference-admin 422bb1862a manifest: pin to 20261117-ea0f728
ci/woodpecker/push/woodpecker Pipeline was successful
2026-11-17 05:11:44 +00:00
inference-admin ea0f728af2 portal: member_aliases — credit a purchase made from a member's second OC profile
ci/woodpecker/push/woodpecker Pipeline was canceled
A person can hold two Open Collective profiles, one hiding its email. Purchases from
the hidden one have no email to match and no primary slug, so they land in held
credits. member_aliases maps extra slugs to a member email; the sweep's held-credit
pass resolves email -> slug -> alias before holding anything. Admin GET/POST
/admin/aliases manages rows; test covers grant and idempotency.
2026-11-17 05:11:16 +00:00
inference-admin d51fa55a1d manifest: pin to 20261117-ffe62d3
ci/woodpecker/push/woodpecker Pipeline was successful
2026-11-17 05:05:25 +00:00
inference-admin ffe62d3c78 portal: derive source from OC email visibility instead of trusting a stale flag
ci/woodpecker/push/woodpecker Pipeline was canceled
oc-incognito disables email matching by design, so a profile that later shows an
email leaves the member silently unmatched. The sweep now flips those to oc and
records oc_email; profiles still hiding an email are untouched. Test covers both.
2026-11-17 05:04:50 +00:00
inference-admin 35735d67a5 manifest: pin to 20261117-af4135a
ci/woodpecker/push/woodpecker Pipeline was canceled
2026-11-17 05:04:19 +00:00
inference-admin af4135ac36 manifest: pin to 20261117-85e8e62
ci/woodpecker/push/woodpecker Pipeline was successful
2026-11-17 04:57:18 +00:00
inference-admin 85e8e62e5b portal: membership-status reports the computed allowance, not members.balance (often NULL)
ci/woodpecker/push/woodpecker Pipeline was canceled
2026-11-17 04:56:58 +00:00
inference-admin 265fae993f manifest: pin to 20261117-27b0ea5
ci/woodpecker/push/woodpecker Pipeline was successful
2026-11-17 04:56:13 +00:00
inference-admin 27b0ea564a portal: answer for a lapsed membership instead of leaving the dashboard blank
ci/woodpecker/push/woodpecker Pipeline was canceled
New read-only /broker/membership-status, authenticated by the broker secret with a
verifier that admits a member row in ANY state (usage and keys still require active).
Returns active/state, the latest allowance_log decision with its evidence, the OC
minimum contribution (MIN_CONTRIBUTION, copy-only — OC stays the authority), credits,
allowance and the contribute URL.

MIN_CONTRIBUTION is deliberately NOT wired into deactivation: a number we half-know
should not cost anyone access.
2026-11-17 04:55:34 +00:00
inference-admin 6041c0cdb2 manifest: pin to 20261117-e9d0fd2
ci/woodpecker/push/woodpecker Pipeline was successful
2026-11-17 04:52:08 +00:00
inference-admin e9d0fd259a portal: settle held credits in the sweep, and report the ones nobody can be credited for
ci/woodpecker/push/woodpecker Pipeline was canceled
A credit pack bought while the buyer's membership was inactive is held — correctly,
we must never mint credits for a non-member. The gap was what happened next: the hold
sat until a human noticed (mmoya's $10 waited from 01:45 until they wrote in).

Every sweep now grants any hold that resolves to an ACTIVE member (by email first, then
slug), reusing grant_held_credits() so held:<id> keeps it idempotent; holds with no
active member older than HELD_ALERT_HOURS are emailed to info@. Tests cover grant/hold/
no-double-apply.
2026-11-17 04:51:40 +00:00
inference-admin 34547075cf manifest: pin to 20261113-bed7f03
ci/woodpecker/push/woodpecker Pipeline was successful
2026-11-13 22:46:23 +00:00
inference-admin bed7f03063 rate limits: one bucket per ROUTE, not one per proxy address
ci/woodpecker/push/woodpecker Pipeline was canceled
Every request arrives through Cloudrons
2026-11-13 22:45:48 +00:00
inference-admin 6f6261eb1f manifest: pin to 20261113-0a6939f
ci/woodpecker/push/woodpecker Pipeline was successful
2026-11-13 22:33:35 +00:00
inference-admin 0a6939fe07 retire the Open WebUI integration
ci/woodpecker/push/woodpecker Pipeline was canceled
The app is stopped (`com.openwebui.cloudronapp`, installed|stopped), so every call
to it failed with "Temporary failure in name resolution" — a stopped container has
no DNS entry. Four of the last four provisions logged exactly that; no new member
ever reached the group.

Its "members group" was never a Cloudron group: the id pointed at a group inside
Open WebUI's own database, which is why it appears nowhere in Cloudron's UI.

Removed: owui_add_to_members_group, both call sites (provision_member and guest
convert), the OWUI_* constants, and the signed-JWT identity path in inject_key.
That last one is the part that matters beyond tidiness: it accepted a
shared-secret-signed token as proof of identity for an integration nobody runs.
inject_key keeps its one live path (LibreChat: X-User-Email + X-Portal-Secret,
still verified).

First attempt at this cut too much — a greedy splice off the guest-convert call
took listmonk_sync and the held-credit grant with it, and test_guest_lifecycle.py
caught it before anything shipped. Redone with exact anchors.
2026-11-13 22:33:10 +00:00
inference-admin 5c494cb261 manifest: pin to 20261113-b1022eb
ci/woodpecker/push/woodpecker Pipeline was successful
2026-11-13 22:28:15 +00:00
inference-admin b1022eb02a 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.
2026-11-13 22:27:55 +00:00
inference-admin 66a770ae10 manifest: pin to 20261113-64d1ea5
ci/woodpecker/push/woodpecker Pipeline was successful
2026-11-13 22:25:07 +00:00
inference-admin 64d1ea5093 members: an explicit SOURCE, so 'oc-incognito' stops being 'manual'
ci/woodpecker/push/woodpecker Pipeline was canceled
mmoya@mmoya.org sat in MANUAL_MEMBERS because OC hides the address on their
profile (incognito-5ad60182, email null since 2023), so email matching can never
find them. But "manual" means hand-provisioned, and the sweep SKIPS manual
members entirely: a paying subscriber had no lapse logic, no dues tracking and no
order attribution. Two different facts were sharing one word.

members.source now carries which one it is:
  oc            — OC-backed, matched by email (the default; NULL means this)
  oc-incognito  — OC-backed, profile hides the email, matched by the stored OC
                  SLUG — which the reconciliation already uses, since
                  fetch_member_orders() groups orders by the payer's slug and
                  members.slug holds exactly that for these people
  manual        — hand-provisioned; no contribution expected, nothing reconciles,
                  nobody lapses

So an oc-incognito member needs no exemption from reconciliation — they need to
stop being skipped, and the existing slug path does the rest.

Every decision that keyed on the raw MANUAL_MEMBERS list now keys on the source:
the reconciliation skip, the sweep's deactivation guard, and the shortfall-credit
exemption. An explicit source beats the list, so a member can be moved without
editing the env — and the env list can shrink toward deprecation. An
unrecognised or unreadable source falls back to 'oc', the direction that keeps
reconciling someone rather than quietly exempting them.

anchor_day_for_member also resolves by slug now: an incognito member is absent
from the member index (it drops anyone without an email), and falling back to
"today" would silently move their renewal day.

tests/test_oc_incognito.py pins all of it, including that the column is optional
(NULL = not stated) so this ships without a data migration.
2026-11-13 22:24:46 +00:00
inference-admin a98db6e36e manifest: pin to 20261113-2cde368
ci/woodpecker/push/woodpecker Pipeline was successful
2026-11-13 22:14:59 +00:00
inference-admin 2cde368c1e resolve payer: authenticate the lookup — without the token OC hides the email
ci/woodpecker/push/woodpecker Pipeline was canceled
Second live-only bug in the same helper. Sent unauthenticated, OC answers the
public view of an account: name comes back, email does not. A hand query with the
Personal-Token header returned conor.canaday@gmail.com for the very slug the
helper reported as email=None — so the fix would have resolved nobody, silently,
while looking like it worked.

The test now pins the header (the stub records what it was called with), because
the failure mode here is an absence, and an absence is exactly what a stub
forgets to check.
2026-11-13 22:14:36 +00:00
inference-admin 0458e8e5a5 manifest: pin to 20261113-9c10e62
ci/woodpecker/push/woodpecker Pipeline was successful
2026-11-13 22:13:50 +00:00
inference-admin 9c10e627fc resolve payer: read the response's JSON (the stub hid this)
ci/woodpecker/push/woodpecker Pipeline was canceled
_oc_graphql_post returns the RESPONSE — it is a retrying wrapper around
client.post — so fetch_account_by_slug has to call .json() on it. My unit test
stubbed it as a dict, so the test passed and the first live call in the container
died with "Response object has no attribute get".

The test now stubs the real shape (a response wrapper with .json()). Folding it
in here rather than hiding it: a stub that does not match the real return shape
certifies nothing.
2026-11-13 22:13:22 +00:00
inference-admin cbf5a6870b manifest: pin to 20261113-5a73806
ci/woodpecker/push/woodpecker Pipeline was successful
2026-11-13 22:12:24 +00:00