Repository navigation
CI: replace the 39 tests that read the workflow files with actionlint and one release-safety script #5947
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Claude posting for Erik Darling.
39 test files read the CI workflow and script files as text and assert on what they say. Since 2026-09-15, half of the commits that changed CI also had to edit one of these tests. This issue proposes to replace them with actionlint and one small check script, and to keep only the checks that protect a release.
Source: git log on dev since 2026-09-15, and grep over the test projects at dev 36159005e.
What it costs (measured)
- Size of the CI code: the workflows and scripts under
.github/are 19,018 lines.build.ymlis 3,267 lines, and 1,147 of them are comments.nightly.ymlis 1,700 lines, andci-select.pyis 2,039.
- Tests that read it: 39 files in
Darling.TestsandLite.Testsmention.github/,build.ymlornightly.yml. The largest by mention count areLite.Tests/CrossAppGuardCiGateTests.cs,Lite.Tests/CiSelectMapSelectGuardTests.cs,Darling.Tests/DarlingPathFilterGateTests.cs,GuardStageWorkflowTests.cs,LockedModeRestoreCoverageTests.csandCiSelectReplayGuardTests.cs. - The edit cost:
- 89 commits changed
.github/workflowsor.github/scriptssince 2026-09-15. - 43 of those 89 also edited one of the 39 test files.
- The 39 files were edited in 82 commits in total.
- 89 commits changed
- The run cost:
build.ymlis on the keep-full list (ci-select.py:693), as build configuration. So every workflow change already runs the full suite once. With the tests that read the workflow, a wrong guess about a pinned line costs a second full run.
Proposal
- Add a fast job that runs
actionlintwhen a file under.github/workflows/changes. It finds YAML, expression and shell mistakes that the text tests do not look for. - Move the checks that protect a release into one script under
.github/scripts/, run by that job. Examples are the publish order after the signature checks (Release: the Linux tarball and container image publish before the Windows signature guard has passed #5804) and the Guard stage running before the shards. A script can read the YAML as data, not as text. - Delete the other tests that assert on the text of CI files. Apply the rule from Tests that assert spelling, not behavior: cap them, stop the review asking for pins, delete the shape ones #5833: a test that fails on a correct change protects nothing.
- Keep
ci-select.py's own unit tests of its logic, such as replay and map selection, where they test behavior with inputs, not the text ofbuild.yml. - For new CI machinery, the PR states the time it saves, and a follow-up measures it. The selection, shard and map code already spans thousands of lines, and each part carries tests of its own.
Risk
- A text test can guard a rule that nobody wrote down. Before deleting a test, name the defect it fails on. If there is one, move the check into the script.
Done when
actionlintruns on workflow changes.- One script holds the release-safety checks of the CI files.
- No test in
Darling.TestsorLite.Testsasserts on the text of a file under.github/workflows/.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Activity
erikdarlingdata commentedon Oct 16, 2026
Claude posting for Erik Darling. Adversarial review before any lane, at Erik's ask (an Opus reviewer re-derived the numbers from the run history and the repo).
Verdict: floats with changes. Held for tomorrow.
build.ymlin a comment.Change: add actionlint as a check; keep the tests.
Guard job runs actionlint on changed workflow files; pure string pins…
erikdarlingdata commentedon Oct 16, 2026
Claude posting for Erik Darling.
Fixed by #5966 (9df7e0c) on dev.