lint: enumerate every tracked shell file for bash -n and shellcheck; clear the first-run backlog (dev#53) - #35
Open
shojikumaru wants to merge 1 commit into
Open
shojikumaru wants to merge 1 commit into
shojikumaru wants to merge 1 commit into
Conversation
…clear the first-run backlog (dev#53) Makefile `lint` now materialises `git ls-files -z '*.sh'` plus the five extensionless Bash entry points in bin/ into one NUL-delimited manifest and feeds the same manifest to `bash -n` (one file per invocation) and `shellcheck -e SC2015`. CI calls `make lint` instead of keeping its own hand list, so the two lanes cannot drift; the job name and the runner-parity recipe are unchanged. Coverage goes from 15 hand-listed files to 91 tracked .sh files + 5 entry points, with no path exclusions and no `-x`. First-run backlog (131 findings, ShellCheck 0.11.0) cleared without runtime changes: 27 x SC1007 `CDPATH= cd` -> `CDPATH='' cd`; 27 x SC1091 resolved with static `# shellcheck source=` annotations; SC2016 in test fixture text and SC2034/SC2094/SC2031/SC2329 disables each carry a `# reason:` on the same line; three SC2086 disabled with reasons (intentional word splitting of fixed fixture strings and jq integer counts); SC2295/SC2269/SC2209 fixed. Mutation proof: `echo $unquoted` appended to lib/ledger.sh -> `make lint` exit 2; restored -> exit 0. Written by Codex (astra) in two rounds; committed by alpha. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes caty-ai/alpha-nightshift-dev#53 (lint: shellcheck covered 15 of 68 shell files; all of
lib/unchecked).What changed
Makefilelint: one NUL-delimited manifest =git ls-files -z '*.sh'+LINT_BASH_EXECUTABLES(the five extensionless Bash entry points inbin/, audited by first-line shebang over every tracked file). The same manifest feedsbash -n(one file per invocation) andshellcheck -e SC2015. No path exclusions, no-x, no new-ecodes. Runner-parity recipe byte-identical to before..github/workflows/ci.yml: the "Bash syntax" and "ShellCheck changed publisher surface" hand lists are replaced bycommand -v make && make lint. Job idguardunchanged (branch protection). The standalone runner-parity step is kept.CDPATH= cd→CDPATH='' cd; 27× SC1091 via static# shellcheck source=annotations; 29# shellcheck disable=each with# reason:on the same line (SC2016 ×12 fixture text, SC2034 ×7, SC2094 ×2, SC2031 ×1 file-level, SC2329 ×3, SC2086 ×3 intentional word splitting of fixed fixture strings / jq integer counts, SC2006 ×1 adversarial fixture); SC2295 / SC2269 / SC2209 / SC1003 fixed.docs/engineering.md/docs/engineering.ja.md: CI description updated (EN/JA in sync).Coverage: 15 hand-listed files → 91 tracked
*.sh+ 5 entry points = 96 files in both lanes.完了記録 (L1-7)
候補 commit SHA:
b95e1af(PR head; baseorigin/main=b5deeb4).Makefile+ci.ymlusegit ls-files '*.sh')git ls-files '*.sh' | wc -l→ 91; manifest traced withxargs -0 -t= 96 paths (91 + 5 bins), single shellcheck invocation; ci.yml nowmake lint(Kimi F1 / GLM F1 / Opus F1, all PASS with the same count)make lint→ exit 0 (alpha re-run after commit; tail = runner-parity block, no findings). All 29 disables enumerated and reasons verified by all three seats (Opus removed the SC2031 file-level disable and re-ran: 9 live hits, so the disable is needed)bash -ncovers the same file setxargs -0 -n 1 bash -n; Opus injected a danglingifintobin/budget-probe-stub→make lintexit 2*.shlinted or declared exempt)*.shby construction (no list exists to drift; exemptions live only as in-filedisablelines with reasons). Residual: the 5-entryLINT_BASH_EXECUTABLESlist for extensionless scripts is hand-maintained — Opus N1 + Kimi N2 converge on this; tracked as a follow-up issue (see below), not blockingecho $unquotedtolib/ledger.sh→ exit 2 (SC2086 at ledger.sh:371/372); restore (sha2561303e334…identical) → exit 0. Reproduced independently by GLM and Kimi incp -Rscratch copies and by Opus (exit 2 withIn lib/ledger.sh line 371)make teston b95e1af:Tests: 45 passed, 0 failed/suites: declared=45 executed=45 skipped=0/ exit 0 (/tmp/make-test-53.log, 2026-09-13 12:37 +07)tests/fixtures/**stay in the manifest; the one intentionally odd fixture (tests/fixtures/triage/repo/base/app/render.sh) carries# shellcheck disable=SC2006 # reason: adversarial fixture deliberately retains legacy backtick source text触ったファイル一覧 vs
git diff --stat origin/main...b95e1af(34 files, +105 −149; declared set in dev#53 WIP r2 = Makefile, ci.yml, lib/, lanes/, guard/, bin/, tests/, docs/engineering{,.ja}.md — every diff path is inside it):.github/workflows/ci.yml,Makefile,bin/nightshift-dispatch,bin/verdict-sync,docs/engineering.md,docs/engineering.ja.md,guard/preflight.sh,guard/render-sandbox.sh,guard/scan.sh,guard/text-policy.sh,lanes/metsuke/check-readiness.sh,lanes/metsuke/run.sh,lib/budget.sh,lib/common.sh,lib/evidence.sh,lib/lane-env.sh,tests/fixtures/triage/repo/base/app/render.sh, and 17tests/test_*.sh.身元: implementer = Codex (gpt-6-astra, two rounds via sitter-run; reports
/tmp/codex-53-report{,-r2}.md), committed by alpha. Reviewers (blind, read-only, fresh context; full reviews in~/.buzz/.scratch/seats-53/{glm,kimi,opus}.mdon the dev MBP):*.shnot linted untilgit add(matches the issue's "tracked" wording); parity runs twice in CI;source=rewrite inert without-x@hides the file count in CI logModel/agent of implementer (Codex) differs from every reviewer (L1-3 / L1-10). Alpha (Fable) did not vote.
CI (head b95e1af, 2026-09-13):
guardpass (23m08s, run 34741078302) ·test-lint / test-macospass (12m47s, run 34741078503) · gitleaks / history-check / repo-state / watch pass. Red by design until the owner labels:pr-size(needssize-exempt, 34 files) andrisk-review-gate(needsrisk-reviewed, guard/ is a risk path).release:
v0.7.1(lint ゲートの範囲変更=規範変更なので出荷相当扱い・merge 後に annotated tag + GitHub Release を alpha が実施・T-5)previous release:
v0.7.0(PR #33・tag + GitHub Release 2026-09-07 履行済み)Follow-up (not blocking)
Derive
LINT_BASH_EXECUTABLESfrom a shebang scan (or assert the hand list against one) and document that the single-batch shellcheck invocation is load-bearing — Opus N1/N2 + Kimi N1/N2. Filed as caty-ai/alpha-nightshift-dev follow-up issue (linked from dev#53).🤖 Generated with Claude Code