swarmr-blame
Git archaeology team for swarmr. Given a command whose exit code says whether a test passes, finds the commit that first broke it and proves the cause.
Non-mutating to your checkout: every test runs in a git worktree under a
scratch directory with a scrubbed environment, and the worktree is removed when
the run ends. Nothing about the repository is hardcoded — the team profiles it
at startup and injects what it found into every prompt.
Install
Core and this team must land in the same environment.
uv tool install "swarmr[blame]"
That exposes teams and teams-mcp on your PATH; this team ships no command of
its own. From a checkout: uv tool install ../swarmr --with ../swarmr-blame.
teams --target repo_forensics --repo /path/to/checkout --test "<command>"
teams repo_forensics --repo /path/to/checkout --test "<command>" --setup "<command>" \
"the checkout test fails on main since this week"
Over MCP the tool is start_repo_forensics(request, repo, test, setup?).
The oracle
The team does not know what a test is, and does not need to. test is run from
the root of a scratch worktree at each commit, the way git bisect run has
always asked for one: exit 0 is a pass, anything else is a fail. setup, when
given, runs once per worktree and again whenever a lockfile changes between
refs. Any language, any runner — a script you write that checks the symptom is
a test.
The oracle has five answers, and they are distinct on purpose. pass is exit 0
and fail anything else. absent means a file the command names does not
exist at that commit, which is never evidence of breakage. unbuildable means
setup failed, the command is not on PATH, or it exited 125 — git bisect run's
"cannot judge", which a wrapper script can use to skip a commit. timeout means
the run exceeded BLAME_ORACLE_TIMEOUT.
Only commits are tested; an uncommitted edit has no commit to blame and is
reported as a dirty working tree. If the command cannot run at all the report
says unrunnable, with the tool's own output, instead of inventing a verdict
about history. An MCP server inherits the environment of whatever launched it,
so the toolchain test needs must be on its PATH.
Arguments
Per call, as --flags on the CLI or arguments of the MCP tool. Nothing about
the target comes from the environment: a process serving several callers cannot
have one repository.
repo is the checkout to investigate — required, must be the repository root,
never modified. test is the command whose exit code is the verdict — required,
split with shlex, never a shell. setup is optional and runs once per
worktree and after every lockfile change.
Tuning: BLAME_PASS_ENV (comma-separated variables passed through to the
commands; credentials under $HOME are otherwise invisible), BLAME_ORACLE_TIMEOUT
(seconds per test run, default 120), BLAME_INSTALL_TIMEOUT (seconds per setup
run, default 300), BLAME_CACHE_TTL (history reads memoised, default 300; oracle
runs are never cached). Model credentials come from swarmr (KIMI_*).
There is no network isolation: a test that reaches the network can. Running the team inside a container is the stronger boundary; this package does not provide one. The report names a location, never a fix.
Design notes and internals: CLAUDE.md.
Metadata
Release files for swarmr-blame 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| swarmr_blame-1.0.1.tar.gz | 78.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| swarmr_blame-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 140.7 kB
Release files / swarmr_blame-1.0.1.tar.gz
| Download URL | swarmr_blame-1.0.1.tar.gz |
|---|---|
| Size | 78.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
32f839036fe6f020a50de6160d0ff3c3213f84bf2eee7e82acf94b24cb16a337
|
|
BLAKE2b-256 checksum How to use checksums |
8e231fba19db8ba4bf2a66e8a6b026314901d291895642ca2ae88d27852950ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / swarmr_blame-1.0.1-py3-none-any.whl
| Download URL | swarmr_blame-1.0.1-py3-none-any.whl |
|---|---|
| Size | 62.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5ff4cf6dd629d20c2358d1a704d4fd047f07ca7fcac07265a3684b58e6833190
|
|
BLAKE2b-256 checksum How to use checksums |
f12f3b3ad29216469831db3b3b94717c9e67c502308f0648eae36eb5d2d63d06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|