# v416 - Super Admin bulk classification cleanup helper

Baseline reviewed: v415 Super Admin plan visibility and classification readiness review.

## Decision

v416 intentionally adds the Super Admin bulk classification cleanup helper before changing public registration, workspace-type plan selection, Stripe checkout, hard billing gates, broker distribution limits, owned portal rules, or internal load-board access.

The reason is sequencing safety: v415 exposed classification coverage and readiness warnings. Existing workspaces should be easier to clean up and audit before registration or plan-selection staging begins relying on those stored fields.

## Product changes

- Extended `/admin/workspaces/types` with a bulk classification cleanup helper.
- Added a helper panel that separates:
  - completely unclassified workspaces ready for server-recommended bulk save;
  - partial, unusual, or signal-mismatch records that need manual cleanup;
  - already stored classifications that the bulk helper will not overwrite.
- Added a guarded bulk save button that applies recommendations only to completely unclassified workspaces in the current class filter view.
- Limited one bulk run to the first 50 eligible workspaces in the current view.
- Kept manual review required for partial classification pairs, unusual account-class selections, and stored-vs-signal mismatches.
- Added `/api/workspaces/classification/bulk` for Super Admin-only guarded bulk classification.
- Added server-side recommendation checks so the browser preview is not trusted as the source of truth.
- Added per-workspace audit events and one bulk-run audit event using the existing `SuperAdminAuditEvent` model.
- Expanded recent classification audit visibility to include bulk recommendation-applied events.

## Guardrails preserved

The v416 helper only stores `Organization.workspaceType`, `Organization.accountClass`, and audit records.

It does not change:

- public registration;
- workspace-type plan selection;
- Stripe checkout;
- subscription status;
- hard billing gates;
- owned interface or invited portal records;
- broker distribution limits;
- internal load-board access.

## Prisma impact

No Prisma schema change.

## Validation

- `npm run dispatchspot:preflight` passed.
- Full local `npm run build` could not run in the sandbox because the source-only package does not include `node_modules`; the WHM server build remains the required full validation.
