Skip to main content

whichdep

Which dependency update broke your build? whichdep finds it for you.

Your CI was green, then a cargo update, a Dependabot PR or a fresh install pulled in 30 new package versions and the tests went red. git bisect does not help: your code did not change, your lockfile did. whichdep takes the lockfile that worked and the one that does not, applies subsets of the differences to a copy of your project, runs your test command, and narrows the failure down to the smallest set of package updates that still breaks it. That is delta debugging (Zeller's ddmin) over packages instead of commits.

$ whichdep --good v1.4.0 -- cargo test
whichdep 0.0.1 · cargo · Cargo.lock
  9 changes (8 updated, 1 new)

  #1   pass        good lockfile       exit 0
  #2   fail        bad lockfile        exit 101
  #3   pass        5 of 9 updates      exit 0
  ...

Cause
  gamma  1.0.0 → 1.0.1

Verified: The bad lockfile without this cause passes the tests again.

To put them back to the good versions:
  cargo update gamma@1.0.1 --precise 1.0.0

(The output above is illustrative; see tests/e2e.rs for runs against real tools.)

Why not just bisect by hand?

  • Interactions. Two updates that only break together come back as a pair, not as a wrong single answer.
  • Several causes. After finding one it reverts it in the bad lockfile and checks; if the tests still fail it keeps going.
  • Invalid mixes are not blamed. A half-applied update that Cargo cannot lock, or that pip check rejects, is classified unresolved and skipped, never counted as a failure.
  • Fast. Roughly 2·log2(n) trials for one cause; identical rendered lockfiles are not run twice, and conclusive trial outcomes can be reused across runs.
  • Isolated. Each trial starts from a fresh copy of the project. Build caches, logs and experiment history live outside your source tree.

Install

cargo install --path .

No dependencies, builds offline. Needs git; uv for the pip ecosystem (falls back to venv + pip).

Usage

whichdep --good <REV|FILE> [--bad <REV|FILE>] [--lockfile PATH] -- <test command>
whichdep --good <REV|FILE> --list          # only show what changed
whichdep adapters [--json]                 # list supported ecosystems
whichdep history [ID] [--json | --html]    # inspect store or export dashboard HTML
whichdep clean [--build-only]              # reclaim cache/store disk space
whichdep format --input rep.json --format github-comment
Option Meaning
--good Lockfile that works: a git revision or a file
--bad Lockfile that fails (default: working tree)
--lockfile Cargo.lock, uv.lock, pinned requirements.txt, package-lock.json, or pnpm-lock.yaml (auto-detected)
--ecosystem cargo, uv, pip, npm, pnpm (guessed from lockfile name)
--strategy ddmin (default), bisect, adaptive, or one-by-one
--repeat N Run the test N times per trial; disagreement = flaky = unresolved
--timeout S Kill a run after S seconds; counts as a failure (finds hangs)
--max-trials N, --max-causes N Budgets
--prepare SCRIPT Replace the built-in environment setup (none skips)
--json, --format FMT text, json (whichdep-report-v2), markdown, github-comment, html
--out PATH Write the rendered report to a file
--github-summary Append Markdown summary to $GITHUB_STEP_SUMMARY and emit CI annotations
--keep, -v Keep trial workspaces, stream command output
--isolate-target Isolate build target dirs per rendered lockfile instead of sharing per experiment
--no-resume Re-run trials instead of reusing persisted conclusive results

The test command's exit status: 0 pass, 125 cannot be tested (like git bisect run), anything else fail. Exit status of whichdep: 0 found, 1 no result, 2 usage/environment error.

Run it in the directory that contains the lockfile, with the bad state checked out. Only the lockfile varies between trials; code and manifest stay as they are.

How it works

  1. Parse both lockfiles and compute the changes (one unit per package whose locked versions differ).
  2. Check the endpoints: good must pass, bad must fail.
  3. ddmin over the units. Requirements between units (a new crate that needs a new major of another) are respected so impossible lockfiles are not proposed.
  4. Each trial renders a lockfile, builds the environment, verifies that the resolver kept it as written, then runs your test command.
  5. Revert what was found in the bad lockfile and test again to confirm.

Every trial is run in a fresh copy of the project. The reusable Cargo build cache is stored under the whichdep cache directory, not in ./target. The persistent store keeps experiment metadata, diagnosis snapshots, command logs and conclusive trial outcomes. Its default location is $WHICHDEP_HOME, then $XDG_CACHE_HOME/whichdep, then ~/.cache/whichdep (or the platform cache location). --no-resume disables reading old outcomes but still records the new run. Unresolved outcomes are never persisted. If a fresh run disagrees with a previously cached result for the same key, that cache entry is removed.

Using the Rust library

The search engine can be used without the CLI, Git handling or a process runner. A caller supplies an Experiment, a dependency Closure, and any implementation of the Oracle trait:

use whichdep::{Change, Engine, Experiment, NoClosure, Outcome, Set, Snapshot};

let experiment = Experiment::new(
    "example-1",
    "example regression",
    "custom",
    Snapshot::new("good", "good-state-fingerprint"),
    Snapshot::new("bad", "bad-state-fingerprint"),
    vec![Change {
        name: "library-a".into(),
        from: vec!["1.0".into()],
        to: vec!["2.0".into()],
    }],
    "test-oracle-v1",
);
let mut oracle = |changes: &Set| {
    if changes.contains(&0) { Outcome::Fail } else { Outcome::Pass }
};
let diagnosis = Engine::new()
    .run(&experiment, &NoClosure, &mut oracle)
    .expect("experiment runs");
println!("{:?}", diagnosis.findings);

For persistent history and trial caching, pass an ExperimentStore to Engine::with_store and enable reuse with .with_resume(true). The CLI does this by default and prints an experiment ID that identifies its history folder. Cache identity includes the endpoint fingerprints, change units, ecosystem, oracle fingerprint and dependency-closure fingerprint. Callers must make the oracle fingerprint cover every input that can affect its result (tool versions, environment, source tree, command and settings). Custom Closure implementations must return a stable cache_fingerprint() to enable persistent trial reuse; otherwise history is still stored but cross-run cache reuse is disabled. Fingerprints are non-cryptographic, so use --no-resume for volatile or untrusted external oracles. The engine persists each conclusive Pass and Fail outcome immediately when a trial finishes; unresolved states are retried. This allows a later run to continue after an interrupted process, not only after a budget-limited run.

Limitations (v0.1.0)

  • Ecosystems: Cargo.lock (v3/v4), uv.lock (v1), pinned requirements.txt, package-lock.json (v2/v3), and pnpm-lock.yaml (v6/v9), plus custom adapters via AdapterRegistry. See docs/PLATFORM.md for the Adapter API, search strategies, machine-readable JSON schemas, GitHub Action (action.yml), CI security model, and HTML dashboard export.
  • Live regression reproductions are documented in tests/regression_corpus/README.md (Python httpx, Node chalk, Rust rand); automated offline CI tests use synthetic fixtures/registries.
  • The persistent store saves fingerprints, metadata, trial outcomes and command logs, but not a full source archive. Use --keep to retain the exact temporary project/trial workspaces for manual replay.
  • Workspace manifests that changed between good and bad are reported as a warning; the baseline may then be unresolved.
  • Path dependencies outside the project directory are not copied.
  • The fresh-workspace boundary is filesystem isolation, not a security sandbox: test and prepare commands still run as the current user and can access the network, home directory and external services. Never expose production secrets to a CI job running whichdep.
  • Persistent resume is only as correct as the supplied Oracle and Closure fingerprints. External services, tool binaries changed in place, and environment inputs not captured by the caller may require --no-resume.
  • On Windows, symbolic links inside the project tree are rejected rather than followed; process-tree termination on timeout uses taskkill /T /F.

culpip (Python only, alpha), where-broke (npm, one library's versions), debbisect (Debian snapshots), lockvet (explains lockfile diffs, runs no tests), EnvCause (ddmin over .env).

See PLAN.md for the measurement plan and roadmap.

License

Apache-2.0

Metadata

Release files for whichdep 0.1.0

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

Source distribution (sdist)

Source distribution for whichdep 0.1.0
File Size Uploaded Provenance Actions
whichdep-0.1.0.tar.gz 133.4 kB With provenance Details for whichdep-0.1.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for whichdep 0.1.0
File Actions
whichdep-0.1.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for whichdep-0.1.0-py3-none-win_amd64.whl
whichdep-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for whichdep-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
whichdep-0.1.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for whichdep-0.1.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
whichdep-0.1.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for whichdep-0.1.0-py3-none-macosx_11_0_arm64.whl
whichdep-0.1.0-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for whichdep-0.1.0-py3-none-macosx_10_12_x86_64.whl

Total release size: 3.1 MB

Release files / whichdep-0.1.0.tar.gz

Download URL whichdep-0.1.0.tar.gz
Size 133.4 kB
Tags Source
SHA-256 checksum
How to use checksums
cb87812c82babde06cb906a2b98c07f09471c4c8d830158cc96ffdefdce61cdb
BLAKE2b-256 checksum
How to use checksums
2fbe78a0160098c8711fc2eb90e76955ecca1375dcc2d50690e1d55c9b1e93bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 24, 2026.

Transparency log

Release files / whichdep-0.1.0-py3-none-win_amd64.whl

Download URL whichdep-0.1.0-py3-none-win_amd64.whl
Size 584.6 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
ceca2e03cae2203cde5a80e19237f3bab18ec5a0651b441da70e95aebf7a84a3
BLAKE2b-256 checksum
How to use checksums
6f39f962f07b094a640bc30866a1537eaea3a18d4fea5893201a9494e705a155
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 24, 2026.

Transparency log

Release files / whichdep-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL whichdep-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 649.8 kB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
994f7454e0e6f7e9357635c78331d65c45038cc00c5ef998500241f5fcedc01c
BLAKE2b-256 checksum
How to use checksums
8daaeb9f4c22b94868f8a0429c957dfb39d11b41d39709dce1c58ed57922b4d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 24, 2026.

Transparency log

Release files / whichdep-0.1.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL whichdep-0.1.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 589.8 kB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
260b94b9112220fddd081f0055f290b31d681b4d3ac8ef264e30d29965068ea4
BLAKE2b-256 checksum
How to use checksums
2feadc1de371da84cadf6aa345df1a46fbe541e34cad5c11ed5e5a70001a7b00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 24, 2026.

Transparency log

Release files / whichdep-0.1.0-py3-none-macosx_11_0_arm64.whl

Download URL whichdep-0.1.0-py3-none-macosx_11_0_arm64.whl
Size 562.1 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
877f5d10591bdc95a541d70f4723aef6f11b27a4867c93c333120499b2720ce5
BLAKE2b-256 checksum
How to use checksums
4af80028729c1b1d58d2c1060bfc1c9d3eeae2515b96b8ad50f22b56c3d7b64a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 24, 2026.

Transparency log

Release files / whichdep-0.1.0-py3-none-macosx_10_12_x86_64.whl

Download URL whichdep-0.1.0-py3-none-macosx_10_12_x86_64.whl
Size 628.3 kB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
95aa1b69072f870c3f2fc9bfc64685dc1e9d7713638a2bb5ac73eb149bf560cd
BLAKE2b-256 checksum
How to use checksums
f76bdbe22a5d239531268a6554751e4f369439360f51b71affe37c4e1dda7770
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 24, 2026.

Transparency log

Security for whichdep 0.1.0

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.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for whichdep-0.1.0.tar.gz

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 Nov 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

6 release files Full provenance

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