feat: add workspace activity audit log #37

Open
opened 2026-02-20 16:39:57 +00:00 by Clotho · 0 comments
Member

Problem

There is no audit trail for significant workspace actions. Security events, membership changes, and entitlement changes are not centrally logged in a queryable format.

Related to the incomplete UserStatsService::getRecentActivity() (always returns []).

Acceptance Criteria

  • Create workspace_activity_log table with columns: workspace_id, user_id, action, subject_type, subject_id, metadata (JSON), created_at
  • Log events: member add/remove, role change, package provision/suspend/cancel, invitation sent/accepted
  • Add WorkspaceActivityLog model
  • Add recentActivity() method to Workspace model
  • Implement UserStatsService::getRecentActivity() using the log
  • Add tests

Discovered during automated scan (issue #3)

## Problem There is no audit trail for significant workspace actions. Security events, membership changes, and entitlement changes are not centrally logged in a queryable format. Related to the incomplete `UserStatsService::getRecentActivity()` (always returns `[]`). ## Acceptance Criteria - Create `workspace_activity_log` table with columns: `workspace_id`, `user_id`, `action`, `subject_type`, `subject_id`, `metadata` (JSON), `created_at` - Log events: member add/remove, role change, package provision/suspend/cancel, invitation sent/accepted - Add `WorkspaceActivityLog` model - Add `recentActivity()` method to `Workspace` model - Implement `UserStatsService::getRecentActivity()` using the log - Add tests _Discovered during automated scan (issue #3)_
Clotho added the
discovery
P3
labels 2026-02-20 16:39:57 +00:00
Clotho was assigned by Charon 2026-02-20 23:46:46 +00:00
Charon added the
agent-ready
label 2026-02-21 01:31:50 +00:00
Sign in to join this conversation.
No description provided.