v0.4.0 release notes · self-hosted (how to run the server) · Apache-2.0 license
Your CI runs every test. Your change reaches a few.
siftwise picks the tests a change can affect, from the diff, import graphs and per-test history, and runs the full suite when it can't be sure. Self-hosted, for teams with slow CI and for CI that coding agents keep busy.
uv tool install --upgrade siftwisePyPI · container image · install options
- 2,049 of 2,050 real failures caught replaying rdflib's CI; the one miss was a flaky test. proof for rdflib failures caught
- 28 of 28 planted bugs caught on ktlint (95% CI 87.9–100%). proof for ktlint planted bugs
# shop/cart.py changed; only the cart's tests import it $ siftwise select --repo demo/shop --base HEAD~1 > selected.sh siftwise: python imports: 1 test file(s) import changed modules siftwise: selective (2 of 4 known tests): 2 of 4 known tests selected $ cat selected.sh pytest tests/test_cart.py
Five real ktlint changes through the sieve
13 of 13 planted bugs caught in these selections (95% CI 77.2–100%) · source
Mutation eval: bugs planted on the lines each merged PR changed. Each change's history is one seeded full run at its base, so selection rests on the Java/Kotlin graph and test names alone.
Measured on real CI history
Every number links to how it was measured. Replays re-run real CI history with no peeking at later runs; they are labelled replay.
Failures caught
replay · RDFLib/rdflib
2,049/2,050
real failures caught in 39 failing PR runs; 140 of 141 in the runs that went selective. The miss: a flaky remote-service test.
how we measured the rdflib replay →replay · agent-substrate/substrate
38/39
failures caught in runs that went selective, with declared rules for its e2e and functional suites; 2,043 of 2,044 over all 72 failing PR runs.
how we measured the substrate replay →triage replay · substrate
319/319
new_regression verdicts that were real regressions; pre_existing 2,092 of 2,092. Regressions called flaky: 0 on rdflib, 5 on substrate.
Test time skipped high, middling and low, side by side
replay · quantumlib/Cirq
37.9%
over 132 merged PRs of a 9-package monorepo: 79.8% when only cirq-google changed, 20.2% for cirq-core, which everything imports.
how we measured the Cirq replay →live shadow mode · siftwise's own CI
14.7%
of 23.0 minutes of test time, over 32 shadow runs. No failures yet, so no recall from these runs.
how we measured siftwise on itself →replay · RDFLib/rdflib
0.6%
over 19 main commits, and that's correct: its package imports link almost every module to almost every test, so a safe selection runs about 99% of the suite.
how we measured rdflib savings →Savings follow package boundaries: changes to an isolated package skip most of the suite, changes to a hub module skip little.
| repo | caught | 95% CI |
|---|---|---|
| RDFLib/rdflib (pytest) | 26 of 26 | 87.1–100% |
| quantumlib/Cirq (pytest) | 63 of 63 | 94.3–100% |
| mobxjs/mobx (Jest) | 40 of 40 | 91.2–100% |
| ktlint/ktlint (Kotlin) | 28 of 28 | 87.9–100% |
| square/moshi (partial run) | 15 of 15 | 79.6–100% |
measured · rdflib, about 18,000 known tests
0.3–1.4 s
for /select to answer.
How it works
1 Select
The CLI diffs your branch and builds Go, Python, JS/TS (Jest), Java or Kotlin import graphs (supported languages) locally. The server returns the tests the change can affect, each with a reason, or the full suite when the diff, a build file or the history leaves any doubt.
2 Run
Your CI runs the command it prints, riskiest tests first. If the server is down, CI runs the full suite: siftwise fails open and never blocks a build unless you opt into
fail-on.3 Record
CI uploads JUnit XML. The server keeps per-test history in your Postgres and gives each failure a verdict (how verdicts are decided): new regression, already broken on main, flaky, or unknown. Shadow runs measure what a selection would have missed.
How the pieces fit: ARCHITECTURE.md
Integrate in your repo
From the README, pinned to v0.4.0. You need a running siftwise server and a write token for CI, a read token for agents.
GitHub Actions
Secrets SIFTWISE_URL and SIFTWISE_TOKEN. Check out with fetch-depth: 0. Use pull_request, never pull_request_target. Tested on ubuntu, macOS and Windows runners. The three actions at v0.4.0: select action.yml, record action.yml, rollup action.yml.
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
# ... set up Python and install, as above ...
- id: siftwise
uses: PramodBasavarajMenasi/siftwise/actions/select@v0.4.0
with:
server-url: ${{ secrets.SIFTWISE_URL }}
token: ${{ secrets.SIFTWISE_TOKEN }}
- name: Tests
env:
MODE: ${{ steps.siftwise.outputs.mode }}
COMMAND: ${{ steps.siftwise.outputs.command }}
JUNIT_DIR: ${{ steps.siftwise.outputs.junit-dir }}
run: |
if [ "$MODE" = selective ]; then
# Shell-quoted by siftwise; each pytest command writes its own report to JUNIT_DIR.
if [ -n "$COMMAND" ]; then eval "$COMMAND"; else echo "No tests affected."; fi
else
pytest --junitxml="$JUNIT_DIR/full.xml" # your normal full suite
fi
- if: always()
uses: PramodBasavarajMenasi/siftwise/actions/record@v0.4.0
with:
server-url: ${{ secrets.SIFTWISE_URL }}
token: ${{ secrets.SIFTWISE_TOKEN }}Full workflow in the README, with permissions and setup. Matrix builds, verdicts, fail-on, flaky tests and shadow mode: GitHub Action.
GitLab CI
Include the template by release tag and its SHA-256 (include:integrity, GitLab 17.9+), never a branch. Variables SIFTWISE_SERVER, SIFTWISE_TOKEN and SIFTWISE_GITLAB_TOKEN, masked and hidden. The template: gitlab/siftwise.gitlab-ci.yml at v0.4.0.
include:
- remote: https://raw.githubusercontent.com/PramodBasavarajMenasi/siftwise/v0.4.0/gitlab/siftwise.gitlab-ci.yml
integrity: sha256-<base64 SHA-256 of that file>
siftwise-select:
extends: .siftwise-select
test:
extends: .siftwise-record
image: python:3.12
script:
- pip install -r requirements.txt
- |
if [ "$SIFTWISE_MODE" = selective ]; then
# Shell-quoted by siftwise; each pytest command writes its report to .siftwise-ci/junit.
if [ -s "$SIFTWISE_COMMAND_FILE" ]; then sh "$SIFTWISE_COMMAND_FILE"; else echo "No tests affected."; fi
else
pytest --junitxml=.siftwise-ci/junit/full.xml # your full suite
fi
siftwise-rollup:
extends: .siftwise-rollupFull pipeline in the README, with the merge request rules, test reports, how to get the hash, tokens and forks.
MCP (coding agents)
Install with uv tool install --upgrade 'siftwise[mcp]'. Four tools: select_tests, triage_failure, explain and untested_changes. Give agents a read token. Tested with Claude Code, GitHub Copilot in VS Code, Cursor, Codex CLI and Gemini CLI.
claude mcp add siftwise --env SIFTWISE_SERVER=https://siftwise.example.com \
--env SIFTWISE_API_TOKEN=your-token -- siftwise mcp{
"mcpServers": {
"siftwise": {
"command": "siftwise",
"args": ["mcp"],
"env": {
"SIFTWISE_SERVER": "https://siftwise.example.com",
"SIFTWISE_API_TOKEN": "${SIFTWISE_API_TOKEN}"
}
}
}
}Before running tests, call the siftwise `select_tests` tool and run the command it returns.
When tests fail, call `triage_failure` before fixing anything: fix `new_regression` failures,
re-run `flaky` ones, and leave `pre_existing` ones (already failing on main).Configs for every client: docs/mcp-clients.md. The tools in detail: README, Coding agents.
Run it locally
From zero to a first selection in about 5 minutes on a small example project. You need Docker, git and uv. Bash; on Windows, use Git Bash or WSL. CI runs these blocks (quickstart.yml) on every change.
The five steps below as one bash block, exactly as the README has them. Paste into a terminal; nothing installs from this page.
The quickstart is bash and the README has no PowerShell version: on Windows, the README says to use Git Bash or WSL. This copies the same block. Paste into a terminal; nothing installs from this page.
Clone
shgit clone https://github.com/PramodBasavarajMenasi/siftwise.git cd siftwiseStart the server with Postgres
From the published image ghcr.io/pramodbasavarajmenasi/siftwise:0.4.0. The API token is a shared secret you choose; it goes in
.env.sh[ -f .env ] || echo "SIFTWISE_API_TOKEN=$(openssl rand -hex 32)" > .env docker compose up -d --wait # pulls the image, waits until both services are healthy curl -fsS http://localhost:8000/healthz # {"status":"ok"}Install the CLI
siftwise on PyPI; the light install, without the server's dependencies.
shuv tool install --upgrade siftwise # or: pip install -U siftwise export SIFTWISE_API_TOKEN=$(sed -n 's/^SIFTWISE_API_TOKEN=//p' .env)Record a first run
shdemo="$(mktemp -d)/shop" && cp -r examples/quickstart "$demo" && cd "$demo" git init -q && git add -A && git commit -qm "A shop" uv run pytest -q --junitxml=junit.xml siftwise record junit.xml --repo demo/shop --branch main --mainChange a file and ask what to run
shop/cart.pychanges; only the cart's tests import it.shecho "# reviewed the bulk discount" >> shop/cart.py && git commit -qam "Touch the cart" siftwise select --repo demo/shop --base HEAD~1 > selected.sh cat selected.sh # pytest tests/test_cart.py uv run sh selected.shstderrsiftwise: python imports: 1 test file(s) import changed modules siftwise: selective (2 of 4 known tests): 2 of 4 known tests selected
docker compose down stops the server (down -v also deletes its data). Full quickstart: README
In v0.4.0
- Five languages
- Selection for Python (pytest), Go, JS/TS (Jest), Java and Kotlin (Maven, Gradle), from static import graphs: no test instrumentation.
- GitHub Action
- Select, record and rollup steps, tested on ubuntu, macOS and Windows runners. One sticky PR comment with the selection and each failure's verdict.
- GitLab CI template
- The same steps as hidden jobs, included by release tag and SHA-256, with one sticky merge request note.
- MCP tools for coding agents
select_tests,triage_failure,explain, anduntested_changes: the changed files no test links to, with the nearest test file to extend.- Dashboard and CI numbers
- Read-only, no JavaScript: what siftwise selected in each CI run, recall from shadow runs, test time saved, flaky tests. Off unless you turn it on.
- Scoped tokens
- Per-repo tokens,
readorwrite. The server stores only their SHA-256; there is no API to make them. - Flaky tests
siftwise flakylists tests that failed and passed on one commit;known_flakyentries can expire;rerun-unknownre-runs unclear failures.- Time budgets
- Run the highest-risk tests whose estimated time fits a budget, and say what was left out. An estimate, not a hard cap.
- Data retention
siftwise server prune, orSIFTWISE_RETENTION_DAYSfor a daily prune, keeping what selection and triage still read.
Everything in this release: CHANGELOG, 0.4.0 · release v0.4.0
The dashboard
Read-only and server-rendered, off unless you turn it on. These screenshots show replayed CI history of public repos, loaded into siftwise; each caption says which build took it.
Why siftwise, and where it stops
- Self-hosted. Your server, your Postgres: your test history stays with you. No test instrumentation.
- Apache-2.0. Open source, with no account or hosted service in between.
- Fails open. If siftwise is down or unsure, the full suite runs. Only
fail-on, which you opt into, can fail a build. - Measured, with the method published. Replays, mutation evals, and shadow mode to measure recall on your own CI before you rely on it.
Known limits
- Recall comes only from shadow runs: a selective run can't see what it skipped.
- "Linked" is not line coverage. A dependency no import graph sees, such as a binary an e2e suite drives, needs a declared
[[depends]]rule. - Hub modules keep selections wide: a package
__init__.pythat imports everything links every module to every test (why). - Some JVM builds run the full suite: Groovy, Scala, Kotlin Multiplatform, kapt/KSP, Android.
Links
- GitHubsource, issues, releases
- PyPI
siftwise - Container image
ghcr.io/pramodbasavarajmenasi/siftwise:0.4.0 - READMEsetup and reference
- Changelogwhat changed in each release
- Eval resultsevery number on this page
- Eval methodologyhow they're measured
- Architecturehow the pieces fit
- Release v0.4.0notes and assets
- GitHub Actions
actions/at v0.4.0 - GitLab template
gitlab/at v0.4.0 - Known limitswhat it can't do
- Security policyreport a vulnerability
- Contributingdev setup and checks
- LicenseApache-2.0
About
Built by Pramod Basavaraj Menasi.
siftwise is feature-complete as of v0.4.0 and maintained for bug and security fixes. Contributions are welcome: see the good first issues and CONTRIBUTING.md. Security issues: report privately as SECURITY.md describes.
- emailpramodmenasi@gmail.com
- linkedinpramod-basavaraj-menasi
- githubPramodBasavarajMenasi