Skip to content

make check's shell-lint runs the retired script without Declare-BashScript's directory; CI runs star lint shell, so the local gate and CI disagree #863

Closed

Description

@David-Noble-at-work

What happens

make check depends on shell-lint, whose recipe is .github/scripts/shell-lint.sh: a find-by-shebang loop over shfmt and shellcheck -x --severity=warning, with no -P and no DECLARE_BASHSCRIPT_DIR. A script that sources Declare-BashScript from its sibling directory therefore fails locally with SC2154 (script_arguments referenced but not assigned), because the source is never followed. Measured 2026-09-08 on develop at e9d45b0, the layer-journey fixtures of #855: eleven fixture scripts under cmd/writ/testdata/layer-journey/personal-a/Home/*/bin fail make check, while

  • shellcheck -P ~/.local/bin <file> passes every one of them, and
  • ./build/star lint shell . reports Shell lint passed (11 files).

CI (.github/workflows/ci.yaml) never runs the script: its Lint Shell step is ./build/star lint shell ., and develop is green there. So the local gate the process routes every commit through (make check, ruled) is a hand-rolled subset that has diverged from CI -- the failure mode pr-script-template.md names ("a hand-rolled subset of the gate will differ from it eventually").

The fix

  1. Makefile: shell-lint runs ./build/star lint shell . (after build), so make check and CI run the same command.
  2. .github/scripts/shell-lint.sh is retired; nothing else invokes it (grep -rn shell-lint.sh finds the Makefile alone).
  3. noblefactor-ops docs/guides/pr-script-template.md's devlore-cli row already names ./build/star lint go ./...; it gains ./build/star lint shell . and drops nothing.

Acceptance

  • make check on develop's head passes locally with a deployed ~/.local/bin/Declare-BashScript, and fails the same files CI fails
  • .github/scripts/shell-lint.sh is gone and no target or workflow names it
  • the PR-script template's devlore-cli row lists the shell lint command

Plan and design documents

Kind Document
Plan docs/plans/feature/863-shell-lint-follows-the-helper.md
Design noblefactor-ops docs/guides/pr-script-template.md
Design noblefactor-ops docs/guides/development-process.md § Where a script lives

Activity

  1. David-Noble-at-work commented on Sep 8, 2026

    @David-Noble-at-work
    ContributorAuthor

    Measured before acting, 2026-09-08, and the proposed fix would do harm. Over tracked files:

    Discovery Files
    .github/scripts/shell-lint.sh, by shebang or # shellcheck shell= 52
    star lint shell, by extension (*.sh, *.bash, *.zsh) 11

    Swapping make shell-lint to star lint shell . and deleting the script would drop 41 shell scripts from every check — .githooks/pre-commit among them, the pre-commit hook itself, plus New-DevloreKeyVaults and all 30 of #855's layer-journey fixtures. star lint shell .githooks today answers No shell files found and exits 0, so the loss would be silent.

    That is exactly what docs/plans/shell-lint-via-star.md (#672, drafted 2026-08-25) warns about: "Step 8 last, and only after 4. Deleting the script before discovery is fixed would silently drop .githooks/pre-commit … That is the invisible-removal pattern this campaign exists to stop." Steps 1–5 of that plan — the hook-pre-commit.star keyword-argument bugs, lint.Shell returning Passed: true for an empty set, and lint-shell.star globbing instead of using the provider's shebang rule — are all still undone. The provider (cmd/star/provider/shellcheck/provider.go) already implements the right discovery; the extension calls the wrong entry point.

    Also worth correcting: this issue says grep -rn shell-lint.sh finds the Makefile alone. .githooks/pre-commit:27 invokes the script directly, which is step 7 of #672.

    Two problems are tangled here, and only one is this issue's.

    Taking A here, narrowly. B stays with #672, where its plan and ordering already live.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions