Skip to main content

CI-esta: Let proven work rest. Measure the rest.

CI-esta

Get a 10× shorter test gate when most tests are unrelated to a change. In our Django monorepo, PRs reached the test gate in 5.1 minutes against an estimated 52 minutes for the full suite on one runner. Across the two backend repos, billed minutes per merged PR fell from 285 to 163. Cost per merged PR per 1,000 tests fell 29% in the monorepo and 38% in microservices. Read the measurements.

  • Select affected tests. Follow each change through Python or Bun dependencies to the tests that exercise it.
  • Reuse passing checks. When a prior successful run proves the same inputs and scope, carry its result forward.
  • Plan reusable lanes. A lane is a named group of checks, such as unit tests or integration tests, that CI can run, skip or reuse independently.
  • Cache dependencies. Restore a matching environment, validate it and synchronize it with the lockfile.
  • Balance shards automatically. Use timings from successful runs to distribute slow tests across parallel workers.
  • See what saved time. The PR report shows the jobs that held up the gate and the total runner time they consumed. Full checkpoints still exercise the whole suite.

Set it up with your coding agent. Give Claude Code, Codex, Cursor or any coding agent in your repository this one prompt:

Set up CI-esta in this repository. Fetch https://ci-esta.readthedocs.io/en/latest/agent-setup.md and follow it.

The agent checks your repository's conventions (required check, action pinning, AI policy, tox/nox/uv), measures completed runs, enables affected-test selection by default, and implements the requested adoption scope. For full adoption it tracks every applicable capability through verification. It preserves the complete test inventory, proves selection with successful same-head full and selected controls and a failing gate probe, and opens a draft pull request. Merging, required checks, runner groups and secrets stay with you. To do it by hand, start with the quickstart or measure your first run.

See the selection and evidence policy for the scenario map, tested Git identities, reruns and Python/JavaScript setup.

Documentation

Read the documentation · Related tools

See what holds up your PR, avoid repeating validated work, and run the remaining tests efficiently. CI-esta adds reports, environment caching, reusable execution evidence and test scheduling to your existing GitHub Actions workflows. No account, hosted service or application-language change is required.

CI PyPI Apache-2.0

Choose your first improvement

Use the adoption tutorial and checklist to choose an order, verify each improvement and find every action/CLI capability. Run ci-esta adoption --root . for a read-only inventory with source-linked suggestions. It helps find gaps; successful hosted runs and measurements verify whether an integration is useful.

Your problem What you gain Start here
You need to show whether an optimization helped Verified before/after gate, runner and step comparisons tied to exact source runs Measured impact
You cannot tell what keeps a PR waiting A sticky report with gate latency, dependency critical path, step timings and runner usage Report one workflow
Jobs reinstall the same dependencies A validated environment restore that repairs broken caches and always synchronizes the lock Replace your setup steps
Unaffected tests start expensive services Python file or whole-job selection before setup, with explanations Add pytest-selective
A new revision repeats work that already passed Reuse a matching completed lane, including a passing lane from a workflow where another lane failed Evidence reuse
One test shard keeps everyone waiting Learn file costs from JUnit; balance work inside one larger runner, across runners, or both Runnable shard recipe
Missing shard results could look green Verify completion receipts and require every planned pool before passing the gate Completion and gates
Tests hang or use less CPU than expected Process/thread diagnostics, cgroup limits and live shard progress Runner diagnostics

Start with one action

In an existing uv test job, keep checkout and your test command. Replace Python setup, uv setup and dependency installation with:

- uses: actions/checkout@v7
- uses: gigaverse-app/ci-esta/actions/setup-cached-uv@v1
  with:
    python-version: '3.12'
    sync-args: '--group test'
- run: uv run --no-sync pytest

Use your project's interpreter and dependency groups. Every action lives under actions/NAME. Use gigaverse-app/ci-esta/actions/ci-observability@v1 for reports.

