{
  "id": 12856257,
  "title": "Replacing a legacy system? Run the new code in its shadow first",
  "url": "https://urgent.news/2026/10/08/replacing-a-legacy-system-run-the-new-code-in-its-shadow-first",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-08T11:35:54.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/redliolabs/replacing-a-legacy-system-run-the-new-code-in-its-shadow-first-48a4"
  },
  "original_language": "en",
  "account": "When replacing a legacy system, a common mistake is to assume the new code will work perfectly from the start. However, new code may fail in ways that weren't anticipated, such as unexpected rules or discrepancies in handling edge cases. To avoid this, run the new code alongside the old one using a technique known as \"shadowing.\" In shadowing, the new code runs in parallel with the existing system, processing the same inputs but not producing outputs that users see. Instead, the outputs of the new code are recorded and compared to those of the legacy system. Any differences are treated as either bugs in the new code or undocumented rules in the old system that need to be addressed. This approach ensures that users are not impacted by potential issues during the transition.",
  "summary": "Most rewrites of a working system fail the same way. The new code passes every test the team thought of, goes live, and then meets the rules nobody wrote down: the discount that only applies on the last day of the month, the customer whose IDs start with a zero, the rounding the old system did \"wrong\" for fifteen years that finance now depends on. You can't write tests for rules you don't know…",
  "key_points": [
    "Run new code alongside legacy system using shadowing technique",
    "New code processes same inputs, outputs recorded for comparison",
    "Differences treated as bugs or undocumented rules to address"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}