# v439 — Lifecycle Sync Audit Notes and Warning Acknowledgement History ## Decision Proceed with lifecycle sync audit-note hardening and warning acknowledgement history before Workspace Billing warning copy/status hardening, payment collection, customer portal sessions, webhook subscription mutation, trial-to-paid conversion, hard billing gates, broker distribution limits, owned portal rules, or internal load-board access. This keeps the platform in review-only mode while giving Super Admin better evidence that risky lifecycle rows have been reviewed and that Workspace Admins have seen soft billing notices. ## What changed - Added Super Admin-only API route `/api/admin/subscription-lifecycle/audit-note`. - Added Workspace-authenticated API route `/api/subscriptions/billing-warning/acknowledgement`. - Extended `SubscriptionLifecycleBillingSyncService` so lifecycle review now includes: - lifecycle audit-note count; - risky lifecycle rows without notes; - latest lifecycle audit note per workspace; - Workspace Admin billing-warning acknowledgement count; - recent lifecycle audit-note history; - recent warning acknowledgement history. - Added lifecycle audit-note coverage and warning acknowledgement history checks to the Super Admin subscription lifecycle review. - Extended `/admin/subscriptions` so Super Admin can add per-workspace lifecycle review notes directly from the subscription lifecycle panel. - Added a lifecycle audit-note CSV export. - Extended the Workspace Admin `/billing` soft Subscription notice with: - acknowledgement state for the current warning; - an **Acknowledge notice** action; - recent acknowledgement history; - explicit copy that acknowledgement is record-only and does not mute warnings or change access. - Extended `BillingGateReadinessService.getWorkspaceSoftWarning()` so the warning API returns the current warning fingerprint and recent acknowledgement history. - Stored lifecycle notes and warning acknowledgements in the existing `SuperAdminAuditEvent` table, so no schema change was required. - Kept this build review-only and warning-only. ## Visible result ### In Super Admin At `/admin/subscriptions`, the existing **Subscription lifecycle** panel now shows stronger review evidence. Super Admin can see which risky rows still need notes, add review notes to a workspace row, review recent lifecycle audit notes, review recent Workspace Admin warning acknowledgements, and export lifecycle audit notes as CSV. ### In Workspace Admin At `/billing`, the soft **Subscription notice** can now be acknowledged. The card shows whether the current notice has already been acknowledged and lists recent acknowledgement history. The acknowledgement message plainly says it only records that the user saw the notice. ### In Dispatch Workspace No dispatch workflow is blocked. ### In Driver, Broker, Company/Fleet, and Carrier Workspaces No workflow is blocked and no access rule is changed. Shared soft billing warning posture remains unchanged. ## Guardrails - Prisma schema changed: No - Payment collection activated: No - Customer portal sessions activated: No - Webhook subscription mutation activated: No - Trial-to-paid conversion activated: No - Billing status mutation activated: No - Hard billing gates activated: No - Broker distribution limits changed: No - Owned portal rules changed: No - Internal load-board access changed: No - Warning acknowledgements mute warnings: No - Lifecycle audit notes mutate subscriptions: No ## Next recommended check-in ```text Current baseline on server is v439 review v439 lifecycle sync audit-note hardening and warning acknowledgement history, then decide whether to proceed with v440 Workspace Billing warning copy/status coverage hardening or first harden lifecycle audit-note filters/exports before changing payment collection, customer portal sessions, webhook subscription mutation, trial-to-paid conversion, hard billing gates, broker distribution limits, owned portal rules, or internal load-board access ```