Spaces:
Running
Running
Commit History
-
fix: resolve 149 ruff lint violations for CI pipelineβ
Ashraf Al-Kassem +1: Claude Opus 4.6- Auto-fix 104 unused imports (F401) across 40 files - Fix F821: add missing `wrap_error` import in diagnostics.py - Fix F841: remove unused `now` variables in auth.py - Fix E722: replace bare `except` with `except Exception` in dispatch - Fix re-exports: explicit `as` syntax for meta/whatsapp __init__.py - Update pyproject.toml ruff config: - Ignore E711/E712 (SQLAlchemy needs `== None`/`== False`) - Ignore E402/E701 (intentional patterns in workers/tests) - Add per-file ignores for alembic/ and tests/ All 197 tests pass. Ruff checks clean. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>b1aa633
-
feat: Mission 17 β Enterprise Audit Logging Frameworkβ
Ashraf Al-Kassem +1: Claude Opus 4.6- Extend AdminAuditLog with 9 new columns (actor_type, outcome, ip_address, user_agent, request_path, request_method, error_code, error_message, agency_id) - Make actor_user_id nullable for failed login attempts on unknown users - Create audit_event() service with auto IP/UA/path extraction, metadata redaction, field truncation, and non-throwing error handling - Instrument 29 handlers across 8 files: auth (5), workspaces (4), integrations (3), automations (2), dispatch (1), inbox (2), admin (6), agency (6) - Add workspace-scoped GET /audit-logs endpoint with 7 filters + detail - Enhance admin GET /admin/audit-log with workspace_id, agency_id, actor_type, outcome, date range, and correlation_id filters + detail endpoint - Build dashboard Activity Log page with action/outcome badges, filters, expandable rows, and pagination - Enhance admin audit log page with actor type badges, correlation ID copy, request/IP/error detail view - Add 20 new tests (85 total pass, 0 fail) Co-β¦6d44285 -
feat: Mission 14+15 β commercial entitlements + agency reseller modelβ
Ashraf Al-Kassem +1: Claude Opus 4.6Mission 14: Plan-based entitlements with per-module hard limits, usage metering, and admin plan management UI. Adds Plan, PlanEntitlement, WorkspacePlan, and UsageMeter models. Entitlement enforcement service with check_and_increment/batch helpers. Admin /plans CRUD page. Mission 15: Agency reseller model enabling multi-workspace management. Adds AgencyAccount, AgencyMember, WorkspaceOwnership models with RBAC (owner/admin/operator/viewer roles). Agency router with 9 endpoints for lifecycle, member management, and workspace provisioning. Lazy WorkspaceMember provisioning via extended get_active_workspace(). max_workspaces limit enforcement via plan entitlements. Admin agency management (list/detail/suspend/plan-assign). Frontend agency console and workspace switcher replacing hardcoded placeholder. All 56 unit tests pass. 55/55 E2E checks verified on localhost. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>2bb79a1 -
fix: eliminate 307 redirects that break login and API calls behind HF proxyβ
Ashraf Al-Kassem +1: Claude Opus 4.6The previous trailing-slash normalization in api.ts inadvertently broke login (POST /auth/login/ β 307 β /auth/login, losing FormData). Root cause: FastAPI routes defined as @router.get("/") only match paths WITH trailing slash, causing 307 redirects for requests WITHOUT one. Behind HuggingFace's reverse proxy, these redirects silently fail. Fix: Change route definitions from "/" to "" so they match the exact paths the frontend sends (no trailing slash). Revert the frontend trailing-slash hack. Routes fixed: prompt_config (GET, POST), integrations (GET), workspaces (GET, POST), automations (GET). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>721b3fc
-
fix: add missing backend application code (app/, migrations, tests, templates)β
Ashraf Al-Kassem +1: Claude Opus 4.6The initial full project commit omitted the core backend directories. This adds the complete backend application package including all API routes, models, services, workers, 10 Alembic migrations, 13 test files (57 tests), and email templates. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>8ca4657