script/check does not run script/lint, so lint is ungated in CI #9

Closed
opened 2026-08-09 03:41:53 +02:00 by clawbot · 1 comment
Collaborator

Problem

The canonical script/check runs three things, in this order:

main() {
    "$SCRIPT_DIR/test"
    "$SCRIPT_DIR/lint"
    "$SCRIPT_DIR/fmt-check"
}

This repo's script/check runs only two, in a different order:

main() {
    "$SCRIPT_DIR/fmt-check"
    "$SCRIPT_DIR/test"
}

script/lint is never invoked. Because make check shims to script/check,
and the Dockerfile runs make check, and script/cibuild is just docker build ., the consequence is that script/lint runs nowhere in the entire
gate
— not in make check, not in the pre-commit hook (script/precommit
calls script/check), and not in CI. The script exists and is documented in
the README but is dead code.

This is not cosmetic. script/lint runs hugo --minify --printPathWarnings,
which surfaces render-target collisions that plain hugo --minify does not.
That signal is currently discarded.

REPO_POLICIES.md also requires make check to run test, lint, and
fmt-check: "make check (runs test, lint, fmt-check)".

Definition of done

  1. script/check invokes script/test, script/lint, and script/fmt-check,
    in that canonical order.
  2. Running make check visibly executes the lint step (its
    --printPathWarnings output appears).
  3. README.md's Entrypoints section is corrected — it currently says
    "script/check — run script/fmt-check then script/test; modifies
    nothing", which will no longer be true.
  4. make check passes and script/cibuild succeeds with the lint step
    included.
  5. script/check still modifies no files (REPO_POLICIES.md: "make check
    must not modify any files in the repo"). Note that script/test and
    script/lint both write to public/, which is gitignored and was already
    the case before this change; verify git status is clean after make check.
  6. TODO.md updated in the same commit.

Note on a warning this will surface

The Hugo build currently emits:

WARN  found no layout file for "html" for kind "taxonomy": You should create a
template file which matches Hugo Layouts Lookup Rules for this combination.

It is a warning, not an error, so it will not fail the gate. Do not fix it in
this issue
— it is tracked separately. Do not add --panicOnWarning or
otherwise escalate warnings to errors here either; that is a separate decision.

Ref: REPO_POLICIES.md — scripts-to-rule-them-all section; canonical
script/check at
https://git.eeqj.de/sneak/prompts/raw/branch/main/script/check.

## Problem The canonical `script/check` runs three things, in this order: ```sh main() { "$SCRIPT_DIR/test" "$SCRIPT_DIR/lint" "$SCRIPT_DIR/fmt-check" } ``` This repo's `script/check` runs only two, in a different order: ```sh main() { "$SCRIPT_DIR/fmt-check" "$SCRIPT_DIR/test" } ``` `script/lint` is never invoked. Because `make check` shims to `script/check`, and the `Dockerfile` runs `make check`, and `script/cibuild` is just `docker build .`, the consequence is that **`script/lint` runs nowhere in the entire gate** — not in `make check`, not in the pre-commit hook (`script/precommit` calls `script/check`), and not in CI. The script exists and is documented in the README but is dead code. This is not cosmetic. `script/lint` runs `hugo --minify --printPathWarnings`, which surfaces render-target collisions that plain `hugo --minify` does not. That signal is currently discarded. `REPO_POLICIES.md` also requires `make check` to run `test`, `lint`, and `fmt-check`: "`make check` (runs `test`, `lint`, `fmt-check`)". ## Definition of done 1. `script/check` invokes `script/test`, `script/lint`, and `script/fmt-check`, in that canonical order. 2. Running `make check` visibly executes the lint step (its `--printPathWarnings` output appears). 3. `README.md`'s Entrypoints section is corrected — it currently says "`script/check` — run `script/fmt-check` then `script/test`; modifies nothing", which will no longer be true. 4. `make check` passes and `script/cibuild` succeeds with the lint step included. 5. `script/check` still modifies no files (`REPO_POLICIES.md`: "`make check` must not modify any files in the repo"). Note that `script/test` and `script/lint` both write to `public/`, which is gitignored and was already the case before this change; verify `git status` is clean after `make check`. 6. `TODO.md` updated in the same commit. ## Note on a warning this will surface The Hugo build currently emits: ``` WARN found no layout file for "html" for kind "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination. ``` It is a warning, not an error, so it will not fail the gate. **Do not fix it in this issue** — it is tracked separately. Do not add `--panicOnWarning` or otherwise escalate warnings to errors here either; that is a separate decision. Ref: `REPO_POLICIES.md` — scripts-to-rule-them-all section; canonical `script/check` at `https://git.eeqj.de/sneak/prompts/raw/branch/main/script/check`.
Author
Collaborator

Implementation plan

Branch fix/check-runs-lint from main, in an isolated worktree.

  1. script/check — change main() to invoke, in canonical order:
    "$SCRIPT_DIR/test", "$SCRIPT_DIR/lint", "$SCRIPT_DIR/fmt-check".
    The file's own header comment currently says "Runs the read-only
    formatting check first, then the clean production build", which
    becomes false with this change, so it gets rewritten to describe the
    three-step canonical order. No other change to the script; it stays
    set -eu with the same SCRIPT_DIR resolution.

  2. README.md — correct the Entrypoints bullet from "script/check
    — run script/fmt-check then script/test; modifies nothing" to
    describe the actual order (script/test, script/lint,
    script/fmt-check), keeping the "modifies nothing" claim since it
    remains true for tracked files. make fmt afterwards so prettier
    (4-space tabs, proseWrap: always) reflows the list item.

  3. TODO.md — add a dated entry at the top of Completed Steps for
    this change, in the same commit as the work, per the Workflow block.
    The Next Step item (policy scaffold: LICENSE, REPO_POLICIES.md,
    .editorconfig, prettier config) is a different task and is left
    untouched.

Verification I will run

  • make check — must be green and must visibly show the lint step's
    --printPathWarnings output between the test build and the prettier
    check.
  • git status --porcelain immediately after make check — must show
    nothing beyond pre-existing untracked paths, confirming the gate still
    modifies no tracked files (public/ is gitignored and was already
    written by script/test before this change).
  • script/cibuild. Because the Dockerfile does COPY . . then
    RUN make check with no cache control, a green cibuild on an
    unchanged tree can be served from the layer cache and prove nothing
    (tracked as #23). I will therefore confirm the RUN make check layer
    genuinely executed by checking the build output is not CACHED and
    contains real Hugo and prettier output; if it is cache-served I will
    force a real run with a stage-scoped --no-cache-filter build and say
    so explicitly in the PR. I will not run any form of
    docker builder prune.

The PR body will state exactly what ran and whether the cibuild run was
genuinely executed or cache-served, with the lint step's actual output
pasted.

Out of scope, per the issue — will not be touched

  • The found no layout file for "html" for kind "taxonomy" Hugo warning
    (#13). It is a warning, not an error, and will not fail the gate.
  • --panicOnWarning or any other escalation of warnings to errors.
  • Timeout guards (#16).
  • The cibuild cache-invalidation defect itself (#23).
## Implementation plan Branch `fix/check-runs-lint` from `main`, in an isolated worktree. 1. **`script/check`** — change `main()` to invoke, in canonical order: `"$SCRIPT_DIR/test"`, `"$SCRIPT_DIR/lint"`, `"$SCRIPT_DIR/fmt-check"`. The file's own header comment currently says "Runs the read-only formatting check first, then the clean production build", which becomes false with this change, so it gets rewritten to describe the three-step canonical order. No other change to the script; it stays `set -eu` with the same `SCRIPT_DIR` resolution. 2. **`README.md`** — correct the Entrypoints bullet from "`script/check` — run `script/fmt-check` then `script/test`; modifies nothing" to describe the actual order (`script/test`, `script/lint`, `script/fmt-check`), keeping the "modifies nothing" claim since it remains true for tracked files. `make fmt` afterwards so prettier (4-space tabs, `proseWrap: always`) reflows the list item. 3. **`TODO.md`** — add a dated entry at the top of Completed Steps for this change, in the same commit as the work, per the Workflow block. The Next Step item (policy scaffold: `LICENSE`, `REPO_POLICIES.md`, `.editorconfig`, prettier config) is a different task and is left untouched. ### Verification I will run - `make check` — must be green and must visibly show the lint step's `--printPathWarnings` output between the test build and the prettier check. - `git status --porcelain` immediately after `make check` — must show nothing beyond pre-existing untracked paths, confirming the gate still modifies no tracked files (`public/` is gitignored and was already written by `script/test` before this change). - `script/cibuild`. Because the `Dockerfile` does `COPY . .` then `RUN make check` with no cache control, a green cibuild on an unchanged tree can be served from the layer cache and prove nothing (tracked as #23). I will therefore confirm the `RUN make check` layer genuinely executed by checking the build output is not `CACHED` and contains real Hugo and prettier output; if it is cache-served I will force a real run with a stage-scoped `--no-cache-filter` build and say so explicitly in the PR. I will not run any form of `docker builder prune`. The PR body will state exactly what ran and whether the cibuild run was genuinely executed or cache-served, with the lint step's actual output pasted. ### Out of scope, per the issue — will not be touched - The `found no layout file for "html" for kind "taxonomy"` Hugo warning (#13). It is a warning, not an error, and will not fail the gate. - `--panicOnWarning` or any other escalation of warnings to errors. - Timeout guards (#16). - The cibuild cache-invalidation defect itself (#23).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/lora.vegas#9