Smart Test Selector — given a code change, decide which tests must run.
Project description
Smart Test Selector (sts)
Given a PR diff, decide which tests must run, which should run, and which can safely skip.
sts is the Wave 1 revenue product of the DevTrust connected platform. It consumes the
codebase architecture model produced by Repo X-ray and applies
deterministic, repo-aware heuristics to select an effective subset of the test suite.
Why
CI pipelines run the entire test suite on every PR because nobody trusts "affected tests" detection. Builds take 30+ minutes. Developers ship less. The ROI is direct: minutes saved per PR × PRs per week × engineer cost. A measurable, real-money problem.
What v0.0.1 does
- Reads a list of changed files (from CLI args, a file, or unified diff).
- Identifies test files using framework patterns (pytest, jest/vitest, gotest, cargo).
- Classifies each test as must-run, should-run, or can-skip with a reason.
- Emits a JSON report (machine-consumable) and a terminal table (human-readable).
Heuristics in v0.0.1
- Manifest changed (pyproject.toml, package.json, Cargo.toml, go.mod, lockfiles) → run all tests. Dependency drift can break anything.
- A test file was directly modified → run that test.
- A non-test source file was modified → run sibling tests:
- Tests in the same directory.
- Tests matching naming conventions (
test_<name>.py,<name>.test.ts,<name>_test.go). - Tests in the corresponding
tests/subtree mirroringsrc/.
- No affected tests detected for a changed file → mark all tests
should-run(safe default; never silently skip on uncertainty).
Call-graph-aware affecting (which test transitively imports the changed module) lands in v0.1 once Repo X-ray v0.2 ships its call graph.
CLI
sts version
sts select --repo . # auto-detect changed files via git
sts select --repo . --changed src/foo.py src/bar.py
sts select --repo . --diff changes.diff
sts info --repo . # quick stats: how many tests, by framework
Output: a JSON report at .sts/selection.json and a terminal table.
Status
v0.0.1: alpha. Apache-2.0. See CHANGELOG.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file devtrust_sts-0.0.3.tar.gz.
File metadata
- Download URL: devtrust_sts-0.0.3.tar.gz
- Upload date:
- Size: 20.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
085ec3e1990d5c7556ec4c8ee4ed6cee6001fbcf043279075f8fae0863c740e0
|
|
| MD5 |
9d45bd148740146f1d14b11e54968a54
|
|
| BLAKE2b-256 |
9b870354becd1359b869c48814a83f5f568ef56caf364e2b37bd6536b1f2ec97
|
Provenance
The following attestation bundles were made for devtrust_sts-0.0.3.tar.gz:
Publisher:
release.yml on AbdullahBakir97/DevTrust
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
devtrust_sts-0.0.3.tar.gz -
Subject digest:
085ec3e1990d5c7556ec4c8ee4ed6cee6001fbcf043279075f8fae0863c740e0 - Sigstore transparency entry: 1486488822
- Sigstore integration time:
-
Permalink:
AbdullahBakir97/DevTrust@c6fc601fa074dc0135f1b9a7b5e46360ec1d9d4e -
Branch / Tag:
refs/tags/devtrust-sts-v0.0.3 - Owner: https://github.com/AbdullahBakir97
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c6fc601fa074dc0135f1b9a7b5e46360ec1d9d4e -
Trigger Event:
push
-
Statement type:
File details
Details for the file devtrust_sts-0.0.3-py3-none-any.whl.
File metadata
- Download URL: devtrust_sts-0.0.3-py3-none-any.whl
- Upload date:
- Size: 18.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b489471665ba0dc7045d859e7a31fd1638a8efa3c9bc65c0dd2bbca8e8a51ce0
|
|
| MD5 |
ed7ac8dc8c6dc8b4e693545bcfd81f93
|
|
| BLAKE2b-256 |
35a3d8a3517db146afc49548e849cf5be5c84d4a2dc201c13c953c034f782d9f
|
Provenance
The following attestation bundles were made for devtrust_sts-0.0.3-py3-none-any.whl:
Publisher:
release.yml on AbdullahBakir97/DevTrust
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
devtrust_sts-0.0.3-py3-none-any.whl -
Subject digest:
b489471665ba0dc7045d859e7a31fd1638a8efa3c9bc65c0dd2bbca8e8a51ce0 - Sigstore transparency entry: 1486488991
- Sigstore integration time:
-
Permalink:
AbdullahBakir97/DevTrust@c6fc601fa074dc0135f1b9a7b5e46360ec1d9d4e -
Branch / Tag:
refs/tags/devtrust-sts-v0.0.3 - Owner: https://github.com/AbdullahBakir97
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c6fc601fa074dc0135f1b9a7b5e46360ec1d9d4e -
Trigger Event:
push
-
Statement type: