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 siftwise
~/shopthe README quickstart, step 4
# 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.

how we measured triage →

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.

Planted bugs (mutants) on lines real PRs changed, caught by the selection how we measured mutation recall →
repocaught95% CI
RDFLib/rdflib (pytest)26 of 2687.1–100%
quantumlib/Cirq (pytest)63 of 6394.3–100%
mobxjs/mobx (Jest)40 of 4091.2–100%
ktlint/ktlint (Kotlin)28 of 2887.9–100%
square/moshi (partial run)15 of 1579.6–100%

measured · rdflib, about 18,000 known tests

0.3–1.4 s

for /select to answer.

how we measured select speed →

How it works

A change goes to step 1, select, which asks the siftwise server for the tests the change can reach. Step 2 runs those tests, riskiest first. Step 3 records the JUnit results on the server, which keeps per-test history in Postgres. That history feeds the next selection. If siftwise isn't sure, or isn't reachable, the full suite runs. a change PR or agent branch 1select diff + import graph,tests with reasons 2run the command it prints,riskiest tests first 3record JUnit upload, verdicts,shadow comparison siftwise server per-test history in your Postgres history not sure, or server down? the full suite runs
  1. 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. 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. 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.

.github/workflows/ci.yml, the essential steps
    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.

.gitlab-ci.yml, the essential jobs
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-rollup

Full 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 Code
claude mcp add siftwise --env SIFTWISE_SERVER=https://siftwise.example.com \
    --env SIFTWISE_API_TOKEN=your-token -- siftwise mcp
or a project .mcp.json
{
  "mcpServers": {
    "siftwise": {
      "command": "siftwise",
      "args": ["mcp"],
      "env": {
        "SIFTWISE_SERVER": "https://siftwise.example.com",
        "SIFTWISE_API_TOKEN": "${SIFTWISE_API_TOKEN}"
      }
    }
  }
}
then in AGENTS.md or CLAUDE.md
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.

  1. Clone

    sh
    git clone https://github.com/PramodBasavarajMenasi/siftwise.git
    cd siftwise
  2. Start 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"}
  3. Install the CLI

    siftwise on PyPI; the light install, without the server's dependencies.

    sh
    uv tool install --upgrade siftwise      # or: pip install -U siftwise
    export SIFTWISE_API_TOKEN=$(sed -n 's/^SIFTWISE_API_TOKEN=//p' .env)
  4. Record a first run

    sh
    demo="$(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 --main
  5. Change a file and ask what to run

    shop/cart.py changes; only the cart's tests import it.

    sh
    echo "# 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.sh
    stderr
    siftwise: 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, and untested_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, read or write. The server stores only their SHA-256; there is no API to make them.
Flaky tests
siftwise flaky lists tests that failed and passed on one commit; known_flaky entries can expire; rerun-unknown re-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, or SIFTWISE_RETENTION_DAYS for 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.

Part of a CI run page for agent-substrate/substrate. What siftwise did: a shadow run in which siftwise would have run 637 of 7,487 tests in history; test time not estimated at select time, measured 5.0 minutes; no time budget; default order; 6 changed files. The first three of five highest-risk tests, each with why it was ranked there (a direct or indirect link, failed less than a day before) and why it was selected, its reasons grouped by Go package. The shadow run: would have run 169 of the 2,144 tests that ran here, 71.8% of 5.0 minutes saved (measured), 5 failing, 5 caught, 0 missed. Links to the full page.
What siftwise did in one CI run: the selection, its highest-risk tests and why (the first 3 of 5 shown), and the shadow comparison. siftwise 0.4 development build, replayed history
The overview page for a replayed copy of RDFLib/rdflib's CI, all history: selections recorded for 40 of 190 CI runs, selective runs 42% (17 of 40), full-suite runs by reason, median share of tests selected 99.3%, test time saved marked too few runs for a reliable figure, and 111 failures in selective runs, all 111 in the selection.
CI numbers for a repo: selective and full-suite runs, the reasons, time saved and failures in selective runs. siftwise 0.4 development build, replayed history
A CI run page on main for agent-substrate/substrate: 3 variants, 6 failing tests, all six with the verdict pre-existing at high confidence, each with its reason, such as failing on main on e2e-agentgateway since 4621338 (19 main runs). A CI run page on main for agent-substrate/substrate: 3 variants, 6 failing tests, all six with the verdict pre-existing at high confidence, each with its reason, such as failing on main on e2e-agentgateway since 4621338 (19 main runs).
A run's verdicts: six failures already broken on main, each with its evidence. siftwise 0.4.0 release, replayed history

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__.py that imports everything links every module to every test (why).
  • Some JVM builds run the full suite: Groovy, Scala, Kotlin Multiplatform, kapt/KSP, Android.

All known limits

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.