The two bugs we inherited by cloning, and what they taught us
The CRM had been running a builder's business for months without a complaint. We copied it for a landscaper, pointed it at a fresh database, and the first test lead refused to save.
Cloning a working app copies its history as well as its code, and two problems rode along: a database setup step that had been reduced to a placeholder comment because the original database already had those columns, and a scoring rule that gave a plain form fill the maximum score. Neither showed up in the original. Both now have a permanent check in our process: build a fresh database from the migrations before trusting them, and score a plain lead on the preview before merging.
Bug one: the migration that did nothing
A migration is a small file that changes the shape of a database: add this column, create that table. They run in order, and the list of which ones have run is the database's record of its own history. On a healthy project, the files and the database agree.
The builder's CRM had a migration meant to add two columns to the leads table: the lead's score and its tier (hot, warm, cold). At some point the production database had received those columns by hand, so when the migration file was later written, it would have failed on a database that already had them. Somebody did the practical thing: emptied the file to a comment so the migration would run cleanly and the history would stay tidy. On the original it was harmless. The columns existed, the file said it had run, everyone moved on.
The clone ran the same files against a new, empty database. Every migration reported success. The history looked perfect. And the leads table had no score column and no tier column, so every attempt to save a lead failed, because the code reasonably expected them to be there. The symptom was total. The cause was a file that looked like it had already done its job.
Bug two: every lead was hot
The second one did not break anything, which is worse. Lead scoring adds points for things that suggest a lead is worth chasing: a budget, a timeline, a phone number, a specific project. The builder's rules had grown over time, and the points for simply filling out the website form had crept up to the point where a plain form fill hit the maximum. Every website lead arrived labelled hot.
On the builder's side nobody noticed, because website leads were a small share of the whole and the team called every one of them anyway. For a landscaper whose leads mostly come from the website, a scoring system where everything is hot is a scoring system that says nothing. We only caught it because we were rewriting the rules for the new trade and sat down to total the points.
What a clean copy really copies
A fork is an exact copy of the code and every decision ever made in it, including the shortcuts. The original keeps working because it carries its own history, with the hand edits and the slowly drifting rules already baked into its database and its habits. The copy starts from zero and asks the files to be literally true. That is the trap: the better the original has been running, the more of its quiet accommodations are invisible until a fresh start exposes them.
- A placeholder migration is invisible until a database is built from scratch.
- A drifting scoring rule is invisible until someone totals it by hand.
- A setting that only exists in the original's hosting account is invisible until the copy tries to send its first email.
The checks we added
- Build a fresh database from the migrations before trusting them. Not against a backup of the original, against nothing. If a column the code uses is missing afterward, a migration is lying.
- Insert a test lead on the live preview as the first act. Before any styling, before renaming a single field. A lead that saves proves the core; a lead that fails points straight at the layer that matters.
- Score a plain form fill and look at the number. It should land somewhere in the middle. If it is hot, the rules are broken no matter how reasonable each one looks.
- Rewrite scoring per industry, from a conversation, not from the previous client's rules. What makes a lead hot for a builder is not what makes one hot for a lawn crew or an advisor.
- List every setting the original holds outside its code, and recreate each one deliberately. Email passwords, service accounts, secret keys. The copy inherits none of them.
- Go back and check the earlier clones. The advisor's CRM was copied from the same source before we found the migration, so it went on the list to verify.
What it taught us
Cloning is still the right move. The landscaper and the advisor got months of fixes on day one. But a working original is evidence that the system works for the original, not that the files describe it truthfully. The copy is the audit. Now we treat the first day of every clone as a test of the source, and the source is usually the thing that gets fixed.
Both bugs are now fixed in the copies and written into the checklist we run every time a proven system becomes someone else's, which is how most of the CRMs and internal tools we deliver begin.
Questions people ask
How can a database setup step report success and still do nothing?
Because the migration file had been emptied to a comment, so running it did no work but still recorded itself as done. The history list looked complete while the columns were missing. The only way to catch it is to build a database from scratch and check that the columns the code uses are really there.
Why did the original CRM never show either bug?
Its database had received the columns by hand before the placeholder file existed, so nothing was missing there. And its scoring problem was masked because website leads were a small share of the total and the team called every lead anyway. Both bugs only became visible when a fresh copy had to rely on the files being literally true.
Does this mean cloning a working app is risky?
It is still the best way we know to start a new system, because every fix the first client paid for comes along for free. The risk is assuming the copy is proven because the original is. We now treat the first day of a clone as an audit of the source, and the checks are short enough to run every time.
Want this done for your business?
Two minute intake. A real person reads every one and replies within a business day.
Keep reading
Vibe coding: what it is, what it is not, and what it means for your business
Vibe coding explained for owners: describing software in plain English and letting AI write it.
New softwareWe cloned a CRM for a new industry in a day. Here is how
How a CRM built for a home builder became a landscaping CRM and an advisor CRM in a day: what stayed, what changed, and why a proven core beats a blank page.
New softwareThe new age of software development: what changed and what did not
AI now writes most of the code in a software project.