Skip to content

ci: re-enable actionlint shellcheck integration and harden workflow run blocks - #1013

Merged
c-vigo merged 2 commits into
devfrom
feature/1003-actionlint-shellcheck
Jul 13, 2026
Merged

c-vigo merged 2 commits into
devfrom
feature/1003-actionlint-shellcheck

Conversation

@c-vigo

@c-vigo c-vigo commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Re-enables actionlint's bundled shellcheck integration (removes the
-shellcheck= opt-out) in the devkit's own pre-commit hook and the bats
fixtures, and hardens every workflow run: block — the devkit's own
.github/workflows/, the per-mode scaffold templates under
assets/workspace/, and the smoke-test template — until the shellcheck pass is
clean. Follow-up to #995 (which deferred the 41 info/style/warning findings).

Every commit stays green: commit 1 hardens the run blocks (hook still opted
out); commit 2 removes the opt-outs with shellcheck now active and the gate
proving clean.

Findings and fixes

actionlint with shellcheck over the devkit's own workflows surfaced the same
41 findings #995 recorded, plus a handful in the rendered/template trees.
All are SC2086 quoting-style noise except the intentional patterns noted
below. No correctness defects. Locations are run:-block start lines.

Devkit-own .github/workflows/

File Block SC code(s) Fix
ci.yml @67 SC2086 x5, SC2129 grouped consecutive >> "$GITHUB_OUTPUT" writes into one { ... } >> "$GITHUB_OUTPUT"
ci.yml @282 SC2086 x2 quoted "$GITHUB_STEP_SUMMARY"
prepare-release.yml @67 SC2086 x2 quoted "$GITHUB_OUTPUT"
prepare-release.yml @303 SC2016; SC2086 x2 SC2016 suppressed (literal Markdown backticks); quoted "$GITHUB_OUTPUT"
promote-release.yml @65 SC2076; SC2207 both suppressed (see reasons)
release.yml @97 SC2086 x5, SC2129 grouped >> "$GITHUB_OUTPUT"
release.yml @139 SC2086 quoted "$GITHUB_OUTPUT"
release.yml @149 SC2086 x3, SC2129 grouped >> "$GITHUB_OUTPUT"
release.yml @314 SC2086 quoted "$GITHUB_OUTPUT"
release.yml @415 SC2076; SC2207; SC2086 x2 SC2076/SC2207 suppressed; quoted "$GITHUB_OUTPUT"
release.yml @629 SC2016 suppressed (literal Markdown backticks)
release.yml @674 SC2086 quoted "$GITHUB_OUTPUT"
release.yml @899 SC2015 suppressed (intentional &&/`
release.yml @1113 SC2034; SC2086 removed dead ARCH_ARRAY parse + its now-unused ARCHS: env; quoted "$i"/"$RETRIES"
release.yml @1187 SC2086 quoted "$GITHUB_OUTPUT"
release.yml @1573 SC2016 suppressed (literal Markdown backticks)
renovate-changelog-commit.yml @47 SC2129 grouped >> "$GITHUB_OUTPUT" (synced -> template)
security-scan.yml @112 SC2015 suppressed (intentional &&/`
sync-issues.yml @110 SC2086 quoted "$CACHE_ID" (minimal, coordinating with #996)

Scaffold templates (assets/workspace/.github/workflows/)

File Block SC code(s) Fix
prepare-release.yml @299 SC2016 suppressed (literal Markdown backticks)
release-core.yml @143 SC2129 grouped >> "$GITHUB_OUTPUT"
release-core.yml @199 SC2295 x2 quoted the pattern: ${tag#"${VERSION}"-rc}
sync-issues.yml @122 SC2086 quoted "$CACHE_ID"

Smoke-test template

File Block SC code(s) Fix
assets/smoke-test/.github/workflows/repository-dispatch.yml @72 SC2129 grouped 10 >> "${GITHUB_OUTPUT}" writes

Suppressions (each carries an inline justification comment)

SC Where Reason
SC2016 prepare-release.yml (root + template), release.yml x2 The `CHANGELOG.md` backticks in the truncation-note printf are literal Markdown code spans, not command substitution.
SC2076 promote-release.yml, release.yml [[ " $VALID_ARCHS " =~ " $arch " ]] is a deliberate literal substring match against the space-padded whitelist, not a regex.
SC2207 promote-release.yml, release.yml UNIQUE_ARCHS=($(... | sort -u)) deliberately word-splits the space-free arch tokens; mapfile is overkill.
SC2015 release.yml, security-scan.yml The ... && ... || { error; exit; } guard is meant to run the error branch whenever the combined scan-ok check fails, not an if-then-else.

The inherited-secrets -ignore regex in the bats fixtures is retained — that is
a separate, legitimate suppression (secrets: inherit values actionlint cannot
resolve statically).

Evidence

  • actionlint (shellcheck active) over the devkit's own workflows, all four
    rendered mode trees (devcontainer/direnv/bare/both), and the smoke-test
    template: 0 findings.
  • nix develop -c prek run --all-files: green (shellcheck active).
  • nix develop -c bats tests/bats/init-workspace.bats: full file green (157 tests).
  • uv run pytest tests/test_flake_hooks.py tests/test_transforms.py -q: green
    (hook-config drift gate + manifest transforms).

Refs: #1003

c-vigo added 2 commits July 13, 2026 12:39
Quote redirect targets and shell variables, group consecutive
GITHUB_OUTPUT writes, quote pattern expansions, and drop a dead array
parse across the devkit's own and the scaffolded template workflows so
they pass actionlint's bundled shellcheck. Intentional patterns (literal
Markdown backticks, whitelist substring matches, deliberate
word-splitting) carry justified shellcheck disable directives.

Refs: #1003
Drop the `-shellcheck=` opt-out from the devkit's actionlint pre-commit
hook (nix/hooks.nix + the drift-gated .pre-commit-config.yaml) and from
the bats fixtures that lint the per-mode scaffold output and the
smoke-test template. The run blocks are now hardened, so the bundled
shellcheck pass is clean. The inherited-secrets `-ignore` regex stays;
that is a separate, legitimate suppression.

Refs: #1003
@c-vigo
c-vigo marked this pull request as ready for review July 13, 2026 10:54
@c-vigo

c-vigo commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

Reviewed: minimal quote-only hardening across devkit-own + template + smoke-test workflows; 10 suppressions each with inline justification (verified SC2076/SC2016/SC2207/SC2015 reasoning); the one logic change (dead ARCH_ARRAY parse + ARCHS env removal in release.yml Verify-manifests) verified genuinely unused; opt-outs fully removed (nix/hooks.nix, .pre-commit-config.yaml, both bats fixtures) with the gate provably active — full hook suite green with shellcheck on, 157/157 init-workspace bats (incl. rendered-tree actionlint per mode), 19/19 transform/hook pytest; CI 13 pass / 0 fail. Conflict surface with #1012 is one quoted variable in sync-issues.yml — trivial at merge. Ready for final review.

@c-vigo
c-vigo merged commit e655331 into dev Jul 13, 2026
14 checks passed
@c-vigo
c-vigo deleted the feature/1003-actionlint-shellcheck branch July 13, 2026 10:54
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