Behavioral merge gate for AI code: mutation-tests your diff before merge.
562
mancube/mergestro-gate)A behavioral merge gate for AI-generated code — it mutation-tests your diff and blocks merges whose new code isn't actually covered by tests.
LLM-written code compiles, looks plausible, and ships with tests that assert nothing. Mergestro Gate runs differential mutation testing on the changed lines: it mutates your diff, reruns the suite, and any mutant that survives is a line your tests don't really check. It also runs static slop, security, and convention lanes over the same diff. One verdict, gate-able in CI.
mancube/mergestro-gate — slop-gate CLI on Alpine, with the Rust toolchain (from rust:1-alpine) + cargo-mutants baked in, so the mutation gate runs fully in-container (no toolchain to wire up). ~280 MB compressed.linux/amd64 + linux/arm64 (multi-arch manifest) · Runs as: nonroot (uid 65532)/usr/local/bin/slop-gate (entrypoint) · Workdir / mount point: /workMergestro Gate is the merge gate of a code-review pipeline: it sits between a PR (a diff plus its CI checks) and the protected branch, and decides whether the change earns the merge. It owns the "is this diff actually tested?" verdict and nothing else — no queue, no webhook, no long-running service.
UPSTREAM MERGESTRO GATE DOWNSTREAM
(a PR + its checks) (this image) (branch protection)
┌──────────────┐
│ AI agent / │ opens PR ─┐
│ developer │ │
└──────────────┘ │ ┌───────────────────┐
┌──────────────┐ │ │ slop-gate │ PASS ┌─────────────┐
│ Git host │ diff + ├─▶ │ mutate the diff · │──────▶ │ protected │
│ GitHub/GitLab│ base ref ─┤ │ re-run the suite ·│ merge │ branch │
└──────────────┘ │ │ static lanes → │ └─────────────┘
┌──────────────┐ │ │ one verdict │
│ CI · the │ suite ────┘ └────────┬──────────┘
│ suite runs │ │ BLOCK · exit 2
└──────────────┘ └─▶ PR comment → author / agent
base→head, mutation-tests the changed lines,
runs the static lanes (slop / security / convention / debt), and reduces it all
to one verdict: exit 0 pass, exit 2 block.2 on a
required check) holds the protected branch and posts a survivor PR comment
back to the author or generating agent.| Tag | Notes |
|---|---|
latest | newest release |
0.6.1 | pinned version (= current latest) |
0.6 | latest 0.6.x |
0.5 | latest 0.5.x |
Pin a version in CI: mancube/mergestro-gate:0.6.1.
--test-workspace restores whole-workspace tests).--budget 10m — a wall-clock limit on the mutation run; unfinished
mutants are reported as not tested, never as caught or surviving
(--block-on-budget to make that block).--sarif out.sarif — findings as SARIF 2.1.0 for code scanning.--block-on-pattern weakened-tests to block).--comment-inline also posts survivors on their line (GitHub).--shard k/n + slop-gate merge-reports — split a large run across CI
jobs and publish one verdict.Details and examples: the 0.6.0 feature guide.
slop-gate — the gate CLI (entrypoint).cargo + rustc + cargo-mutants — the Rust mutation engine compiles
and tests each mutant, so it needs a toolchain at run time. Baked in.git — merge-base / diff against the base ref.The non-Rust engines (Python / JS / Go / JVM) are advisory PoCs and are not bundled — add their toolchains yourself if you need them.
The container's workdir is /work — mount your repo there. It must be a git
checkout with the base ref fetched (e.g. git fetch origin main).
# Behavioral gate over the working tree's diff vs origin/main:
docker run --rm -v "$PWD:/work" mancube/mergestro-gate:0.6.1 \
--repo /work --base origin/main
# Predict the mutant workload first, without building/testing (fast):
docker run --rm -v "$PWD:/work" mancube/mergestro-gate:0.6.1 \
estimate --repo /work --base origin/main
# Summarise telemetry from prior runs (--metrics-file output):
docker run --rm -v "$PWD:/work" mancube/mergestro-gate:0.6.1 \
analyze --metrics-file /work/slop-gate-metrics.jsonl
# Help / version:
docker run --rm mancube/mergestro-gate:0.6.1 --help
The gate compiles + tests every mutant in your diff, so wall-clock scales with diff size × suite time. Use
estimateto size a run before committing to it.
Prefer your own toolchained image? Copy the binary in and bring your own
cargo-mutants:
FROM rust:1-bookworm
COPY --from=mancube/mergestro-gate:0.6.1 /usr/local/bin/slop-gate /usr/local/bin/slop-gate
RUN cargo install cargo-mutants
ENTRYPOINT ["slop-gate"]
Every release is published for linux/amd64 and linux/arm64 under one
multi-arch manifest, so docker pull picks the right one for the host (x86-64
runners, Apple Silicon, Graviton). Each architecture is built natively, not
under emulation.
For GitHub Actions, the Mergestro Gate Action is simpler than wiring this image into a job (it runs on a toolchained runner). Use this image for local runs, non-GitHub CI, and as a self-contained gate environment.
Content type
Image
Digest
sha256:0891b5818…
Size
291.6 MB
Last updated
about 1 month ago
docker pull mancube/mergestro-gate