{
  "id": 18952001,
  "title": "The Patch Window: Let a Model Refactor Only Lines Your Tests Already Cover",
  "url": "https://urgent.news/2026/11/08/the-patch-window-let-a-model-refactor-only-lines-your-tests-already",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-08T14:28:07.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/hackrs_6393/the-patch-window-let-a-model-refactor-only-lines-your-tests-already-cover-47n4"
  },
  "original_language": "en",
  "account": "The smallest safe change is a bounded change. Refactoring prompts often fail because they offer too much surface area. A model that can edit any line may edit lines that haven't been verified. The solution is mechanical—identify the seams and measure coverage to emit a line window. Reject any patch that steps outside the window.",
  "summary": "The smallest safe change is a bounded change. Bounds beat instructions. Give the model a line window, not a file. Most refactor prompts fail for one reason. They hand over too much surface. A model that can edit any line will edit lines nobody verified. The fix is mechanical. Map the seams. Measure coverage. Emit a window. Reject any patch that steps outside it. Below is the workflow I use on…",
  "key_points": [],
  "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."
}