{"id":51441534,"url":"https://github.com/qltysh/stet","last_synced_at":"2026-07-05T12:01:44.138Z","repository":{"id":350930753,"uuid":"1208808592","full_name":"qltysh/stet","owner":"qltysh","description":"Run only the tests affected by your changes. Open-source selective test execution inspired by Stripe.","archived":false,"fork":false,"pushed_at":"2026-04-12T21:15:13.000Z","size":456,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-12T21:24:40.711Z","etag":null,"topics":["bun","ci","developer-tools","python","ruby","rust","selective-testing","test-selection","testing","typescript"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qltysh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-12T19:13:55.000Z","updated_at":"2026-04-12T21:15:16.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/qltysh/stet","commit_stats":null,"previous_names":["qltysh/stet"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/qltysh/stet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qltysh%2Fstet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qltysh%2Fstet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qltysh%2Fstet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qltysh%2Fstet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qltysh","download_url":"https://codeload.github.com/qltysh/stet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qltysh%2Fstet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35153109,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-05T02:00:06.290Z","response_time":100,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bun","ci","developer-tools","python","ruby","rust","selective-testing","test-selection","testing","typescript"],"created_at":"2026-07-05T12:01:40.686Z","updated_at":"2026-07-05T12:01:43.983Z","avatar_url":"https://github.com/qltysh.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stet\n\n*stet* — \"let it stand.\" A proofreading term meaning the original text is correct and should not be changed. In the same way, `stet` identifies the tests that can stand as-is, and reruns only the ones affected by your changes.\n\n`stet` is an open-source implementation of the selective test execution system described in Stripe's blog post [*Fast CI for a 50M-Line Ruby Monorepo*](https://stripe.dev/blog/selective-test-execution-at-stripe-fast-ci-for-a-50m-line-ruby-monorepo). It traces which files each test opens, builds a dependency graph, and uses it to select just the tests impacted by your code changes. It works with Ruby/Minitest, Python/Pytest, and Bun on macOS and Linux.\n\n\u003e **Research preview.** `stet` is functional and tested but is not yet battle-tested in production. APIs, config format, and on-disk storage may change without notice. Feedback and contributions are welcome.\n\n## How it works\n\n1. **Record** — `stet` runs your test suite with a shared library injected via `DYLD_INSERT_LIBRARIES` (macOS) or `LD_PRELOAD` (Linux) that intercepts file-open syscalls. This produces a map of which source files each test depends on.\n\n2. **Select** — When files change, `stet` diffs the repo inventory against the recorded dependency graph and identifies which tests are affected.\n\n3. **Run** — `stet` executes only the affected tests, re-traces their dependencies, and updates the dependency graph for next time. No full re-record needed.\n\n## Install\n\nUsing the [GitHub CLI](https://cli.github.com/):\n\n```bash\n# macOS (Apple Silicon)\ngh release download --repo qltysh/stet --pattern 'stet-aarch64-apple-darwin.tar.gz'\ntar xzf stet-aarch64-apple-darwin.tar.gz\n\n# Linux (x86_64)\ngh release download --repo qltysh/stet --pattern 'stet-x86_64-unknown-linux-gnu.tar.gz'\ntar xzf stet-x86_64-unknown-linux-gnu.tar.gz\n```\n\nThen add the extracted directory to your PATH. The archive contains both the `stet` binary and the `libstet_interceptor` library.\n\n### Build from source\n\nAlternatively, build from source with the [Rust toolchain](https://rustup.rs/):\n\n```bash\ngit clone https://github.com/qltysh/stet.git\ncd stet\nbash scripts/setup.sh\n```\n\n## Quick start\n\nRun `stet init` from your project root to auto-detect your test runner and generate a config:\n\n```bash\nstet init\n```\n\nThis scans your repo for dependency files (Gemfile, pyproject.toml, package.json/bun.lockb) and test directories, then writes a commented `stet.toml` with the right settings. Add `.stet/` to your `.gitignore`.\n\nThen record a baseline and start running:\n\n```bash\n# Record the baseline (runs your full test suite once with tracing)\nstet record\n\n# Make a code change, then run just the affected tests\nstet run\n```\n\n`stet init` accepts `--runner minitest|pytest|bun_test` to skip detection, `--force` to overwrite an existing config, and `--config \u003cPATH\u003e` for a custom output location.\n\n### Manual configuration\n\nIf you prefer to create `stet.toml` by hand:\n\n**Ruby/Minitest:**\n\n```toml\ntest_runner = \"minitest\"\ntest_globs = [\"test/**/*_test.rb\"]\ntest_args = [\"-Itest\"]\ninventory_excludes = [\".git/**\", \".stet/**\", \"tmp/**\"]\n```\n\n**Python/Pytest:**\n\n```toml\ntest_runner = \"pytest\"\ntest_globs = [\"tests/test_*.py\", \"tests/**/*_test.py\"]\ntest_args = [\"-m\", \"pytest\"]\ninventory_excludes = [\".git/**\", \".stet/**\", \"__pycache__/**\", \".pytest_cache/**\"]\n```\n\n**Bun:**\n\n```toml\ntest_runner = \"bun_test\"\ntest_globs = [\"test/**/*.test.ts\"]\ntest_args = [\"test\"]\ninventory_excludes = [\".git/**\", \".stet/**\", \"node_modules/**\"]\n```\n\n`state_dir` defaults to `.stet`. `runtime` is inferred from `test_runner` (`ruby`, `python3`, or `bun`) and resolved from PATH. Both can be overridden explicitly.\n\n`stet` looks for `stet.toml` in the current directory and auto-discovers the interceptor library next to its own binary. Use `--config` and `--interceptor` to override.\n\n## Commands\n\n### `stet init`\n\nAuto-detects the test runner from your repo contents and generates a commented `stet.toml`. Supports `--runner` to skip detection, `--force` to overwrite, and `--config` for a custom output path.\n\n### `stet record`\n\nRuns every test with tracing and publishes a new dependency baseline under `.stet/bases/`. Use this for initial setup or to force a full re-record.\n\n### `stet select`\n\nReads the latest baseline, diffs current file hashes against it, and outputs the list of affected test units. Doesn't run anything.\n\n### `stet run`\n\nSelects affected tests, runs them with tracing, and updates the baseline. If no baseline exists, bootstraps by running the full suite. This is the steady-state command for day-to-day development.\n\n## Advanced configuration\n\n### Mandatory tests\n\nTests that should always run regardless of what changed:\n\n```toml\nmandatory_test_globs = [\"test/health/**/*_test.rb\"]\n```\n\n### Root preload\n\nA script that runs before tests to generate shared artifacts (e.g., schema files). Changes to files opened by the root preload will select all tests:\n\n```toml\nroot_args = [\"-Itest\", \"test/root_preload.rb\"]\n```\n\n### Tool routes\n\nRun additional commands when specific files change:\n\n```toml\n[[tool_routes]]\nname = \"yaml-lint\"\nchanged_file_globs = [\"config/**/*.yml\"]\ncommand = [\"{runtime}\", \"script/changed_file_yaml_lint.rb\", \"{changed_files...}\"]\n```\n\n### Parallelism\n\n```toml\nmax_workers = 8  # defaults to available CPU cores\n```\n\n## Development\n\nTry the interactive demo:\n\n```bash\nbash scripts/demo-fixture.sh --fixture ruby\nbash scripts/demo-fixture.sh --fixture python\nbash scripts/demo-fixture.sh --fixture bun\n```\n\nRun the test suite:\n\n```bash\nbash scripts/setup.sh\ncargo test --workspace\n```\n\nRun clippy and format checks:\n\n```bash\ncargo clippy --workspace --all-targets -- -D warnings\ncargo fmt --check\n```\n\nBenchmark:\n\n```bash\nbash scripts/benchmark-fixture.sh --fixture ruby\nbash scripts/benchmark-fixture.sh --fixture python\nbash scripts/benchmark-fixture.sh --fixture bun\n```\n\nLinux validation (requires Docker):\n\n```bash\nbash scripts/validate-linux-docker.sh\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqltysh%2Fstet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqltysh%2Fstet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqltysh%2Fstet/lists"}