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(-) |
6/6 fixed for $1.45 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.
- Edits to dependency files (pinning back) are rejected.
- 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.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| driftfix-0.1.0.tar.gz | 13.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| driftfix-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.5 kB
Release files / driftfix-0.1.0.tar.gz
| Download URL | driftfix-0.1.0.tar.gz |
|---|---|
| Size | 13.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
65512c653d53ed0d389a5ec212111a9d6f57cace9349f00b1cb058a9b74a6a23
|
|
BLAKE2b-256 checksum How to use checksums |
323cb172aeec6967861a3fe687bc520ca3218a928747a5296847d8ae06632250
|
| 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 logRelease files / driftfix-0.1.0-py3-none-any.whl
| Download URL | driftfix-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3574f7a0e2ede3ba3efe89b0c3f764251e1d4d9d7bfe7745fab6ec82bbac9623
|
|
BLAKE2b-256 checksum How to use checksums |
279d1c893f787ceaa4dfbe720d2694bfc341e6d47dd34e3fd3f1cc9cda6e3456
|
| 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