{
  "id": 16129272,
  "title": "GitHub's New Whitespace Preferences: How to Review AI Code in Two Passes",
  "url": "https://urgent.news/2026/10/23/githubs-new-whitespace-preferences-how-to-review-ai-code-in-two-passes",
  "topic": "ai",
  "section": "AI",
  "published": "2026-10-23T00:28:58.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/marcusykim/githubs-new-whitespace-preferences-how-to-review-ai-code-in-two-passes-59kp"
  },
  "original_language": "en",
  "account": "GitHub has introduced new whitespace preferences for pull-request reviews. This update allows you to review AI-generated code in two distinct passes. During the first pass, focus on understanding the intended behavior and changes made to the code. Write down the desired outcome before opening the diff, explaining it in a single sentence. For instance, a fictional appointment app might state: \"Reject an end time that comes before the start time and keep the user's entered values visible.\"\n\nIn the second pass, restore the full diff view to ensure all changes, both formatting and behavior-related, are visible. This step is crucial for catching any overlooked modifications, such as configuration edits, deleted tests, or unrelated files that were reformatted. Remember, whitespace changes are not always cosmetic; they can alter the execution flow of your program. For example, moving a save operation outside an error-handling block could lead to unintended behavior if the validation fails.\n\nAfter the second pass, record three key points in your review: 1) the intended behavior (e.g., invalid time ranges cannot be saved), 2) the completeness of the inspection (the complete diff was reviewed with whitespace visible after the focused pass), and 3) the behavioral outcomes (invalid input failed safely, corrected input was saved, and the saved record contained the expected times). These statements provide a clear record of what was verified during the review process.\n\nWhile GitHub's review tool offers a convenient view that can simplify the initial assessment of a patch, it's essential to remember that this does not guarantee every possible failure has been found. Use the second pass to thoroughly check the changes and record any uncertainties before making a decision to merge.",
  "summary": "A cleaner diff can help you understand a change. Before you merge, check what your review settings left out. You ask AI to fix one bug. It returns a change that also reformats half the file. Now you have two problems: understanding the fix and finding everything else that moved. On October 22, GitHub announced saved whitespace preferences for pull-request reviews . You can keep whitespace…",
  "key_points": [
    "GitHub introduced new whitespace preferences for pull-request reviews.",
    "First pass focuses on intended behavior and desired outcome.",
    "Second pass reviews full diff, catching overlooked modifications."
  ],
  "editors_take": "Separating logic from formatting through a two-pass review process helps developers prevent subtle execution errors and ensures that AI-generated code changes are fully verified before merging.",
  "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."
}