Skip to content

ci: smaller PRs (path-filter heavy jobs), faster builds (delta uv cache), robust local (make ci)#91

Merged
se-jo-ma merged 3 commits into
mainfrom
ci/path-filter-heavy-jobs
Jun 24, 2026
Merged

ci: smaller PRs (path-filter heavy jobs), faster builds (delta uv cache), robust local (make ci)#91
se-jo-ma merged 3 commits into
mainfrom
ci/path-filter-heavy-jobs

Conversation

@se-jo-ma

Copy link
Copy Markdown
Member

Why

CI breaks every few PRs on process/infra drift, not real defects. Two complaints addressed: make local CI robust, make the PR run smaller.

What

Smaller PR runs (path-filtered heavy jobs). A changes job (dorny/paths-filter) detects which subsystem a PR touches. The heavy, infra-backed gates run on a PR only when their domain — or a shared/core path — changed:

job infra runs on PR when
engine-test Postgres + pgbouncer checkpoint/, stores/, core
knowledge-test Postgres + ml/rag extras stores/, fathom/, core
cypher-subset Neo4j testcontainer stores/, the cypher subset test, core
serve-test all-extras + serve pyright serve/, bosun/, nautilus/interrupt/artifacts, openapi, core

No coverage lost where it matters: every gate still runs on push to main (github.event_name == 'push'), so main stays fully covered. The only required checks — lint and test (the latter already runs the bulk via -m "not slow") — are never filtered. Heavy jobs aren't required checks, so skipping them never deadlocks a PR.

Robust local mirror (make ci). Every gate + the full suite including slow/container tests (--runslow, needs Docker). The superset a PR may now skip — run it before pushing a large/cross-cutting change. Documented in CONTRIBUTING.md.

Notes

🤖 Generated with Claude Code

@krakennetworks krakennetworks self-requested a review June 23, 2026 21:05
@se-jo-ma se-jo-ma changed the title ci: path-filter heavy jobs; add make ci full local mirror ci: smaller PRs (path-filter heavy jobs), faster builds (delta uv cache), robust local (make ci) Jun 23, 2026
@se-jo-ma

Copy link
Copy Markdown
Member Author

Added a second commit: delta-friendly uv cache. Root cause of the "re-download everything" pain — setup-uv keyed the cache on the exact uv.lock hash with no fallback (and pruned built wheels), so any dependency bump = total miss across all jobs (xgboost 126 MB, torch, numpy… every run). Now a composite action caches ~/.cache/uv with a restore-keys prefix, so a lock change re-downloads only the delta. Benefit shows from the second run after this lands (first run warms the new keys).

@se-jo-ma se-jo-ma force-pushed the ci/path-filter-heavy-jobs branch 2 times, most recently from 85219f0 to 48907fa Compare June 24, 2026 01:47
Smaller, less infra-flaky PR checks without losing coverage. A `changes`
job (dorny/paths-filter) detects which subsystem a PR touches; the heavy
infra-backed gates — engine-test (Postgres/pgbouncer), knowledge-test,
cypher-subset (Neo4j testcontainer), serve-test (all-extras) — now run on
a PR only when their domain, or a shared/core path, changed. Every gate
still runs on push to main, so main stays fully covered. The required
checks (lint, test) are never filtered.

`make ci` is the robust counterpart: every gate plus the full suite
including the slow, container-backed tests, for validating a large or
cross-cutting change locally before pushing.

Signed-off-by: Sean Mauk <seanmauk@krakennetworks.com>
…n dep bumps)

setup-uv's built-in cache keys on the exact uv.lock hash with no fallback
and prunes built wheels, so any dependency change (e.g. adding a dev tool)
is a total cache miss: every job re-downloads all ~260 packages — xgboost
(126 MB), torch, numpy, pandas, etc. — on every run until the new key warms.

Replace the 7 duplicated `setup-uv + uv sync` blocks with one composite
action (`.github/actions/uv-setup`) that caches `~/.cache/uv` via
`actions/cache` with a `restore-keys` prefix fallback. A lock change now
restores the newest prior cache and `uv sync` fetches only the changed
packages. No prune, so built wheels stay cached too. The cache key is
shared across all jobs/extra-sets (uv is content-addressed), so the first
job to run warms it for the rest.

`changelog-check` keeps plain setup-uv: it never syncs heavy extras.

Signed-off-by: Sean Mauk <seanmauk@krakennetworks.com>
@se-jo-ma se-jo-ma force-pushed the ci/path-filter-heavy-jobs branch from 48907fa to 228bdd6 Compare June 24, 2026 01:52
@se-jo-ma se-jo-ma merged commit 13c3c30 into main Jun 24, 2026
11 of 14 checks passed
@se-jo-ma se-jo-ma deleted the ci/path-filter-heavy-jobs branch June 24, 2026 18:57
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.

2 participants