Skip to content

ci: skip unaffected jobs and add CI-esta reports - #508

Open
aviadr1 wants to merge 2 commits into
python-humanize:mainfrom
gigaverse-app:codex/ci-esta-humanize
Open

aviadr1 wants to merge 2 commits into
python-humanize:mainfrom
gigaverse-app:codex/ci-esta-humanize

Conversation

@aviadr1

@aviadr1 aviadr1 commented Nov 9, 2026 •

Copy link
Copy Markdown

Hi guys, I'm Aviad, maintainer of CI-esta and pytest-selective packages, and CTO of tapin.io
these packages are useful for projects where CI time is annoying. this is an outreach offer that will decrease CI times.
these tools are used by us everyday saving thousands of dollars each month in CI bills, so this isnt slop.
I appreciate humanize is a small library that isnt plagued much by CI times, but would be honored if you accept this PR.

if it helps, I have a fork of this repo where the PR is merged: https://github.com/gigaverse-app/humanize-pytest-selective/

Best,
Aviad

TLDR

Humanize runs its full compatibility matrix for documentation and tooling-only changes. This PR skips unaffected complete jobs with pytest-selective and adds CI-esta reports so the decisions and runner usage are visible. The existing 27-job Python/OS matrix, tox commands, coverage and Test successful check are preserved.

I benchmarked previous Humanize PRs before proposing this. Matched replays of a docs dependency update and a mypy update used 94.1% and 93.1% fewer core-workflow runner-seconds. A separate historical model estimates 26.7% lower usage across 19 PRs with five successful workflows, including planning and report overhead. Measured replays and estimates are separated below.

Existing action SHAs are unchanged. The new CI-esta and pytest-selective actions are pinned to the exact revisions used in the measured runs. No application runtime dependency is added.

Changes proposed in this pull request:

  • Select complete test, benchmark, package and routing jobs from their declared inputs. Keep lint and docs checks.
  • Retain full manual and weekly checkpoints, plus a test:full label override.
  • Reject failed planning, invalid decisions, failed jobs and unexpected skips at Test successful.
  • Add a read-only CI-esta observer with summaries and downloadable artifacts. It runs independently after Test, does not execute source PR code, and posts no comments.
  • Run benchmark tests in trial forks without uploading to the upstream CodSpeed account; preserve the upstream CodSpeed command and action SHA.
BEFORE
PR -> full Python/OS matrix + benchmark + package + lint + docs

AFTER
PR -> input plan -> affected complete jobs -> Test successful
                -> unaffected jobs skipped explicitly
                -> lint + docs retained
completed Test -> independent CI-esta report + artifacts

Measurements on real Humanize PRs

Each pair ran on an identical replay revision, with unchanged historical application code and the PR's original action SHAs. All five core workflows passed: Test, Benchmark, Release, Lint and Docs. All accepted runs are attempt 1. Lower runner usage is better.

Historical PR Full core runner-seconds Selected core runner-seconds Reduction Jobs full → selected Separate report seconds full / selected
#494: docs dependencies 1613 95 94.1% 36 → 7 15 / 10
#495: mypy update 1633 113 93.1% 36 → 8 11 / 11
#501: Turkish translation 1670 1585 5.1% 36 → 35 13 / 12
Exact replay revisions and elapsed times
PR Same replay head for both arms Test creation to successful gate, full → selected
#494 f94abc51d2c79afa864414a3d62359ef8f8d97b2 304s → 19s
#495 e09a48c359d68ed4f8f2189b105c41176454ca6e 293s → 39s
#501 b9064f43c9b978202ad7285d7b1bc35ef3ea168e 485s → 394s

Historical workload estimate

The sample contains 20 recent merged PRs from 16 September through 2 November 2026, selected by merge time from the 100 most recently updated closed PRs. Seven would skip the runtime matrix. Every sampled source change retains it.

Cohort Original observed runner-seconds Estimated candidate including reports Estimated reduction
19 PRs with five successful workflows 31,603 23,165.5 26.7%
All 20, including #435's failed benchmark 33,130 23,254 29.8%
Per-PR historical data and source runs
PR Retained lanes Original seconds Estimated candidate seconds Original Test run
#501 tests, benchmark, package 1892 1927.0 41497253715, attempt 2
#499 tests, benchmark, package, routing 1517 1566.5 41284940161, attempt 1
#494 none 1590 110.5 41257820554, attempt 2
#495 routing 1572 116.0 41257830275, attempt 2
#483 benchmark, routing 1620 143.0 40197931159, attempt 1
#482 tests, benchmark, routing 1607 1645.0 40197000419, attempt 1
#435 none 1527 88.5 39084699946, attempt 2
#410 package 1585 113.0 35782518080, attempt 2
#465 tests, benchmark, package 1784 1819.0 39643285767, attempt 2
#461 tests, benchmark, package 1774 1809.0 39417822505, attempt 2
#464 tests, benchmark, package 2084 2119.0 39471647729, attempt 2
#471 tests, benchmark, package 1891 1926.0 39771719558, attempt 2
#444 none 1673 121.5 37392712979, attempt 1
#440 tests, benchmark, package, routing 1578 1627.5 37146282621, attempt 1
#422 none 1517 86.5 36814887274, attempt 1
#421 tests, routing 1504 1481.0 36814877716, attempt 1
#295 tests, benchmark, package 1552 1587.0 28497194164, attempt 2
#346 tests, benchmark, package 1589 1624.0 28808853031, attempt 1
#402 tests, benchmark, package 1656 1691.0 35126593363, attempt 1
#381 tests, benchmark, package 1618 1653.0 35121695374, attempt 2

Checks and maintainer controls

Scenario Before After
Unreferenced documentation Full runtime matrix Runtime/benchmark/package/routing work skipped; docs and lint retained
Source, translations, tests or execution inputs Full affected checks Complete checks inside every affected job
Missing history or uncertain plan Full suite Full suite fallback; a failed planner also fails the required gate
Explicit full checkpoint Manual full suite Manual + weekly full suite; test:full applies on the next push/reopen
Required status Test successful Same name, validates explicit boolean decisions and prerequisite outcomes
Existing action refs SHA pins Identical SHA pins
Publishing Upstream-only publishing Same conditions; fork benchmarks execute without upstream upload

About the tooling

Disclosure: this contribution comes from the Gigaverse team, which maintains CI-esta and pytest-selective, and was prepared with Codex. CI-esta is open source under Apache-2.0 (license).

The underlying tooling has been used in Gigaverse's production CI for about five months across a Django monorepo and a Python microservices repository. It was extracted into the public packages more recently. The measured production history and approach are documented in Faster, cheaper CI: from the trenches.

The new refs are fixed to CI-esta 1.14.0 (b694847) and pytest-selective 1.4.0 (286d0ae), the revisions resolved by the benchmark runs. The routing-test dependency is also pinned to pytest-selective 1.4.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant