Trim the lint-gate comments and TODO entry to the traps only #44

Closed
opened 2026-08-10 15:34:07 +02:00 by clawbot · 1 comment
Collaborator

Standing rule, sneak 2026-08-10: comments in code and config keep what a reader needs in order to avoid a trap, and drop the reasoning, the history and the self-justification. Findings, disclosures and evidence that a check ran are explicitly not what this cuts.

The lint gate landed by #41 predates that rule and violates it. script/lint and Dockerfile.lint carry long comment blocks that narrate how the shape was arrived at, and the TODO.md entry runs to four paragraphs including a "Hardened" and a "Corrected" paragraph that argue with earlier drafts of themselves.

Definition of done

  • script/lint and Dockerfile.lint comments state the traps and nothing else. The traps that must survive, because each one silently produces a green run over an unlinted or partially-linted tree:
    1. --target and --no-cache-filter must both stay, and $stage must match the stage name in Dockerfile.lint.
    2. --target checks the name exists, not that it is the stage running golangci-lint, and it halts the build there — relocating the lint step or appending a stage after it goes unnoticed.
    3. .dockerignore decides what reaches the container and only what reaches it is linted; excluding a self-contained Go file drops it silently.
  • Cut the derivation: why two stages, why config verify was omitted, what a previous draft claimed. That belongs in the history, which already has it.
  • The TODO.md entry collapses to what a future reader needs. Keep the evidence that the gate was verified rather than assumed; drop the argument with earlier versions of the entry.
  • No behaviour change: the docker build invocation and its three flags stay byte-identical, .dockerignore's effective rules unchanged.
  • make check green, and one script/lint run showing the lint layer executing rather than CACHED.

Do this before the shape is ported to sneak/homoicon, so the port carries the trimmed version.

Standing rule, sneak 2026-08-10: comments in code and config keep what a reader needs in order to avoid a trap, and drop the reasoning, the history and the self-justification. Findings, disclosures and evidence that a check ran are explicitly not what this cuts. The lint gate landed by https://git.eeqj.de/sneak/rgoue/issues/41 predates that rule and violates it. `script/lint` and `Dockerfile.lint` carry long comment blocks that narrate how the shape was arrived at, and the `TODO.md` entry runs to four paragraphs including a "Hardened" and a "Corrected" paragraph that argue with earlier drafts of themselves. ## Definition of done - `script/lint` and `Dockerfile.lint` comments state the traps and nothing else. The traps that must survive, because each one silently produces a green run over an unlinted or partially-linted tree: 1. `--target` and `--no-cache-filter` must both stay, and `$stage` must match the stage name in `Dockerfile.lint`. 2. `--target` checks the name exists, not that it is the stage running `golangci-lint`, and it halts the build there — relocating the lint step or appending a stage after it goes unnoticed. 3. `.dockerignore` decides what reaches the container and only what reaches it is linted; excluding a self-contained Go file drops it silently. - Cut the derivation: why two stages, why `config verify` was omitted, what a previous draft claimed. That belongs in the history, which already has it. - The `TODO.md` entry collapses to what a future reader needs. Keep the evidence that the gate was verified rather than assumed; drop the argument with earlier versions of the entry. - No behaviour change: the `docker build` invocation and its three flags stay byte-identical, `.dockerignore`'s effective rules unchanged. - `make check` green, and one `script/lint` run showing the lint layer executing rather than `CACHED`. Do this before the shape is ported to `sneak/homoicon`, so the port carries the trimmed version.
Author
Collaborator

Built as 6f997b8 on next, in #45 (new cycle PR — #43 is merged and main is at 9f079ab).

Comments and documentation only. Cut from script/lint and Dockerfile.lint: the two-stage rationale, the golangci-lint config verify omission, and what earlier drafts of the comments claimed. TODO.md loses its "Hardened" and "Corrected" paragraphs.

All three traps survive, stated as hazards rather than history: --target and --no-cache-filter both required with $stage matching the stage name in Dockerfile.lint; --target checking existence rather than which stage runs golangci-lint, and halting the build there; and .dockerignore governing what is linted at all. Trap 3 is stated in both script/lint and .dockerignore. The TODO.md entry keeps the flags, the durable property, the three unguarded seams, and the verification evidence.

No behaviour change. Non-comment changed lines in script/lint, .dockerignore and Dockerfile.lint: none in any of the three. Stripping comments and blank lines from each file before and after the commit gives byte-identical content. The docker build invocation and its three flags are unchanged; .dockerignore's only rule is still .git.

Verification. script/lint: #11 11.83 0 issues., DONE 12.2s, not CACHED, exit 0. make check forced uncached (GOFLAGS=-count=1), re-run after rebasing onto current main: lint layer executed (10.96 0 issues.), ok cmd/rogue 1.027s / ok game 3.138s, exit 0. git status empty around every evidence run; scratch outside the clone; no prune of any kind.

One judgement call: I folded the trim into the existing 2026-08-10 TODO.md entry rather than adding a Completed Steps entry for it. A new entry recording that the comments were shortened would itself be the self-narration this issue removes.

Built as `6f997b8` on `next`, in https://git.eeqj.de/sneak/rgoue/pulls/45 (new cycle PR — https://git.eeqj.de/sneak/rgoue/pulls/43 is merged and `main` is at `9f079ab`). Comments and documentation only. Cut from `script/lint` and `Dockerfile.lint`: the two-stage rationale, the `golangci-lint config verify` omission, and what earlier drafts of the comments claimed. `TODO.md` loses its "Hardened" and "Corrected" paragraphs. All three traps survive, stated as hazards rather than history: `--target` and `--no-cache-filter` both required with `$stage` matching the stage name in `Dockerfile.lint`; `--target` checking existence rather than which stage runs `golangci-lint`, and halting the build there; and `.dockerignore` governing what is linted at all. Trap 3 is stated in both `script/lint` and `.dockerignore`. The `TODO.md` entry keeps the flags, the durable property, the three unguarded seams, and the verification evidence. **No behaviour change.** Non-comment changed lines in `script/lint`, `.dockerignore` and `Dockerfile.lint`: none in any of the three. Stripping comments and blank lines from each file before and after the commit gives byte-identical content. The `docker build` invocation and its three flags are unchanged; `.dockerignore`'s only rule is still `.git`. **Verification.** `script/lint`: `#11 11.83 0 issues.`, `DONE 12.2s`, not `CACHED`, exit 0. `make check` forced uncached (`GOFLAGS=-count=1`), re-run after rebasing onto current `main`: lint layer executed (`10.96 0 issues.`), `ok cmd/rogue 1.027s` / `ok game 3.138s`, exit 0. `git status` empty around every evidence run; scratch outside the clone; no prune of any kind. One judgement call: I folded the trim into the existing 2026-08-10 `TODO.md` entry rather than adding a Completed Steps entry for it. A new entry recording that the comments were shortened would itself be the self-narration this issue removes.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/rgoue#44