Case study
Legacy macOS agent rebuilt for a compliance platform serving financial institutions - zero compliance gaps
The macOS app was running on C code that few people understood. New compliance requirements took weeks to implement and each change risked breaking something. We replaced the entire foundation in two phases without interrupting a single customer.
Cybersecurity / Financial Compliance · Enterprise SaaS, financial institution clients · North America
The challenge
The macOS agent was the last piece the team was afraid to touch.
The company provides continuous compliance monitoring for financial institutions. Every device in every client organization runs an agent that checks security posture against current regulatory requirements and reports status back to a central dashboard.
Windows, iOS, and Android agents had all been modernized. The macOS agent had not. It ran on legacy C code that accumulated over years. The engineers who originally wrote it were no longer there. Tribal knowledge was thin. Every change carried unpredictable side effects that no one could fully anticipate before deploying.
The business consequence was measurable. New compliance factors required by financial regulators were taking weeks to implement. Releases slowed. When new requirements came down, the team spent more time not breaking existing behavior than actually building the new behavior. The legacy C code was not just slow to change - it was slowing down the company's ability to serve regulated clients on regulatory timelines.
The infrastructure picture made this harder. Every macOS device maintained a persistent live connection to a messaging cluster built specifically to support macOS. The cluster was oversized for the job. The persistent connections drained device CPU and battery in ways that were visible to end users at financial institutions. A separate web application existed solely to serve macOS users. No other platform needed it.
The constraint that made everything difficult: financial institutions cannot experience compliance gaps. Monitoring had to stay continuous. No device could go offline. The foundation had to be replaced without ever turning off the lights.
“Every time a new compliance requirement came in, we dreaded opening that code. We knew something would break and we wouldn't know why until it was already live.”
The approach
Two phases. Infrastructure costs cut first. Full re-architecture second.
We proposed a phased replacement approach rather than a big-bang rewrite. Customers would migrate twice, but each migration would be controlled, with validation gates before any customer moved. No compliance gaps. No device enrollment interruptions.
Phase one: stabilization (weeks 1-6). The first priority was cutting the infrastructure burden without touching the C core. Persistent always-on connections were replaced with push-notification-based communication - devices check in when there is something to report rather than holding a live connection around the clock. Device CPU and battery impact dropped immediately. The messaging cluster, which existed entirely to support macOS, was scaled down significantly. The separate macOS web application was decommissioned and replaced with the unified dashboard all other platforms already used. The legacy C engine stayed intact throughout. Compliance continuity was preserved. The operational overhead around it dropped substantially before any risky work began.
Phase two: full re-architecture (months 2-6). With the infrastructure stabilized, we built a new macOS agent alongside the old one. The new agent was written in Swift using Apple's current security frameworks, replacing the legacy privilege model that had accumulated technical debt over years. We designed a modular compliance factor engine where each factor is independently testable and deployable. We added structured logging at every layer - the existing C app had minimal observability, which was part of why changes were so dangerous.
The old and new agents ran in parallel during development. Factor parity was validated before any customer moved. The migration path ran: legacy app to intermediate version to new app. Each step was validated before the next customer cohort moved. No customer jumped directly from the C-based agent to the new architecture in a single step.
What changed for the engineering team. New compliance factors that previously required navigating C modules now plug into a defined interface. The first factor added after launch shipped in days. The structured logging makes unexpected behavior visible before it reaches production. Engineers can make changes with confidence because the failure surface is mapped and the observability is in place.
“The two-phase approach felt like it added work at first. By month four, we understood why it was the only safe way to do this.”
The results
Zero compliance gaps. New factors in days. macOS is no longer the outlier.
The migration completed without a single compliance gap. No financial institution client experienced monitoring downtime. No device went offline during the transition. The two-step migration path did what it was designed to do: contain the risk of each transition step to a manageable surface area.
New compliance factors now ship in days. The first factor added after launch took days, not weeks. When new regulatory requirements come in, the team implements against a defined interface in the modular engine rather than digging through C modules and hoping nothing breaks elsewhere.
The legacy C core is gone. The always-on messaging cluster is a fraction of its previous size. The separate macOS web application is decommissioned. The macOS agent now matches the Windows, iOS, and Android agents in architecture. A change to compliance factor logic applies across all four platforms in a single release.
Device performance improved. End users at financial institutions noticed lighter system impact after the Phase 1 infrastructure changes. The persistent connection pattern that was draining CPU and battery in the background is replaced by push notifications that consume resources only when there is activity.
The engineering team can move. Incorrect compliance factor calculations that were hidden in the C code have been identified and corrected. The structured logging that did not exist before now surfaces the information needed to catch calculation errors before they reach clients. The code the team feared touching is now code they understand.
“For the first time in years, adding a new compliance factor is a normal week of work. Not a research project with an unknown end date.”
ROI
Infrastructure cost savings from Phase 1 arrived in six weeks: the messaging cluster downsized, the separate macOS web application decommissioned, device resource consumption reduced. Phase 2 pays back in engineering velocity - new compliance factors that previously took weeks now take days, which directly reduces the cost of staying current with regulatory requirements.
Run the numbers
See what these results would look like for your team size and budget.
“For the first time in years, adding a new compliance factor is a normal week of work. Not a research project with an unknown end date.”
VP Engineering — Cybersecurity compliance provider
Next step
Carrying legacy code your team is afraid to touch?
30 minutes with an engineer. Bring your current setup and your deadline. You leave with a squad shape and a written burn estimate.