Vonic
|
4eb6ed18d6
|
Epic 5 Complete: Billing, Subscriptions, and Admin Features
Resolve all 5 deferred items from Epic 5 adversarial code review:
- Migration 124: Add CASCADE to subscriptionstatus enum drop (prevent orphaned references)
- Stripe rate limiting: In-memory per-user limiter (20 calls/60s) on verify-checkout-session
- Subscription request cooldown: 24h cooldown before resubmitting rejected requests
- Token reset date: Initialize on first subscription activation
- Checkout URL validation: Confirmed HTTPS-only (Stripe always returns HTTPS)
Implement Story 5.4 (Usage Tracking & Rate Limit Enforcement):
- Page quota pre-check at HTTP upload layer
- Extend UserRead schema with token quota fields
- Frontend 402 error handling in document upload
- Quota indicator in dashboard sidebar
Story 5.5 (Admin Seed & Approval Flow):
- Seed admin user migration with default credentials warning
- Subscription approval/rejection routes with admin guard
- 24h rejection cooldown enforcement
Story 5.6 (Admin-Only Model Config):
- Global model config visible across all search spaces
- Per-search-space model configs with user access control
- Superuser CRUD for global configs
Additional fixes from code review:
- PageLimitService: PAST_DUE subscriptions enforce free-tier limits
- TokenQuotaService: PAST_DUE subscriptions enforce free-tier limits
- Config routes: Fixed user_id.is_(None) filter on mutation endpoints
- Stripe webhook: Added guard against silent plan downgrade on unrecognized price_id
All changes formatted with Ruff (Python) and Biome (TypeScript).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-04-15 03:54:45 +07:00 |
|
Anish Sarkar
|
8455451ce1
|
chore: ran linting
|
2026-04-08 05:20:03 +05:30 |
|
CREDO23
|
6d85821ae9
|
Wire vision_llm_config_id in preferences, register vision LLM router
|
2026-04-07 19:20:28 +02:00 |
|
CREDO23
|
d7315e7f27
|
Merge upstream/dev into feat/vision-autocomplete
|
2026-04-04 09:15:13 +02:00 |
|
CREDO23
|
482238e5d4
|
add vision LLM role for screenshot analysis
|
2026-04-03 17:40:27 +02:00 |
|
Anish Sarkar
|
000c2d9b5b
|
style: simplify LLM model terminology in UI
|
2026-04-02 10:11:35 +05:30 |
|
Anish Sarkar
|
4b60068e8b
|
feat: add user_id to new_llm_configs and image_generation_configs for user association
|
2026-02-09 18:30:52 +05:30 |
|
DESKTOP-RTLN3BA\$punk
|
19e2857343
|
feat: added image gen support
|
2026-02-05 16:43:48 -08:00 |
|
DESKTOP-RTLN3BA\$punk
|
6fb656fd8f
|
hotpatch(cloud): add llm load balancing
|
2026-01-29 15:28:31 -08:00 |
|
DESKTOP-RTLN3BA\$punk
|
4a0c3e368a
|
feat: migrated to surfsense deep agent
|
2025-12-23 01:16:25 -08:00 |
|