Skip to content

ci: split CI into parallel jobs, move scripted tasks into file tasks, cache downloads - #61

Merged
sweepies merged 12 commits into
mainfrom
ci/parallel-jobs
Oct 27, 2026
Merged

sweepies merged 12 commits into
mainfrom
ci/parallel-jobs

Conversation

@sweepies

@sweepies sweepies commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Splits CI into parallel jobs that each call mise tasks, moves scripted tasks out of mise.toml and the workflows into file tasks, and adds download caches. Draft for review; please don't merge until Sweepy has looked at it.

Timing

Before: main run 40459508608. After: runs on this branch. "Cold" is the first run, with new mbx generations, a new mise cache key and no Cargo download cache. "Warm" is the final workflow, run once and then rerun.

Job Before (main) Cold (40563981919) Warm (40567475970 #1) Warm (#2 rerun)
Changed paths 5s 9s 6s 7s
ci (fixtures, lint, test, build in series) 6m50s n/a n/a n/a
Lint: rustfmt, clippy (in ci, 41s) 2m43s 1m50s 2m02s
Lint: workflows (in ci) 49s 22s 23s
Build: workspace, fixture secret scan (in ci, 89s) 2m55s 2m16s 1m33s
Tests: unit (update) (in ci, 3m56s for all tests) 2m28s¹ 2m41s 2m49s
Tests: unit (others) (in ci) 4m28s¹ 4m14s 4m00s
Tests: real lockfile tools (in ci) 3m09s 1m47s 2m03s
Docs: build not run 35s 40s 35s
Corpus: lookup 4m24s 4m39s 4m10s 3m54s
Wall clock, first job start to last job end 7m02s 6m28s 4m22s 4m12s

¹ Cold numbers for the two unit test halves come from run 40566650438, the first run after the split (before that, run 40563981919 ran all unit tests in one job: 6m10s cold, 5m18s warm). That run's wall clock was 4m38s.

The critical path is now the other crates' unit tests (about 4 minutes) and the live corpus lookup (about 4 minutes, mostly network). Splitting costs CPU: each Rust job compiles its own build scripts, native C code (aws-lc-sys alone is about 45 seconds) and test binary links, which mbx bypasses, so total runner time rises from about 11 to about 18 minutes.

Jobs

.github/workflows/ci.yml now runs Changed paths, Lint: rustfmt, clippy, Lint: workflows, Build: workspace, fixture secret scan, Tests: unit (update), Tests: unit (others), Tests: real lockfile tools, Docs: build and Corpus: lookup. Every job runs one or two mise tasks, and every run: step is a single task call. A docs-only change runs only Docs: build; README-style files run nothing. There is no CI result gate any more, since main no longer requires it; AGENTS.md now says every check must be green.

  • test:unit skips the lockfiles::tests::real_ tests and takes --part all|update|others. patchula-update's suite (its write.rs alone takes 50s) runs beside the other crates.
  • test:tools runs only the real lockfile tool tests, with the task-scoped engines, so only that job installs .NET, Python, Ruby, PHP and the rest.
  • test runs test:unit then test:tools. ci runs every CI task in series for local use.
  • Each Rust job has its own mbx generation (v4-lint, v4-build, v4-test-update, v4-test-others, v4-tools, and the existing v3-corpus). Their objects barely overlap (Clippy metadata, test builds and release builds), so one shared bundle would make each job download what it doesn't use. The build job runs the fixture scanner after cargo build, so the scanner reuses that dev build.

File tasks

These moved from mise.toml into mise-tasks/, with #MISE and #USAGE headers: ci, ci:changes, test:unit, test:tools, test:stress, docs:cli, release:package, corpus:report (new: the corpus job's run-and-summarize shell), cache:usage (new: du/df), benchmarks:summary (new), server:replay, conformance:inspect, conformance:logs and registry:update. The last four are now Bun scripts instead of bun -e strings. One-line cargo tasks stay in mise.toml.

All task names are unchanged. test:stress and ci take flags (--runs, --filter, --log-dir) instead of PATCHULA_STRESS_* and PATCHULA_CI_LOG_DIR, which nothing else used. The lockfile engine pin test now reads the #MISE tools.* headers of test:tools and test:stress. Benchmarks' multi-line steps call tasks too; release.yml is untouched.

Caches

The caches follow mise's CI guide. mise.lock is now committed and covers linux-x64, linux-arm64 and macos-arm64, including tools that tasks declare. jdx/mise-action runs mise install --locked with cache: false, and every job restores mise's checksum-verified download store (~/.cache/mise/downloads-cas) instead of the installed tools. This replaces both the old mise-v1 install cache and my earlier lockfile-tools-v1 cache.

Cache Size Saved by
mise-downloads-Linux-<mise.lock> 565 MB real-tool job, main only
cargo-downloads-v1-<Cargo.lock> (registry index, crate archives, git db) 58 MB lint job, main only
mbx v4-{lint,build,test-update,test-others,tools}-objects 90 + 306 + 206 + 249 + 202 MB each job, main only
corpus-v2 ~250 MB corpus job, main only

Corpus no longer builds anything. It downloads the build job's dev binary as an artifact (PATCHULA_BIN) instead of doing its own release build. That drops the separate 247 MB v3-corpus-objects bundle, which shared nothing with the debug bundles because it was a release profile. A local planning run took 45s on the dev binary and 9s on the release binary, and in CI the corpus job went from about 4 minutes to about 80 seconds, because it no longer compiles a release build. The other bundles stay separate: Clippy metadata, the test builds and the tools build share little.

Pruning:

  • After every push to main, a final Cache: prune superseded entries job runs mise-tasks/cache/prune --drop-others <families>. This uses the built-in token with actions: write on that job only, and calls gh cache list/gh cache delete. It keeps the newest main entry of each family and deletes older ones. It also deletes main entries that match no family, such as the retired mise-v1, lockfile-tools-v1, v3-ci-objects and v3-corpus-objects.
  • cache-cleanup.yml runs on pull_request: closed. It checks out the task file from the default branch and deletes every cache on refs/pull/<n>/merge.

I tested both modes against the live cache: closed PR #60's 239 MB entry was deleted, and on this PR's ref, --drop-others removed the stale mise-v1 and lockfile-tools-v1 entries (720 MB). The main-push job itself only runs after merge.

Steady-state footprint: main holds about 1.9 GB, one entry per family. A push that runs the Rust jobs saves about 1.3 GB (five mbx bundles plus corpus), and the prune job deletes the same amount. Pull requests save nothing, and they used to save a corpus entry on every run. Before this PR the repo sat at 10.6 to 11.9 GB.

Final run on this branch, 40575243025, took 3m54s of wall clock, with every job green.

docs/src/content/docs/internals/ci-cache.md (now titled "CI jobs and caches") documents all of this. README, AGENTS.md and the corpus README are updated to match.

sweepies and others added 2 commits October 27, 2026 18:52
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@deepsource-io

deepsource-io Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in eb84a32...74d6fe9 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
Rust Oct 27, 2026 8:47p.m. Review ↗
JavaScript Oct 27, 2026 8:47p.m. Review ↗
Shell Oct 27, 2026 8:47p.m. Review ↗
Secrets Oct 27, 2026 8:47p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
count-patchula 9866976 Commit Preview URL

Branch Preview URL
Oct 27 2026, 07:16 PM

sweepies and others added 4 commits October 27, 2026 19:00
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@context7

context7 Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Docs7 for sweepies/count-patchula

Result Status Action
Deployment ➖ Not used —
Content review ✅ Passed. No problems found. —

Commit 74d6fe9

@capy-ai capy-ai Bot changed the title ci: split CI into parallel jobs, move tasks into files, cache downloads ci: split CI into parallel jobs, move scripted tasks into file tasks, cache downloads Oct 27, 2026
sweepies and others added 5 commits October 27, 2026 19:53
…reuses the dev build

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…re it

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@sweepies
sweepies marked this pull request as ready for review October 27, 2026 20:38
@greptile-apps

greptile-apps Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

RetriggerView in Greptile

[Medium impact] The reviewed changes appear safe to merge once the author's requested review is complete.

Reviews (2) · Last reviewed commit: "ci: keep the corpus binary artifact reac..." · Reviewed by Greptile

Comment thread .github/workflows/ci.yml Resolved
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@sweepies
sweepies merged commit 87a9bd0 into main Oct 27, 2026
18 checks passed
@sweepies
sweepies deleted the ci/parallel-jobs branch October 27, 2026 21:07
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