Discovery produced the plan that made the program safe: the core workflow engine was salvageable, the tenancy assumptions were concentrated in the persistence and auth layers, and long-running document workflows, some spanning weeks of human approvals, were the real migration hazard, since they could not simply be paused. The blueprint that came out of those two weeks, with a costed roadmap and a risk register, is what the board actually approved.
We rebuilt the platform around a control-plane and data-plane split. The control plane owns tenants, identity, entitlements, and billing; data-plane services run the document workflows, rebuilt on Temporal so that a workflow with three pending human approvals survives deploys, node failures, and the migration itself with its state intact. Tenant isolation is enforced with PostgreSQL row-level security plus per-tenant encryption keys, which turned the scariest security-questionnaire rows into short answers. SAML and OIDC SSO, SCIM provisioning, and immutable audit-log export closed out the enterprise checklist, and Stripe-metered usage billing replaced hand-produced invoices.
Migration ran in cohorts over eleven weeks: tooling exported each snowflake, replayed its in-flight workflows into Temporal, and ran shadow verification before DNS moved. The three most heavily customized tenants got dedicated attention; the remaining 65 moved on a conveyor. The old estate was decommissioned VM by VM, and the infrastructure bill per tenant fell 44%, while SOC 2 Type II, scoped from day one of the rebuild, was attested five months after kickoff.