Skip to content

ci(lint): hold called workflows to their rules, add actionlint, and index the CI directories (stage 0.4) - #249

Merged
aRustyDev merged 2 commits into
mainfrom
chore/ci-lint-conventions
Nov 17, 2026
Merged

aRustyDev merged 2 commits into
mainfrom
chore/ci-lint-conventions

Conversation

@aRustyDev

@aRustyDev aRustyDev commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

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 change
changes; the deps job gains two checks and ci-scripts three test files.

The four changes

  • lint-workflow.sh gets R8 and R9 for a workflow that other workflows call. R8: no workflow-level concurrency:
    (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, both the caller's. Each rule is seen to fail and to allow what it should (a
    comment, a job's own concurrency, a workflow that is not called: ci.yml has both, github.workflow_ref).
  • actionlint 1.7.12 runs in deps, through lint-actionlint.sh. It checks each call of a called workflow (the with: it
    passes, 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: actionlint exits 0 on all eight workflows, so there is nothing to keep or name.
  • The two index READMEs (.github/workflows/README.md, .github/actions/README.md): one row per file, with its triggers and
    whether gate waits for it.
  • A guard for them that the plan did not name: check-ci-index.sh (a deps step) fails when a file has no row, a row names
    no file, or a file has two. An index with no guard is a lie that has not happened yet.

How actionlint is installed

The plan left this to a survey at the start of the stage. taiki-e/install-action (at the version ci.yml pins) offers
shellcheck and zizmor but not actionlint. A third-party wrapper action would add a dependency to the supply chain to
save 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 verify passes for that repository and fails with "no attestations found" for another, which
is the control). I also checked the hash in ci.yml against the archive's with grep -F -f, because 64 hex characters typed by
hand are not something to trust by eye.

Where this differs from the phase plan

  • The plan said the READMEs are "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; test_plan_ci.py now says so, so it can't change silently.
  • The control uses its own small callee, not contract-cell.yml, so it doesn't depend on a file others edit.

Tests

Suite Cases
test-lint-workflow.sh 28 11 new: R8 and R9, and what they must allow
test-check-ci-index.sh 22 missing, extra and repeated rows, missing READMEs, the two traps (a name in a second cell or in prose), a generated sweep
test-lint-actionlint.sh 10 stand-in binaries that each misbehave in one way; 8 where actionlint is absent, since ci-scripts has none
test-lint-all-workflows.sh 128 2 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 the two READMEs and the guard are checked to plan deps and ci-scripts
mutate_gate.py 53 of 53 killed, as before

What CI did

ci.yml is in the planner's run-everything rules, so both runs were full: 39 checks, none skipped, none failed, gate
certified green by assert-required-contexts.sh, the PR CLEAN.

  • The new deps steps on the runner, the one thing I could not run locally: actionlint.tar.gz: OK from sha256sum -c,
    lint-actionlint: the control behaved (a broken call refused three ways, a sound one accepted) and every workflow ... is clean, and check-ci-index: 8 workflows and 5 actions, each with its row. The runner's older shellcheck raised nothing.
  • ci-scripts: mutate_gate.py killed 53 of 53 and none broke; the actionlint script's tests ran their 8 stand-in cases and
    skipped the two that need the real tool, with the note saying so.
  • main moved twice while I worked: #247 (crates only, no CI file; the commit is rebased onto it) and #248 (the mutation
    controls: it edits plan-ci.py, test_plan_ci.py and ci.yml, as this PR does). I merged #248 in, never force-pushed, and
    tested 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 7e29ffc is green.

🤖 Generated with Claude Code

aRustyDev and others added 2 commits November 16, 2026 18:47
…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]>
@aRustyDev
aRustyDev merged commit f263ab4 into main Nov 17, 2026
39 checks passed
@aRustyDev
aRustyDev deleted the chore/ci-lint-conventions branch November 17, 2026 02:19
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