Skip to content

build: the shell gate follows Declare-BashScript, and discovers through the git tree (#863) - #870

Merged
David-Noble-at-work merged 1 commit into
developfrom
feature/863-shell-lint-follows-the-helper
Sep 8, 2026
Merged

David-Noble-at-work merged 1 commit into
developfrom
feature/863-shell-lint-follows-the-helper

Conversation

@David-Noble-at-work

Copy link
Copy Markdown
Contributor

Summary

Closes #863.

  • Follows the helper: -P "${DECLARE_BASHSCRIPT_DIR:-$HOME/.local/bin}", as personal's copy already does, so make check and CI agree on every script that sources the base layer's Declare-BashScript
  • Discovers through the git tree: what CI lints is what CI checks out. 43 files in 11.7s, against 55,153 read in a built clone where build/ alone is 1.1 GB

Not the swap the issue proposed

Measured over tracked files: the script finds 52 shell scripts by shebang, star lint shell finds 11 by extension. Swapping make shell-lint to star and deleting the script would drop 41 from every check — .githooks/pre-commit, New-DevloreKeyVaults, and all of #855's fixtures — and star lint shell .githooks answers No shell files found with exit 0, so the loss would be silent. docs/plans/shell-lint-via-star.md (#672) warns against that ordering; its steps 1–5 are undone. The corollary: CI is the weaker gate, not local — #670 pointing the other way. Both recorded on #863 and left with #672.

Test plan

  • make check clean on develop's head with a deployed helper
  • the gate reports 43 files, 0 failures, 11.7s; .githooks/pre-commit is among them
  • git ls-files -z with read -d '' handles a path with a space or newline; a tracked-but-deleted path is skipped

https://claude.ai/code/session_01BTCnSyUbYFFUKMD3PuF1vt

…gh the git tree (#863)

make check failed locally on every script that sources Declare-BashScript while CI was green: the
gate passed no -P, so shellcheck never followed the source and reported the helper's variables as
unassigned. It now passes -P "${DECLARE_BASHSCRIPT_DIR:-$HOME/.local/bin}", the line personal's copy
of this script has carried since its own move.

Measuring that turned up a second defect. Discovery was a filesystem walk, so in a built clone the
gate read 55,153 files to find 43 -- build/ alone is 1.1 GB -- and linted whatever was lying around,
which made its answer depend on build state rather than on what CI checks out. Discovery is now the
git tree: 43 files, 11.7 seconds, reproducible.

Not the swap this issue proposed. Measured over tracked files, the script finds 52 shell scripts by
shebang and star lint shell finds 11 by extension, so swapping and deleting the script would drop 41
from every check -- .githooks/pre-commit among them -- and star lint shell .githooks answers "No
shell files found" with exit 0, so the loss would be silent. docs/plans/shell-lint-via-star.md (#672)
warns against that ordering and its steps 1-5 are undone. The corollary is recorded there: CI is the
weaker gate, not local, which is #670 pointing the other way.

Claude-Session: https://claude.ai/code/session_01BTCnSyUbYFFUKMD3PuF1vt
@David-Noble-at-work
David-Noble-at-work merged commit ef07bc7 into develop Sep 8, 2026
13 checks passed
@David-Noble-at-work
David-Noble-at-work deleted the feature/863-shell-lint-follows-the-helper branch September 8, 2026 22:25
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.

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

1 participant