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.
Metadata
Release files for devtrust-sts 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| devtrust_sts-0.0.3.tar.gz | 20.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| devtrust_sts-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 39.0 kB
Release files / devtrust_sts-0.0.3.tar.gz
| Download URL | devtrust_sts-0.0.3.tar.gz |
|---|---|
| Size | 20.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
085ec3e1990d5c7556ec4c8ee4ed6cee6001fbcf043279075f8fae0863c740e0
|
|
BLAKE2b-256 checksum How to use checksums |
9b870354becd1359b869c48814a83f5f568ef56caf364e2b37bd6536b1f2ec97
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 9, 2026.
Transparency logRelease files / devtrust_sts-0.0.3-py3-none-any.whl
| Download URL | devtrust_sts-0.0.3-py3-none-any.whl |
|---|---|
| Size | 18.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b489471665ba0dc7045d859e7a31fd1638a8efa3c9bc65c0dd2bbca8e8a51ce0
|
|
BLAKE2b-256 checksum How to use checksums |
35a3d8a3517db146afc49548e849cf5be5c84d4a2dc201c13c953c034f782d9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 9, 2026.
Transparency log