Skip to content

ci: cache the cabal store and run the worker tests in a parallel job - #70

Merged
FeathBow merged 3 commits into
mainfrom
ci/speed
Oct 18, 2026
Merged

FeathBow merged 3 commits into
mainfrom
ci/speed

Conversation

@FeathBow

@FeathBow FeathBow commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Why

One job ran every check in sequence and took about 17 minutes. Two steps dominated: the build compiled every dependency from source on each run, and the Hugging Face worker tests ran one module after another behind the full Haskell build. The worker tests had grown with the end-to-end runtime, recovery and distillation tests, which start real worker processes.

What

  • The Haskell job resolves the build plan with a dry run, restores the cabal store keyed on the runner system, the GHC version and the plan, builds and saves the store when the key was not an exact hit, then runs the core tests, the type fixtures and the confidence check.
  • A new Workers job restores the same store without saving it, builds only the invar executable, installs the pinned Python requirements with pip's cache keyed on the requirements file, and runs the shared worker tests and the Hugging Face package with the built core. The distillation and overlap modules each run in their own process and every other module runs in a third, all three at once. Any other module, including a new one, joins the third group. The step fails if any group fails and prints each group's output separately.
  • Format and HLint move to the Lint job, since they need no build.
  • The overlap test that compared a default run with an explicit staleness of zero ran that pair in both inference modes. An omitted staleness is staleness zero on the same code path, so the test checks the default run's journal, publications and reference scoring in both modes and compares one serial repeat, which is the only test comparing two real runs as equal.

Validation

The workflow passes actionlint. Locally the core suite, formatting, lint, type fixtures, the confidence check and the shared, Hugging Face and MLX worker suites passed. Run concurrently with the workflow's own script, the three Hugging Face groups passed in 100 seconds against 235 seconds in sequence, with the same 222 tests; with one group pointed at a missing module the step failed and printed every group's output. The timings on the hosted runners come from the first runs of this workflow.

Elapsed time from the first job starting to the last finishing was 11m05s on the first run and 7m21s on the cached rerun. All jobs passed. These are individual observations, not a timing guarantee.

…ne repeat

Signed-off-by: Feathbow <feathbow@gmail.com>
…n parallel groups

Signed-off-by: Feathbow <feathbow@gmail.com>
@FeathBow
FeathBow merged commit 36be1f0 into main Oct 18, 2026
4 checks passed
@FeathBow
FeathBow deleted the ci/speed branch October 18, 2026 17:37
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