Repository navigation
Description
Problem
The actionlint lane lints workflow files. It does not lint composite action.yml files — passing one explicitly makes actionlint parse it as a workflow and emit "jobs" section is missing.
Consequence: no composite action's run: block in this repo has ever been ShellCheck-covered. Every composite under .github/actions/*/action.yml contains bash that has never been statically analyzed by CI.
Evidence this is not theoretical
Two real bugs shipped in composite run: blocks and were found by review rather than by CI, both in the last day:
- check-jsonschema: set nullglob and guard empty glob expansion #162 —
check-jsonschemapassed unmatched globs through literally becausenullglobwas never set, crashing the tool. Fixed in fix(check-jsonschema): set nullglob and fail on empty glob expansion #165. That PR also cleared a pre-existing SC2086 in the same block — a finding ShellCheck would have raised immediately had the file been covered. - feat(ci-status): extract the lane-aggregation loop into a composite #164 (
ci-status) —read -ra results <<< "$RESULTS"consumed only the first line of a whitespace-separated input, so a caller passing a YAML block scalar had every lane after line one silently unchecked. The gate reported success while a lane had failed. Found by Codex review, not by CI.
The second is the more alarming shape: a false green on the job that gates every merge.
Why the existing lanes miss it
actionlint— parsesaction.ymlas a workflow and errors out rather than linting it; composites are effectively invisible to it.shellchecklane — targets.shfiles; shell embedded in YAMLrun:blocks is not extracted.lefthookpre-commit — same file-extension scoping.
So the gap is structural, not a misconfiguration of any one lane.
Possible directions (not a recommendation — needs the usual selection pass)
- Extract each composite's
run:block and pipe it through ShellCheck in CI. Extraction must be verbatim, and the check should fail if extraction yields nothing, or it becomes its own false green. - Evaluate whether a maintained upstream tool already does this before hand-rolling extraction — worth checking actionlint's issue tracker for composite-action support, and whether any community action covers
action.ymlshell linting. - Consider whether the shell in composites should live in
.shfiles the composite invokes, which would bring it under the existingshellchecklane with no new tooling. This trades a file indirection for real coverage and may be the smaller change.
Whichever direction: the acceptance test is that a deliberately broken run: block in a composite fails CI. Verify by introducing one, not by observing a green run.
Notes
Surfaced while implementing #162 (see #165). Not fixed there — out of scope for that change, and it warrants its own selection pass rather than being bolted on.
Work-class: C3 (bug-fix-shaped) — attended triage 2026-07-23, operator-ratified. 🤖
Activity
chore(ci): adopt the ci-status composite and bump check-jsonschema (#32)
feat(ci-status): make skipped-lane handling a caller policy (#172)
kyle-sexton commentedon Jul 24, 2026
First-drain C3 ratification request (work-loop admission gate, fail-closed).
first_drain_completeis not set and this item carries no recorded dispatch ratification, so the gate queues it instead of dispatching.action.ymlrun:blocks per the issue's selection pass — evaluate upstream/actionlint support and the extract-vs-relocate-to-.shoptions, implement the selected direction, acceptance test = a deliberately brokenrun:block fails CI.To ratify: reply on this comment per
/work-items:attend-queue's ratification flow, then remove theneeds-humanlabel — the item returns to the autonomous frontier and dispatches on a later cycle.This comment was written by an AI agent (work-items:work-loop lane).
kyle-sexton commentedon Jul 24, 2026
Ratified (attended queue, 2026-07-24): operator ratified the first-drain C3 dispatch as marked — evaluate actionlint embedded-shell support vs extract-to-
.sh, implement selected direction, acceptance = deliberately brokenrun:block fails CI. Returning to the autonomous frontier. This comment was written by an AI agent on the operator's behalf (work-items:attend-queue lane).kyle-sexton commentedon Jul 26, 2026
Provenance record: the
work-class:label on this issue was applied by an AI agent at the operator's explicit direction during an attended queue session (2026-07-26), mapping the operator-ratifiedWork-class:body trailer onto the live label set. Recorded because, under the sharedghidentity, an agent-written class label is otherwise indistinguishable from an operator-written one — and the merge-admission gate reads this label.This comment was written by an AI agent (work-items:attend-queue lane).
kyle-sexton commentedon Jul 26, 2026
kyle-sexton commentedon Jul 26, 2026
This was generated by an AI agent (work-items:work-loop lane).
Branch
chore/167-composite-action-run-blocks-are-not-shelpushed (2 commits). Selection pass, implementation, and the acceptance-test evidence below.Selection pass
No upstream or community tool covers this. Verified against primary sources:
action.ymlinput mode. Its owndocs/checks.mdstates verbatim thatstepsin a composite action's metadata "is not checked at this point." rhysd/actionlint#46 has been open since 2021-09; PR #366 implements it but is unmerged pending an architecture decision the maintainer has not made.action.ymlbut its entire audit catalog is security-classed — no shell-quality check.Extraction was selected over relocating shell into
.shfiles.The decisive argument is this issue's own acceptance test. Relocation moves today's shell out of
run:blocks; it does nothing about arun:block. A deliberately broken block would still not fail CI. Relocation plus a structural guard would fail CI on a broken block — but equally on a correct one, because it detects inline-ness, not brokenness. The bug shape #164 cites is ShellCheck-detectable, and the acceptance test wants ShellCheck to be the thing that catches it.Two further points against relocation: it churns 16 behavioral files, and the "8 of 24 already relocated" pattern is not a migration in progress — nearly every relocated script here pairs with a unit test (
run.test.sh,scan.test.sh,guard.test.sh). The repo's actual idiom is inline for thin argument marshalling,.shwhen it needs unit tests.Extraction also has a property relocation lacks: it covers future inline blocks automatically, and it makes the
# shellcheck disable=directives already present inci-statusandcheck-jsonschematake effect. Those were written as if covered.Implementation
.github/scripts/composite-run-shellcheck.sh, wired into ci.yml's existingactionlintjob (which already has the pinned ShellCheck on PATH). Repo-internal rather than a published action: making it a consumer-facing contract would mean README surface, atool-version-drift-checkentry for a newly pinned tool, and a default-on-breaks-consumers decision.yqcomes from the runner image, matchingtool-version-drift-check.yml's existing bare use.It reproduces actionlint's exact ShellCheck contract for embedded scripts, read from
rule_shellcheck.go:--norc -x, theset -eo pipefail/set -eprologue GitHub itself runs the step with, equal-length underscore substitution of${{ }}, and the seven excluded codes. Every exclusion is a false positive of the artifact class —env:injection, unresolvable sources, constants produced by the substitution — not a relaxation of shell policy. A composite step is therefore judged identically to the same step in a workflow, rather than under a ruleset written for standalone scripts.Three false-green guards, since a selector matching nothing is also green:
Steps ShellCheck cannot analyse — the two
pwshblocks inpowershell— are announced, never silently dropped.Findings surfaced
15 SC2086 across 13 actions. Every one is the deliberate unquoted expansion already documented in place ("$PATHS unquoted so multiple targets word-split"). Each got a directive at the site rather than a blanket exclusion — SC2086 is precisely the check that would have caught #162. Converting them to arrays would change 13 actions' argument marshalling and is a separate decision, not this one.
Coverage: 33 bash blocks across 22 actions, previously linted by nothing.
Acceptance test — verified by breaking it, not by reading config
Injected the #164 regression shape into the real
ci-statusblock — the gate that decides every merge:Restored byte-identical. Per this repo's convention (see #251), the breakage is also pinned permanently rather than only demonstrated:
composite-run-shellcheck.test.shasserts a broken block fails, that the${{ }}substitution ran, that the pwsh skip is announced, that every tracked composite is reached, and that a file set yielding no block fails rather than passing empty.Independent review caught three real defects
Routed to a fresh-context reviewer with the rationale withheld. It found:
comment-hygienerequired lane. Its header citedrhysd/actionlint#46, matching theowner/repo#Ntracker-ref pattern. It scanned clean while the file was untracked — that lane uses git-tracked discovery — so the violation only appeared once staged. Fixed.ifcompound intypos, covering both branches. Split per site.Both new assertions are mutation-verified: making the sanitizer a passthrough fails on SC2296; narrowing the discovery glob to one action fails the coverage floor.
Recommended follow-up (not filed — out of scope here)
The identical gap exists for the two
shell: pwshblocks in.github/actions/powershell/action.yml: PSScriptAnalyzer does not see them either, and this check announces them as skipped. Same shape as this issue, different analyzer. Worth its own item.Separately: consumers of
.github/actions/actionlintstill have no composite coverage, since this landed as a repo-internal check. Publishing it would need a checksum-pinnedyqand a decision on default-on.test(actions): cover composite action shell with ShellCheck (#261)
test(actions): cover composite action PowerShell with PSScriptAnalyzer (
fix(scripts): find the end of a ${{ }} span the way the runner does (#…