Repository navigation
ci(lint): hold called workflows to their rules, add actionlint, and index the CI directories (stage 0.4) - #249
Merged
Merged
Conversation
…ndex the CI directories (stage 0.4) The last stage of Phase 0 of the CI split (ADR-0102). Nothing CI plans or runs for a change changes; the deps job gains two checks and ci-scripts three test files. lint-workflow.sh gets R8 and R9 for a workflow that other workflows call (its `on:` has workflow_call, written as a block, as `on: workflow_call` or as a list). R8: no workflow-level `concurrency:`, because github.workflow is the caller's name there, so the group equals the caller's and the run deadlocks (research 0018, F3). R9: no github.event_name or github.workflow, which are the caller's. Each rule is seen to fail and seen to allow what it should (a comment, a job's own concurrency, a workflow that is not called, github.workflow_ref). actionlint 1.7.12 runs in the deps job through lint-actionlint.sh. taiki-e/install-action does not offer it, so the step downloads the release archive and checks a SHA-256 written in the workflow, which the release's checksums file, hashing the archive and the build attestation of rhysd/actionlint all agree on (with a control: the attestation fails for another repository). actionlint checks each call of a called workflow only inside a git repository, where it finds the project, and says nothing outside one; so the script refuses to run outside a git work tree and, before it lints the repository, runs a control: a caller that passes an undeclared input, omits a required one and reads an undeclared output must be refused three ways, and a sound caller accepted. The baseline was clean on all eight workflows. The script's tests use stand-in binaries that each misbehave in one way, so ci-scripts needs no actionlint. .github/workflows/README.md and .github/actions/README.md index the files, with their triggers and whether gate waits for them. check-ci-index.sh, a step of deps, fails when a file has no row, a row names no file, or a file has two; a name in a second cell or in prose is not a row. The plan said the indexes were no job's input; the guard reads them, so a change to one runs deps and ci-scripts, which the generic rule for .github/ already gives, and test_plan_ci.py now says so. Tests: test-lint-workflow.sh 28 (11 new), test-check-ci-index.sh 22, test-lint-actionlint.sh 10 (8 where actionlint is absent), test-lint-all-workflows.sh 128 (two new: a callee with no credential passes with no entry in the policy, one with a secret is refused), test_plan_ci.py 6,769 checks; mutate_gate.py still kills 53 of 53. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
main moved while CI ran on this branch: #248 (the mutation controls tell a row that did not run from one that survived) edits plan-ci.py, test_plan_ci.py and ci.yml, as this branch does. The merge is textually clean and was tested before it was committed, because a clean merge of two CI changes is not evidence that they agree (the last one was not): - test_plan_ci.py: 6,771 checks pass - test-ci-scripts.sh under dash: 173 cases pass - mutate_gate.py: 53 of 53 mutants killed, none broken, both equivalent mutants survive - lint-all-workflows.sh, lint-actionlint.sh and check-ci-index.sh exit 0 - the merged ci.yml keeps #248's test-mutants-verdict.sh beside this branch's two new tests and its two new deps steps Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This was referenced Nov 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Stage 0.4 of Phase 0 of the CI split (plan,
ADR-0102): the last stage of Phase 0.
The lint rules for a called workflow,
actionlint, and an index for each CI directory. Nothing CI plans or runs for a changechanges; the
depsjob gains two checks andci-scriptsthree test files.The four changes
lint-workflow.shgets R8 and R9 for a workflow that other workflows call. R8: no workflow-levelconcurrency:(
github.workflowis the caller's name there, so the group equals the caller's and the run deadlocks: research 0018, F3). R9:no
github.event_nameorgithub.workflow, both the caller's. Each rule is seen to fail and to allow what it should (acomment, a job's own
concurrency, a workflow that is not called:ci.ymlhas both,github.workflow_ref).actionlint1.7.12 runs indeps, throughlint-actionlint.sh. It checks each call of a called workflow (thewith:itpasses, the outputs it reads), but only inside a git repository; elsewhere it checks nothing and says nothing (research
0018, F11). So the script refuses to run outside a git work tree and, before it lints the repository, runs a control: a
caller that passes an undeclared input, omits a required one and reads an undeclared output must be refused three ways, and a
sound caller accepted. The baseline was clean:
actionlintexits 0 on all eight workflows, so there is nothing to keep or name..github/workflows/README.md,.github/actions/README.md): one row per file, with its triggers andwhether
gatewaits for it.check-ci-index.sh(adepsstep) fails when a file has no row, a row namesno file, or a file has two. An index with no guard is a lie that has not happened yet.
How
actionlintis installedThe plan left this to a survey at the start of the stage.
taiki-e/install-action(at the versionci.ymlpins) offersshellcheckandzizmorbut notactionlint. A third-party wrapper action would add a dependency to the supply chain tosave six lines. So the step downloads the release archive and checks a SHA-256 written in the workflow. That hash was taken
three ways, and they agree: the release's own checksums file, hashing the archive myself, and the build attestation of
rhysd/actionlint(gh attestation verifypasses for that repository and fails with "no attestations found" for another, whichis the control). I also checked the hash in
ci.ymlagainst the archive's withgrep -F -f, because 64 hex characters typed byhand are not something to trust by eye.
Where this differs from the phase plan
depsandci-scripts, whichthe generic rule for
.github/already gives;test_plan_ci.pynow says so, so it can't change silently.contract-cell.yml, so it doesn't depend on a file others edit.Tests
test-lint-workflow.shtest-check-ci-index.shtest-lint-actionlint.shactionlintis absent, sinceci-scriptshas nonetest-lint-all-workflows.shtest_plan_ci.pydepsandci-scriptsmutate_gate.pyWhat CI did
ci.ymlis in the planner's run-everything rules, so both runs were full: 39 checks, none skipped, none failed,gatecertified green by
assert-required-contexts.sh, the PRCLEAN.depssteps on the runner, the one thing I could not run locally:actionlint.tar.gz: OKfromsha256sum -c,lint-actionlint: the control behaved (a broken call refused three ways, a sound one accepted)andevery workflow ... is clean, andcheck-ci-index: 8 workflows and 5 actions, each with its row. The runner's oldershellcheckraised nothing.ci-scripts:mutate_gate.pykilled 53 of 53 and none broke; the actionlint script's tests ran their 8 stand-in cases andskipped the two that need the real tool, with the note saying so.
mainmoved twice while I worked:#247(crates only, no CI file; the commit is rebased onto it) and#248(the mutationcontrols: it edits
plan-ci.py,test_plan_ci.pyandci.yml, as this PR does). I merged#248in, never force-pushed, andtested the result before committing it (6,771 planner checks, 173 gate cases, 53 of 53 mutants, the three guards); the merge
commit's message carries that. The run on the merge commit
7e29ffcis green.🤖 Generated with Claude Code