Skip to content
  • Home
  • About
  • No Access
  • Privacy Policy
Bits of .NET
Bits of .NET
  • C#
  • Asp.Net Core
  • SQL
  • Windows
  • WordPress
  • AI
  • JavaScript
  • CSS
  • MORE
    • HTML
    • Ajax
    • Git
    • Docker
    • Kubernetes
    • Photoshop
    • Visual Studio

Bits of .NET

Daily micro-tips for C#, SQL, performance, and scalable backend engineering.

  • C#
  • Asp.Net Core
  • SQL
  • Windows
  • WordPress
  • AI
  • JavaScript
  • CSS
  • MORE
    • HTML
    • Ajax
    • Git
    • Docker
    • Kubernetes
    • Photoshop
    • Visual Studio
AI

The AI Prompt That Finds Which Commit Actually Caused a Regression

- 26.11.26 - ErcanOPAK

🤖 The AI Prompt That Finds Which Commit Actually Caused a Regression

Bisecting a regression by hand means checking out one commit at a time and judging each one ‘good’ or ‘bad’ – a well-specified, repetitive task a model can help structure before you spend time running anything, not by replacing git bisect but by narrowing which commits in a long range are even plausible suspects. Given the full range of diffs and the exact symptom up front, a model can rank candidates by whether their actual changed lines could plausibly produce that specific symptom, which is a much smaller list to test by hand than the full range.

🔎 The Problem

PROMPT:
"Here is a regression: [describe the exact symptom and when it started
being observed]. Here are the diffs for every commit between the last
known-good version and the first known-bad version [paste git log -p or
equivalent]. Rank these commits by how plausible each one is as the
cause, and for your top 3, state EXACTLY which lines you think are
responsible and why, in terms of the reported symptom. Do not just
describe what each commit does in general."

✅ The Fix

  • Ranking plausibility instead of naming one definitive cause keeps the output honest about uncertainty, giving you a short, ordered list to actually test instead of one unverified guess to accept on faith.
  • Requiring specific lines tied to the specific symptom forces a check against the commit’s real diff, instead of a generic-sounding explanation of what a commit ‘probably’ does to the codebase in general.
  • Confirm the top candidate with an actual git bisect run (or by reverting just that commit) as the real verification step – the prompt narrows the search, it never replaces testing whether the answer is actually right.

🚨 Why This Is Dangerous

Trusting a single confidently-named ‘this commit caused it’ answer without checking its real diff risks reverting or blaming the wrong change entirely, especially in a long commit range where several unrelated changes plausibly touch the same area of code.

A long commit range isn’t one mystery, it’s a list of suspects – rank them by what they’d actually have to do to cause your specific symptom before you test any of them.

— AI Power User

Related posts:

AI Prompt — Decision Making Under Uncertainty

AI Prompt — Decision Making Under Uncertainty

AI Prompt — Code Review With Context

AI Prompt — Code Review With Context

The AI Prompt That Traces a Flaky Test Across Ten CI Runs to Find the One Shared Dependency Behind E...

The AI Prompt That Traces a Flaky Test Across Ten CI Runs to Find the One Shared Dependency Behind E...

Views: 9
Found this useful? Share it
XLinkedInWhatsApp

Post navigation

Windows 11: Fix Night Light Reverting After Every Display Wake
WordPress: Fix a Bloated Autoload Option Slowing Every Page Load

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Most Read

  1. 01How to make theater mode the default for Youtube 1,079 views
  2. 02How to add default value for Entity Framework migrations for DateTime and Bool 997 views
  3. 03Get the User Name and Domain Name from an Email Address in SQL 996 views
  4. 04Get the First and Last Word from a String or Sentence in SQL 873 views
  5. 05How to select distinct rows in a datatable in C# 868 views
  6. 06How to enable, disable and check if Service Broker is enabled on a database in SQL Server 671 views
  7. 07Add Constraint to SQL Table to ensure email contains @ 629 views
  8. 08Average of all values in a column that are not zero in SQL 584 views
  9. 09How to use Map Mode for Vertical Scroll Mode in Visual Studio 561 views
Bits of .NET

Daily micro-tips for C#, SQL, performance, and scalable backend engineering.

Social

  • ErcanOPAK.com
  • GoodReads
  • LetterBoxD
  • Linkedin
  • The Blog
  • Twitter
Back to top
© 2026 Bits of .NET | Built with Xblog Plus free WordPress theme by wpthemespace.com