A pre-commit check for Python

Know what your change breaks before you commit it.

Magellan Lite maps your code from its syntax trees, finds exactly what a change touched, and runs a checklist built from real software disasters. One verdict: ok review block.

$ magellan-lite check
magellan-lite: BLOCK · 1 finding · 2 changes in 2 files

  changes
    body  smars.power_peg.power_peg  smars/power_peg.py:9
    body  smars.router.route         smars/router.py:7

  checklist
    [ ] HIGH     loop-without-progress  smars/power_peg.py:12
        the loop at line 12 can never end
        fix: make every path change what the
             condition reads, or leave the loop

The dangerous change is rarely the one you're looking at

$460M

in 45 minutes. Knight Capital's order router woke up code that a 2005 change had left unable to stop.

SEC Release 34-70694

8.5M

Windows machines crashed when a content update reached code that read one field past its input.

CrowdStrike root cause analysis, 2024

27 min

of global outage from one regular expression that took super-linear time on every server at once.

Cloudflare, July 2 2019

How it works

  1. 1 Map

    Every function, method, class and constant, named stably and hashed from its syntax tree. Reformatting, moving code or switching line endings is never a change.

  2. 2 Diff

    Compare with the last commit (or any baseline): what was added, removed, or had its signature, body or value changed.

  3. 3 Check

    Run the checklist on exactly what changed, so old problems elsewhere stay quiet. Each rule comes from a failure that really happened.

Famous failures, replayed change by change

Loading…

Regenerate with python demo/run.py. Ports of code that is not public say so. Static analysis: a clean report is not proof.

Try it

Run it

pip install -e .
magellan-lite check            # against your last commit
magellan-lite check --format json > report.json

Read a report

Open a report.json to see its verdict and checklist here.

Team

Brayton

Engine: map, diff, blast radius

Teammate

Checklist rules

Teammate

Developer experience