Find the Commit That Broke Your Code from Git History

    1

    Paste your git bisect, log or diff output and get the first bad commit named, the exact lines that changed, facts split from guesses, and a narrow fix plus verify commands. It never invents commit hashes.

    $4

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Find the Commit That Broke Your Code from Git History

    Example session with this skill installed

    After upgrading MarkupSafe 2.0.1 → 2.1.0 our app fails on startup:
    ImportError: cannot import name 'soft_unicode' from 'markupsafe'

    I cloned pallets/markupsafe and ran
    git bisect start 2.1.0 2.0.1

    git bisect run ./check_soft_unicode.sh
    (check_soft_unicode.sh: PYTHONPATH=src python3 -c "from markupsafe import soft_unicode; assert soft_unicode(5) == '5'"; exit 125 if src/markupsafe is missing)
    

    Bisect output, git bisect log and git show of the result are pasted below. Name the commit that broke us, separate facts from guesses, and give me the smallest fix and a verification plan.

    • Read your context and instructions
    • Compiled the find the commit

    Regression report: ImportError 'soft_unicode' after MarkupSafe 2.0.1 → 2.1.0

    Executive answer

    The first bad commit is 7856c3d945a969bc94a19989dda61c3d50ac2adb, "remove deprecated code" (David Lord, 2021-11-05). It deletes soft_unicode from both the pure-Python and C implementations and from markupsafe/init.py. It reached main through PR #261 (merge 00ada4b) and shipped in 2.1.0. This was a planned removal, not an accident: soft_unicode had raised a DeprecationWarning ("will be removed in MarkupSafe 2.1") since 2.0.0.
    Confidence: high. git bisect run isolated it in 7 steps between tags 2.0.1 (good) and 2.1.0 (bad), and the diff removes exactly the name in the ImportError.

    Evidence timeline

    DateCommitEvidenceInterpretation
    2020-01-2989b18c5"remove compat code": renames soft_unicode → soft_str; adds a soft_unicode wrapper that warns "'soft_unicode' has been renamed to 'soft_str'… removed in version 2.1"Deprecation starts; first released in 2.0.0
    2021-04-15e7b6128Warning text changed to "will be removed in MarkupSafe 2.1." (_native.py and _speedups.c)Removal target confirmed
    2021-05-187666dff (tag 2.0.1)bisect: good. from markupsafe import soft_unicode works and emits DeprecationWarningLast good point
    2021-11-057856c3d"remove deprecated code": −12 lines _native.py, −19 _speedups.c, −2 imports in init.py; CHANGES: "Remove soft_unicode, which was previously deprecated. Use soft_str instead. :pr:261"FIRST BAD COMMIT
    2021-11-0500ada4bMerge PR #261 (parents db9fa82 good, 7856c3d bad)Where it entered main
    2022-02-17b5a5175 (tag 2.1.0)bisect: bad. ImportError reproducedReleased

    Change chain

    soft_unicode renamed + deprecated (89b18c5, shipped 2.0.0) → warning text targets 2.1 (e7b6128) → removed (7856c3d, PR #261) → released in 2.1.0.
    Files: src/markupsafe/init.py, _native.py, _speedups.c, tests/. Behaviour affected: the public name soft_unicode no longer exists; soft_str is unchanged.

    Findings

    • Observed / high: bisect marks 7856c3d as the first bad commit; its parent side db9fa82 tests good.
    • Observed / high: the diff removes from ._speedups import soft_unicode and from ._native import soft_unicode, the exact import in your error.
    • Observed / high: soft_str exists and returns '5' for 5 in both 2.0.1 and 2.1.0, so it is a drop-in rename.
    • Inferred / medium: anything that silenced or ignored DeprecationWarning would have hidden the 2.0.x warning, which is why this shows up only now.
    • Unknown: whether soft_unicode is imported by your own code or by a pinned dependency. The traceback was not supplied; check its last frames.

    Smallest fix (pick one)

    1. Your code imports it: replace soft_unicode with soft_str (available since 2.0.0, so it works on both versions).
    2. A dependency imports it: upgrade that dependency to a release that uses soft_str. Do not patch site-packages.
    3. Stop-gap only: pin markupsafe<2.1 while you do 1 or 2.

    Verification plan (read-only or reversible)

    • git show 7856c3d --stat (confirm the removal scope)
    • git log -S soft_unicode --oneline -- src/markupsafe (full life of the name)
    • In your app: grep -rn "soft_unicode" . and the venv's site-packages to find every caller
    • On 2.0.1: python -W error::DeprecationWarning -c "from markupsafe import soft_unicode; soft_unicode(5)" turns the old warning into a failing check; run your test suite the same way before the next upgrade
    • After any bisect: git bisect reset

    Handoff summary

    MarkupSafe 2.1.0 removed the deprecated soft_unicode in commit 7856c3d (PR #261). Use soft_str instead, or upgrade whichever package still imports it. Scope: the MarkupSafe repo history between 2.0.1 and 2.1.0 only. Your app's traceback and dependency tree were not supplied.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    "It worked last release" is not a root cause. This skill turns your git evidence into one: the commit that changed the behaviour, the exact lines, and what to do about it.

    Give your agent the symptom (error, failing test, changed output) plus whatever git output you have: git bisect run log, git log -S / -L, git show, git blame, or a diff between a good and a bad version. You get a short, citable report:

    • Executive answer: the first bad commit (full hash), what it changed, and a confidence level
    • Evidence timeline: every relevant commit with date, what the diff shows, and what it means
    • Change chain: original change → deprecation or follow-up → removal, revert or merge
    • Findings labelled Observed / Inferred / Unknown, so you never act on a guess
    • Narrow fix options (code change, pin, or revert) with their trade-offs
    • Verification plan: read-only or reversible git commands and tests to confirm before you touch production

    Built for developers chasing a regression after an upgrade or merge, reviewers who only have pasted logs, and leads writing an incident note. Works in Claude Code, Cursor, Codex and any agent that loads SKILL.md.

    Honest limits: it reasons only over the history you supply (or the commands you let your agent run). It never invents commit hashes, authors, line numbers or test results, and it never recommends force-pushes or history rewrites.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 1 month ago

    Requires

    Git

    Listed1 month ago
    Updated8 days ago

    What's inside

    Frequently Asked Questions