Use actions/NAME@v1 for automatic Actions API upgrades. That alias is independent of Python package versions. Older .github/actions/NAME and top-level named callers must migrate to actions/NAME; each action has one implementation. Action API and versioning.

Copy the complete reporting or cache workflow. The actions set up their own tools; using them does not require adding CI-esta to your app. For Python execution commands and plugins, install ci-esta[pytest] in the test environment. Reporting and evidence actions also work with non-Python projects; Bun users have a native selection adapter.

Agent setup in depth

The one prompt above fetches the agent setup procedure, published byte for byte at agent-setup.md with an llms.txt index. To install it as a skill instead, see agent skill installation. Updating the Python package does not update an installed agent skill.

Results you can inspect

Change Observed result Evidence
Route a README change with pytest-selective 627 → 48 runner-seconds; 211 → 26 seconds elapsed Matched selection runs
Optimize a full conformance suite's execution Required gate 538 → 282 seconds, retaining all 982 integration cases per variant and validators Full execution comparison
Remove Windows Git startup overhead Full gate 249 → 185 seconds with existing cases, platform matrix and coverage retained Fresh control and raw reports

These are scenario-specific observations. Selection savings belong to pytest-selective and the consumer's declared inputs; they are not receipt-reuse savings. Runner-seconds are summed execution, not a billing invoice. Measure your own cold/warm setup, full/selected runs and runner layouts before claiming a gain.

How the safeguards fit

A duration estimate changes where a test runs, never whether it belongs in the plan. An environment cache accelerates setup; locked synchronization still runs. A completion receipt can justify reusing the same declared work, but an old green workflow alone cannot. Missing or contradictory proof executes the work again. Explicit reruns and scheduled full checks retain their meaning.

Input declarations, service isolation and conformance requirements belong to your project. Evidence reuse and strict gates explain these boundaries. The optimization guide connects selection, timing feedback, execution and measurement in order.

Further documentation

Install the CLI with uv tool install --upgrade --refresh 'ci-esta[selection]>=1.11,<2' (Python 3.11+); --refresh lets uv see a release published in the last few minutes, and ci-esta --version confirms which release is on PATH. Base reporting alone (pip install ci-esta) needs neither pytest nor pytest-selective. For fixtures, schemas, source scanners, and subprocess helpers, follow the pytest-selective sidecar tutorial. Declare inputs at their readers so unrelated documentation does not select tests.

Use ci-esta[selection] for Python selection reports or ci-esta[pytest] for pytest execution tools. Before 1.0, review each minor release's migration notes.

Test execution profiles

Separate affected work from special-occasion execution with test execution policy. The JSON planner works with pytest, Bun, Playwright and custom runners; resource resolution is optional.

New policy adopters can declare work directly in plan-test-policy without a policy file. CI-esta provides ordinary, full, weekly, smoke, performance and probe defaults. Optional configuration contains only exceptional metadata and profile overrides; existing selectors remain authoritative for work IDs.

dry-lint in gigaverse-app/ci-esta: new duplicates kept out of its pull requests, 20 old duplicates cleaned up, 0 remaining

Reviewed duplication debt · Counts from the committed baselines.

Accepted pairs Remaining Retired Dismissed
Functions 0 20 0
Models Not initialized — —

Accepted backlog · Weekly audit

Retired means a side was removed, or (functions only) the judge now finds the pair separate. It is not a count of refactors. Dismissals stay separate; an uninitialized model baseline is unknown.

Model-connected evidence checks

The merged-PR evidence contract replays a Quint lifecycle model through the actual collector and timing store.

What pytest-quint-connect's contracts caught in gigaverse-app/ci-esta's pull requests

Quint contracts: 1 contract passed · 106 histories · 3/3 mutants caught

