A new member could end up with a Loomio account and a Matrix account and see NOTHING: no forum group, no Space. Three defects: * sync_matrix_space() gated each member on the SPACE's membership, so an account already joined/invited to the Space was skipped for EVERY room. A member whose invite pass was interrupted (or who predates a room added to MATRIX_INVITE_ROOMS later) never received that room — and a restricted child room is invisible until you are invited to it. The gate is now per room, from a single up-front membership snapshot; a room whose membership cannot be read is left alone rather than invited into blindly. * a 429 slept for retry_after_ms (minutes) INSIDE the pass, so a scheduled run could outlive its own tick. A rate limit now ENDS the pass; the next run resumes (every invite is idempotent). * a member sitting in the Loomio group with no loomio_invited_at stamp reads as 'never invited' — the dedupe guard was only as good as the rows it had. The sync now heals the record from the live roster. And the activation window itself: provisioning skips an unactivated account by design, and activation happens later with nobody watching, so the 3x/day sweep was the pickup. New /admin/service-sync + a 5-minute scheduler task fires the same idempotent syncs while any member still awaits an invite (one SELECT when none do), and deliberately is NOT /admin/sweep — it never touches Open Collective, allowance logic or member mail. tests/test_service_invites.py proves the per-room gate, resumable rate limits, the unreadable-room skip, the record heal and the endpoint's idle/run paths.
40 lines
1.1 KiB
JSON
40 lines
1.1 KiB
JSON
{
|
|
"id": "coop.inference.member-portal",
|
|
"title": "Member Portal",
|
|
"author": "Inference Cooperative",
|
|
"description": "Membership middleware: syncs Open Collective members with Cloudron users and LiteLLM keys, and injects per-member keys into inference requests.",
|
|
"version": "0.1.0",
|
|
"healthCheckPath": "/health",
|
|
"httpPort": 8000,
|
|
"addons": {
|
|
"localstorage": {},
|
|
"oidc": {
|
|
"loginRedirectUri": "/",
|
|
"logoutRedirectUri": "/"
|
|
},
|
|
"sendmail": {},
|
|
"scheduler": {
|
|
"membership_sweep": {
|
|
"schedule": "0 3,11,19 * * *",
|
|
"command": "/app/code/sweep.sh"
|
|
},
|
|
"service_sync": {
|
|
"schedule": "*/5 * * * *",
|
|
"command": "/app/code/service_sync.sh"
|
|
},
|
|
"rag_refresh": {
|
|
"schedule": "30 3 * * *",
|
|
"command": "/app/code/rag_refresh.py"
|
|
},
|
|
"metrics_snapshot": {
|
|
"schedule": "15 3 * * *",
|
|
"command": "/app/code/metrics_snapshot.py"
|
|
}
|
|
}
|
|
},
|
|
"manifestVersion": 2,
|
|
"website": "https://inference.coop",
|
|
"contactEmail": "info@inference.coop",
|
|
"dockerImage": "registry.inference.coop/code/member-portal:20261113-3c64b15"
|
|
}
|