Skip to content

Pin split_tests to a checksummed release + auto-bump workflow - #12

Merged
scruplelesswizard merged 3 commits into
mainfrom
pin/split-tests-version-and-renovate
Jul 31, 2026
Merged

Pin split_tests to a checksummed release + auto-bump workflow#12
scruplelesswizard merged 3 commits into
mainfrom
pin/split-tests-version-and-renovate

Conversation

@scruplelesswizard

Copy link
Copy Markdown
Owner

Follow-up from the maintainer audit in REVIEW.adoc — closes the "unpinned /latest/download/ fetch" architectural finding, and adds the automated-bump mechanism requested alongside it.

The problem: action.yml fetched split_tests from /latest/download/ on every single run, unauthenticated and with no integrity check. Two runs of the identical caller workflow, a week apart, could execute two different versions of the actual splitting logic with no corresponding commit in this repo — the pinned @v1 tag on this action wasn't actually a reproducible artifact.

The fix:

  • action.yml now pins SPLIT_TESTS_VERSION to a specific release (v0.5.0) and verifies a SPLIT_TESTS_SHA256 checksum before treating the download as usable. A mismatch fails the job loudly and prints the actual hash, rather than silently accepting whatever the URL happens to serve.
  • Added .github/workflows/bump-split-tests.yaml: runs weekly (and on-demand via workflow_dispatch), checks the upstream repo's latest release, and — if it's newer — downloads it, computes the checksum itself, and opens a PR bumping both SPLIT_TESTS_VERSION and SPLIT_TESTS_SHA256 together.

Why not Dependabot/Renovate: both are excellent at bumping a version string, but neither can compute a sha256 for an arbitrary GitHub release binary asset — that's not something their datasources expose. A Renovate regex manager could auto-bump the version and leave the checksum for a human to paste in, which defeats the point of pinning by checksum in the first place. This workflow does both atomically, using only git/gh (already on every GitHub-hosted runner) — no new third-party Action dependency.

Once #10 (ARM64 support) is ready to move forward, its per-arch download logic should layer on top of this pinning approach rather than reverting to an unpinned fetch.

action.yml previously fetched split_tests from /latest/download/ on every
run, unauthenticated and unpinned - two runs of the same workflow could
silently execute different splitting logic with no corresponding commit
in this repo.

- Pin to split_tests v0.5.0 and verify a sha256 checksum before use; the
  install step now fails loudly (with the actual hash) on a mismatch
  instead of accepting whatever the URL currently serves.
- Add .github/workflows/bump-split-tests.yaml: a weekly scheduled (+
  workflow_dispatch) workflow that checks upstream for a new release,
  downloads and hashes it, and opens a PR updating both
  SPLIT_TESTS_VERSION and SPLIT_TESTS_SHA256 together. A plain
  Dependabot/Renovate version bump can't compute a checksum for an
  arbitrary release binary, so this is a small purpose-built workflow
  instead - no third-party Action dependency, just git/gh, both
  preinstalled on GitHub-hosted runners.
@scruplelesswizard
scruplelesswizard merged commit e0ac271 into main Jul 31, 2026
5 checks passed
scruplelesswizard added a commit that referenced this pull request Jul 31, 2026
#18)

gunzip refuses to overwrite an existing output file without -f, breaking any workflow that invokes this action more than once in the same job. Regression from #12. One-flag fix, confirmed green on this PR's own CI.
scruplelesswizard added a commit that referenced this pull request Jul 31, 2026
Adds smoke-test-correctness: runs the default file-count split across all three split-index values with split-total=3, then asserts partitions are non-empty, pairwise disjoint, and their union covers the full glob exactly. Closes the repo's own long-standing 'Test output for correctness' TODO. Its own CI run also caught two real regressions along the way (JUnit ruby-version bug from #6 -> fixed in #17; gunzip overwrite bug from #12 -> fixed in #18).
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