Don't run on main what the pull request just passed.
Ichnos skips CI work whose inputs did not change. There is no path filter to write and none to keep up to date: it looks at what your commands actually read.
The run on main after a merge
Four repositories, drawn to the same scale. Grey: before. Red: with Ichnos.
-
grafteverything skipped6.0 min17 s
-
ai-running-coacheverything skipped3 to 11 min18 s
-
ai-nutrition-coachimage build still runs5.9 min3.7 min
-
leanproxy-mcp, linttests still run for coverage2.5 min30 s
A command that passed is not run again while everything it read is unchanged.
That is the whole rule. Nobody lists paths, and no map of dependencies has to be learnt or refreshed.
What a command read is its footprint. ἴχνος, ichnos, is the Greek word for one. A footprint is checked against the files git can see; ignored files are build outputs, not inputs.
It cannot go stale on its own. A command only starts depending on a new file when something it already reads changes, and that change is exactly what makes it run again.
- files
- A file it read or executed.Runs again when the content changes.
- exists
- A path it only looked at.Runs again when it disappears or changes kind.
- listings
- A folder it listed.Runs again when an entry is added or removed.
- absent
- A path it looked for and did not find.Runs again when that path appears.
Three ways to use it, safest first
Start with the first. It stores nothing, needs no write access, and is the one that saves time today.
-
Ask GitHub what the pull request passed
in service on four repositoriesWhen a pull request was up to date, the push that follows its merge has exactly the files it was tested on. Ichnos asks GitHub whether those jobs succeeded there, and your workflow skips them.
- The git tree must be identical, not similar.
- A job that was skipped on the pull request does not count.
- Any doubt, any API error: everything runs.
permissions: contents: read actions: read pull-requests: read steps: - uses: actions/checkout@v7 - id: ichnos if: github.event_name == 'push' uses: mmornati/ichnos@v0 with: passed-in-pull-request: | Unit tests End-to-end - if: steps.ichnos.outputs.seen != 'true' run: pnpm test -
Remember that these exact files passed
works, used by Ichnos's own CIA docker build or a browser test cannot be followed file by file. Ichnos can still remember that this exact set of files already passed a job, in a ref of your own repository that sits outside your branches.
- One hash over every file git can see.
- Only the job that remembers needs write access.
- Records can be signed with a secret.
- id: ichnos uses: mmornati/ichnos@v0 with: seen: e2e - if: steps.ichnos.outputs.seen != 'true' run: pnpm exec playwright test # in a job that runs once the others have passed - uses: mmornati/ichnos@v0 with: remember: e2e -
Trace every command
experimental: correct, not yet a time saver everywhereIchnos runs a command under a tracer, records its footprint, and skips it the next time unless something in that footprint changed. With a test suite split in units, only the tests a change can reach run again.
- Two tracers: eBPF, which adds about 30% to the run, and
strace, which doubles it. - A flaky test is caught and never skipped.
- Linux only. Elsewhere commands simply run.
# one command ichnos run --id lint -- ruff check . # a whole suite, one unit per test class ichnos units unittest tests > units.json ichnos batch units.json # why would this run, or not? ichnos explain --id lint -- ruff check . - Two tracers: eBPF, which adds about 30% to the run, and
Explained in a minute and a half
The problem, the rule, what a footprint is, and what is still experimental. With subtitles.
What has been measured, and what has not
Ichnos is an early prototype. Every figure below comes with how it was obtained in the findings.
Measured
- 8,126 skips, none wrongEvery test Ichnos skipped over 12 merges of a real project was run anyway. None would have failed.
- 2 to 3 secondsTo decide that all 1,140 test classes of that project can be skipped, on a GitHub runner.
- 1.3× with eBPF, 1.8× to 2× with straceWhat tracing a whole suite costs, on three GitHub runners.
- 1,136 of 1,137Test classes with the same footprint under both tracers. In the other one, eBPF is the accurate one.
- 11 to 30 of 40Commits on
mainthat would not have repeated their tests, replayed on four repositories.
Not yet
- Anyone else's projectEvery measurement comes from the author's own repositories.
- A time gain from tracing on a tightly coupled codebaseWhere a few modules are read by most tests, most tests run again, with the cost of tracing on top.
- Go, Rust, JVM projectsTraced so far: Python, and one Node suite where tracing was too slow to be worth it.
- The network, the clock, tool versionsTracing does not see them. Keep a scheduled full run.
- A stable interfaceThis is version 0.1. Options and the format of what is remembered may still change.
Add it to a workflow
- Find the job that decides what runs, or add one at the top of the workflow.
- Give it
actions: readandpull-requests: read. - Name the jobs to look for, as GitHub shows them.
- Skip those jobs when the output
seenistrue.
jobs:
changes:
runs-on: ubuntu-latest
permissions: { contents: read, actions: read, pull-requests: read }
outputs:
seen: ${{ steps.ichnos.outputs.seen == 'true' }}
steps:
- uses: actions/checkout@v7
if: github.event_name == 'push'
- id: ichnos
if: github.event_name == 'push'
uses: mmornati/ichnos@v0
with:
passed-in-pull-request: |
test
test:
needs: changes
if: needs.changes.outputs.seen != 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- run: make test