Skip to main content

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.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 swarmr-blame 1.0.0
File Size Uploaded
swarmr_blame-1.0.0.tar.gz 78.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for swarmr-blame 1.0.0
File Interpreter ABI Platform
swarmr_blame-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 140.6 kB

Release files / swarmr_blame-1.0.0.tar.gz

Download URL swarmr_blame-1.0.0.tar.gz
Size 78.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ad0b37a70a0878dddad5adeef5e9025cf94c200b3a4af2bdccde8dff9e2dc1f6
BLAKE2b-256 checksum
How to use checksums
54329135336f872339081671019896b04bdbda8717a5be1a7ce86ae6fe98ac16
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.0-py3-none-any.whl

Download URL swarmr_blame-1.0.0-py3-none-any.whl
Size 62.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ce3be1913d6c94e40648bd0538407049f14f25904f4bf4846867bcf4e0455bb
BLAKE2b-256 checksum
How to use checksums
a5ad0c1b0ea407f0fa14d1fa7314161f52f03e6c2b8eb24bda79e27c493e25b1
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 history Release notifications | RSS feed

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

This release

1.0.0 This release

2 release files

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