Bringing drifted copies of a dispatch product back to one
A dispatch product had split into several drifting copies over the years. Without pausing development, we brought it back to one authoritative codebase per component and set up a change process that keeps it that way.
Direct answer. A dispatch product had split into several copies that drifted apart, and fixing one copy while shipping another kept happening. Without pausing development, we brought it back to one authoritative codebase per component and set up a change process so it does not split again.
Summary
The product has a web dispatch console, an Android app, a work-order backend and a patrol backend. The consolidation was completed on 2026-08-04, and day-to-day development continued throughout.
Problem
Over time each component had acquired several copies. Changes were copied between them by hand, builds sometimes used the wrong source, and the same kind of defect kept coming back. Backups were whole copied project folders, and nobody could say which copy was the real one. A source archive from a third party had been unpacked and turned into a separate line of development.
What we delivered
- One authoritative codebase per component, with the history of removed copies archived and recoverable.
- A file-by-file comparison of outside code against the authoritative version, merging only real changes and normalising formatting noise.
- A change process: assess the impact first, start every bug fix with a test that reproduces it, and commit only after acceptance passes. Existing problems are recorded and can only shrink.
- An automatic pre-commit check that keeps encrypted or corrupted files out of the codebase.
Outcome
Each component now has one version that counts, and builds no longer pick up the wrong source. Every change since then has a written impact record, so a problem can be traced to the change that caused it.
Limits
Defect rates before and after were not measured, and none are claimed. Client identity, product brand and deployment details are withheld.
Frequently asked questions
Why not merge everything into one big repository?
The components already had their own histories and release cycles. One repository per component kept the history intact and disturbed ongoing work the least.
Was all the legacy code cleaned up at once?
Gradually. Existing problems are recorded in a register and each entry can only shrink, while new code has to meet the standard. Delivery carried on and the total only goes down.
What stops a second copy from appearing again?
Code arriving from outside is compared with the authoritative version and only real changes are merged. Snapshots are tags, never copied folders.