Skip to content

Commit 2924f0f

Browse files
committed
chore(telemetry): drop org_seat.drift_reconciled audit
System self-heal bookkeeping doesn't belong in the user-facing audit trail — membership and seat-purchase changes are already audited, and the cron's logger output covers ops visibility.
1 parent 9f1e352 commit 2924f0f

2 files changed

Lines changed: 1 addition & 18 deletions

File tree

apps/sim/lib/billing/organizations/seat-drift.ts

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { AuditAction, AuditResourceType, recordAudit } from '@sim/audit'
21
import { db } from '@sim/db'
32
import { member, subscription } from '@sim/db/schema'
43
import { createLogger } from '@sim/logger'
@@ -70,22 +69,7 @@ export async function reconcileTeamSeatDrift(): Promise<SeatDriftSweepResult> {
7069
organizationId: row.organizationId,
7170
reason: 'seat-drift-sweep',
7271
})
73-
if (result.changed) {
74-
reconciled++
75-
recordAudit({
76-
workspaceId: null,
77-
actorId: 'system',
78-
action: AuditAction.ORG_SEAT_DRIFT_RECONCILED,
79-
resourceType: AuditResourceType.ORGANIZATION,
80-
resourceId: row.organizationId,
81-
description: 'Reconciled seat drift to member count',
82-
metadata: {
83-
previousSeats: result.previousSeats ?? 0,
84-
seats: result.seats ?? 0,
85-
reason: 'seat-drift-sweep',
86-
},
87-
})
88-
}
72+
if (result.changed) reconciled++
8973
} catch (error) {
9074
logger.error('Failed to reconcile seat drift for organization', {
9175
organizationId: row.organizationId,

packages/audit/src/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ export const AuditAction = {
136136
ORG_INVITATION_REVOKED: 'org_invitation.revoked',
137137
ORG_INVITATION_RESENT: 'org_invitation.resent',
138138
ORG_SEAT_PROVISIONED: 'org_seat.provisioned',
139-
ORG_SEAT_DRIFT_RECONCILED: 'org_seat.drift_reconciled',
140139
ORG_PLAN_CONVERTED: 'org_plan.converted',
141140

142141
// Permission Groups

0 commit comments

Comments
 (0)