✅ 1 contract · 110/110 cases · 3/3 mutants caught · 106 histories
Contract Cases passed Mutants caught
✅ merged-pr-evidence merged_pr/test_merged_pr_contract.py::test_merged_pr
106 histories (6 witnesses, 100 samples, seed 17) · every action covered · Quint 0.33.1
110/110 3/3
🧪 3 mutants (planted fake bugs), all caught
Contract Mutant What it breaks Caught by At
merged-pr-evidence open-admission Admit an unmerged PR as though it merged after validation witness-contractOpenTest
samples: 1/100 diverge
state 5, after stage()
merged-pr-evidence older-green Select the oldest successful run instead of the last admitted run witness-contractLastTest
samples: 0/100 diverge
state 7, after stage()
merged-pr-evidence dropped-publication Lose the admitted observation during history publication witness-contractRecoveryTest
samples: 0/100 diverge
state 11, after publish()
What merged-pr-evidence says

Actions, and the code each one drives:

  • init: New HTTP boundary and real collector/history
  • push: GitHub changes PR head
  • start: GitHub admits a producer run
  • passGate: GitHub records successful gate completion
  • finish: GitHub completes producer
  • upload: GitHub exposes measured-only artifact
  • expire: GitHub expires artifact
  • closePR: GitHub closes without merging
  • merge: GitHub records merge cutoff
  • stage: MergedPRTimingCollector.stage
  • publish: publish_promotion
  • crash: Discard local staging; keep published history
  • inspect: Read staged source and published observations without mutation
  • automatic: Use automatic discovery with whole-workflow completion before merge

Invariant safety, checked while sampling histories.

Witnesses, scenarios replayed exactly as written: contractRecoveryTest, contractOpenTest, contractLastTest, contractInvalidTest, contractAutomaticTest, contractAutomaticLateTest.

Bounds: seed 17 · max_samples 500 · max_steps 35 · n_traces 100.

Witness contractRecoveryTest, step by step: the observation the model starts from, then what it expects each action to change.

State Action Model expects
0 init() { published: Set(), staged: 0 }
1 start() unchanged
2 passGate(r=1) unchanged
3 merge() unchanged
4 stage() unchanged
5 finish(r=1, value='success') unchanged
6 upload(r=1, value='valid') unchanged
7 stage() staged: 0 → 1
8 crash() staged: 1 → 0
9 stage() staged: 0 → 1
10 expire(r=1) unchanged
11 publish() published: Set() → Set(1)
12 publish() unchanged
13 inspect() unchanged

Generated by pytest-quint-connect from contract receipts; what a passing run proves.

Metadata

Release files for ci-esta 1.21.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ci-esta 1.21.0
File Size Uploaded Provenance Actions
ci_esta-1.21.0.tar.gz 1.2 MB With provenance Details for ci_esta-1.21.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ci-esta 1.21.0
File Interpreter ABI Platform Actions
ci_esta-1.21.0-py3-none-any.whl Python 3 none any Details for ci_esta-1.21.0-py3-none-any.whl

Total release size: 1.7 MB

Release files / ci_esta-1.21.0.tar.gz

Download URL ci_esta-1.21.0.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
d446ecf1cbb1ce30bd14648bd09be2d3a10767b495c78db621d644fe0db1e10a
BLAKE2b-256 checksum
How to use checksums
157eec6276a9cf23e79824ad8eabf74913bffef546702c9209acc47e7176c3e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 18, 2026.

Transparency log

Release files / ci_esta-1.21.0-py3-none-any.whl

Download URL ci_esta-1.21.0-py3-none-any.whl
Size 477.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9a87af376d4c2a889fb57be07c6eccb7ab8163db60829490280fa6e80c4f1889
BLAKE2b-256 checksum
How to use checksums
4f20a8b47f442e4c0f126fb44bf88514015ac4eee42c332cec2122291de8cdfd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 18, 2026.

Transparency log

Security for ci-esta 1.21.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ci_esta-1.21.0.tar.gz

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 Nov 18, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.21.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page