Skip to main content

driftfix

Dependabot bumps it. CI breaks. driftfix fixes the code.

Dependency bots open the upgrade PR, then leave you to fix whatever broke. driftfix finishes the job: it reads the failing tests, has Claude adapt your code to the new version, reruns your tests itself, and pushes the fix onto the same PR. If it can't get to green, it comments what it tried and commits nothing.

Dependabot PR (openai 0.28 → 1.x) → tests fail → Claude fixes code → tests rerun → ✅ commit on the PR
                                                                              └→ ❌ comment only

Benchmark

Real breaking upgrades, each a small app with tests that pass on the old version and fail on the new one (bench/):

Package Upgrade Fixed Cost Diff
httpx 0.27.2 → 0.28.1 ✅ $0.12 1 file changed, 4 insertions(+), 1 deletion(-)
numpy 1.26.4 → 2.5.3 ✅ $0.14 1 file changed, 5 insertions(+), 5 deletions(-)
openai 0.28.1 → 3.24.0 ✅ $0.29 1 file changed, 4 insertions(+), 3 deletions(-)
pydantic 1.10.21 → 2.13.5 ✅ $0.20 1 file changed, 11 insertions(+), 11 deletions(-)
sqlalchemy 1.4.54 → 2.1.3 ✅ $0.19 1 file changed, 7 insertions(+), 4 deletions(-)
pydantic (6-file app, shared base model) 1.10.21 → 2.13.5 ✅ $0.51 4 files changed, 47 insertions(+), 29 deletions(-)
pydantic (BaseSettings moved to new package) 1.10.21 → 2.13.5 ✅ $0.22 2 files changed, 8 insertions(+), 5 deletions(-)

7/7 fixed for $1.67 total, no test edits. The 6-file case runs with deprecation warnings as errors and includes a silent behavior change (v2 stops coercing numeric SKUs to strings). Rerun: python bench/run.py (or --check to validate cases for free). More cases welcome: add a folder under bench/cases/.

GitHub Action

# .github/workflows/driftfix.yml
name: driftfix
on: pull_request
permissions: { contents: write, pull-requests: write }
jobs:
  fix:
    if: github.actor == 'dependabot[bot]'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with: { ref: "${{ github.head_ref }}" }
      - uses: Gthejesraj/driftfix@main
        with:
          anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
          setup: pip install -r requirements.txt
          test: pytest -q

Important: workflows triggered by Dependabot can't read your normal repo secrets. Add ANTHROPIC_API_KEY under Settings → Secrets → Dependabot.

Commits pushed with the default GITHUB_TOKEN don't re-trigger CI. Use a PAT or GitHub App token in actions/checkout if you want CI to rerun on the fix.

CLI

pip install driftfix
# after upgrading a dependency and seeing tests fail:
driftfix fix --package openai --from 0.28 --to 1.40 --test "pytest -q"
Flag Default
--test pytest -q any command; exit 0 = green
--model claude-opus-5
--budget 5 max USD per run
--max-turns 50
--summary FILE write the markdown report

Guardrails

  • Your tests decide. driftfix reruns them after the agent finishes; the agent's word doesn't count.
  • Changing the upgraded package's requirement (pinning back) or editing lock files is rejected. Adding a split-out package (e.g. pydantic-settings) is allowed.
  • Requires a clean git tree, so every change is a reviewable diff.
  • Never merges anything. The PR is still yours to review.
  • The agent runs with full tool access inside the checkout. Run it in CI or a throwaway clone.

Roadmap

  • More benchmark cases (pandas 2, Django, langchain), harder multi-file repos
  • npm / Renovate support
  • Provider mode: packages ship migration notes that driftfix reads

License

MIT

Metadata

Release files for driftfix 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for driftfix 0.1.1
File Size Uploaded
driftfix-0.1.1.tar.gz 14.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for driftfix 0.1.1
File Interpreter ABI Platform
driftfix-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 21.0 kB

Release files / driftfix-0.1.1.tar.gz

Download URL driftfix-0.1.1.tar.gz
Size 14.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7a936bbd8462f226d021f462bfa29889747656068cbd2f8421a60ab0d0ecf1cd
BLAKE2b-256 checksum
How to use checksums
92cd31a9e92aec37c6f0c8cd16c3e82eca7dbd133e93377f43071c4a07e1067c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log

Release files / driftfix-0.1.1-py3-none-any.whl

Download URL driftfix-0.1.1-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
19496e6c8f341a1a23d705184cafcd00623124f7f335d724b3a2453f6024b75a
BLAKE2b-256 checksum
How to use checksums
99dff4a84bac5745611af704e9639cde5b561bedb2e836c6e4ef02231d861574
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page