Skip to content
LucasXlabPublic

About

Estimate which files and tests a Git change may affect using static imports and co-change history. Offline CLI; suggestions require review.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

This page describes the public main branch and its 0.1 interface. Impact analysis is heuristic: it can miss affected files and cannot justify skipping other tests. Git is required; the setup below uses an isolated Python environment.

diffblast logo

diffblast

Estimate change impact before choosing which tests to run.

CI License Version Runtime Stars

English · 简体中文

Real CLI output on synthetic fixtures

The demo is captured from the real CLI using synthetic data. Transcript · regenerate with python3 scripts/demo.py.

Why

A small edit can affect files you never opened. diffblast combines local import relationships and Git co-change history to suggest where to look next.

Start with Good for Where diffblast helps
git diff See changed lines diffblast also estimates related files and tests.
Full test suite Validate behavior diffblast suggests review targets; it does not execute tests.

Quick start

git clone https://github.com/LucasXlab/diffblast.git
cd diffblast
python3 -m venv .venv
. .venv/bin/activate
python -m pip install .
python3 scripts/demo.py

Install from this checkout to use the reviewed source version. The installed tool has no third-party runtime dependencies; cloning and installation can require network access.

Features

Trace imports

Extract imports and includes from tracked files, then follow reverse dependency edges. Resolution is heuristic, not a compiler.

Use change history

Include files that repeatedly changed together. Disable this signal with --no-cochange.

Suggest tests

List impacted test files and source/test filename matches. Recommendations do not prove that other tests are safe to skip.

Export results

Print a terminal report, emit JSON, or write Markdown for review.

CLI result

Usage

Keep the environment active, enter your repository, and run diffblast --no-cochange. Check the changed-file list, then inspect the related source and candidate tests. Run the full suite when coverage is uncertain. --base main requires that ref locally; analysis does not fetch remote history.

diffblast --path /path/to/project --base main
diffblast --json
diffblast --md --out report.md
diffblast --no-cochange

Architecture

flowchart LR
A[Git diff and tracked files] --> B[Import graph]
A --> C[Co-change history]
B --> D[Reverse reachability]
C --> D
D --> E[Test suggestions and reports]
Loading

Privacy and limits

Reads the selected local repository and Git history. It makes no application network calls. Exported reports contain repository file paths; review them before sharing. See PRIVACY.md for data boundaries.

Development

python3 -m pip install -e ".[test]"
python3 -m pytest -q

The demo uses a temporary fixture and does not inspect your personal repositories or agent homes.

Roadmap

  • Improve import resolution across ecosystems.
  • Add documented CI recipes and structured output formats.

Contributing

Read CONTRIBUTING.md. Report reproducible problems in Issues. Follow SECURITY.md for sensitive reports.

License

MIT.

About

Estimate which files and tests a Git change may affect using static imports and co-change history. Offline CLI; suggestions require review.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages