Files
AFFiNE/scripts
DarkSky dece75f25a feat(server): add billing subject, rate limit SPI, and userspace mutex
Add `BillingSubject` to `AccessGrant` in `server-types` and re-export it from `server-spi`.
Remove the direct `entitlements` SQL query from `UserType::quota` in `server-http`.
Resolve personal storage quota from `AccessGrant.billing_subject` alone.

Add `RequestSource`, async `RateLimitPolicy`, and `CommunityRateLimitPolicy` to `server-spi` and `ServerExtension`.
Remove duplicate `AuthMailQuotaPolicy` from `server-domain`, add pure-Rust `contains_url_or_domain`, and add batch `invite_members_with_source`.
Wire `RateLimitPolicy` with on-demand `RequestSource` into `AuthService`, `WorkspaceService`, `server-http`, and `affine-server`.
Add `InvalidationHintV1::QuotaEntitlement` and `serve_with_extension_and_init` for startup hooks before serving requests.

Upgrade `RedisMutex` in `server-worker` with cached connections, lock-free connect, cancel-safe Lua lock retry, pre-commit fencing, and cancel-safe release.
Wire `server-sync` userspace writes (`MutexLock:userspace:<user_id>:<doc_id>`) to `RedisMutex` on `SessionRedis` with millisecond timestamps, upfront DB permits, lease renewal, and pre-commit fence rollback.
Handle empty-table insert conflicts via `ON CONFLICT DO NOTHING` with a `FOR UPDATE` merge fallback.

Update `packages/backend/AGENTS.md` and ignore pre-signed native license JSON in `.prettierignore` and `.oxlintrc.json`.
Extend `scripts/ci/check-l0-tier-a.mjs` to block non-test `entitlements` SQL queries in `server-http` and check documented Rust types.
Replace 22 active `waitForTimeout` calls in 12 local E2E specs with state assertions and lower `scripts/ci/l0-ratchet.json` from 358 to 336.
2026-11-23 20:24:28 +09:00
..
2025-12-23 23:26:19 +08:00
2026-10-26 16:49:45 +08:00