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.2
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.2.tar.gz | 79.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| swarmr_blame-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 141.8 kB
Release files / swarmr_blame-1.0.2.tar.gz
| Download URL | swarmr_blame-1.0.2.tar.gz |
|---|---|
| Size | 79.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
49f22fae5f9b9557fc7c51dfcc6ac080b9fecea0c72e566c6df86a046284180d
|
|
BLAKE2b-256 checksum How to use checksums |
630ee24ce5537a9a2447d53e6697e910b311ddee30b2f9fd72cf929d31258d77
|
| 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.2-py3-none-any.whl
| Download URL | swarmr_blame-1.0.2-py3-none-any.whl |
|---|---|
| Size | 62.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bb4031c672b0cff679cae87a30903722fc7b214d7dbdfd139628849d7c0b2bf6
|
|
BLAKE2b-256 checksum How to use checksums |
e2272f3eef2dcb8a804e7ab3b5832c4e4e64550b904c17b78aec81482a66471b
|
| 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}
|